From db72303f68292e9d95f4cd5e43c70707c83cabc3 Mon Sep 17 00:00:00 2001 From: michaelkad <45772690+michaelkad@users.noreply.github.com> Date: Fri, 29 Sep 2023 14:58:52 -0500 Subject: [PATCH] Revert "Generated Swagger client from service-broker commit 35d8e65065fb41095811beb542f0ea9591913647" (#241) This reverts commit 390512daa4c0c0d23dbfb205faadf11968e9d505. --- .../service_broker_auth_callback_responses.go | 222 +++++++ ..._broker_auth_device_code_post_responses.go | 224 ++++++- ...broker_auth_device_token_post_responses.go | 152 ++++- ...ervice_broker_auth_info_token_responses.go | 296 ++++++++++ ...service_broker_auth_info_user_responses.go | 296 ++++++++++ .../service_broker_auth_login_responses.go | 222 +++++++ .../service_broker_auth_logout_responses.go | 296 ++++++++++ ...er_auth_registration_callback_responses.go | 222 +++++++ ...vice_broker_auth_registration_responses.go | 222 +++++++ ...ervice_broker_auth_token_post_responses.go | 152 ++++- .../bluemix_service_instance_get_responses.go | 222 +++++++ .../bluemix_service_instance_put_responses.go | 222 +++++++ power/client/catalog/catalog_get_responses.go | 296 ++++++++++ ..._broker_hardwareplatforms_get_responses.go | 296 ++++++++++ .../service_broker_health_head_responses.go | 222 +++++++ .../service_broker_health_responses.go | 222 +++++++ .../service_broker_test_timeout_responses.go | 296 ++++++++++ .../service_broker_version_responses.go | 222 +++++++ ...service_broker_openstacks_get_responses.go | 150 ++++- ...oker_openstacks_openstack_get_responses.go | 148 +++++ ...ervice_broker_openstacks_post_responses.go | 222 +++++++ ...broker_openstacks_servers_get_responses.go | 148 +++++ ...cloud_cloudconnections_delete_responses.go | 74 +++ .../pcloud_cloudconnections_get_responses.go | 74 +++ ...cloud_cloudconnections_getall_responses.go | 74 +++ ...udconnections_networks_delete_responses.go | 74 +++ ...cloudconnections_networks_put_responses.go | 74 +++ .../pcloud_cloudconnections_post_responses.go | 74 +++ .../pcloud_cloudconnections_put_responses.go | 74 +++ ...s_virtualprivateclouds_getall_responses.go | 74 +++ ...tions_disasterrecovery_getall_responses.go | 74 +++ .../pcloud_events_get_responses.go | 74 +++ .../pcloud_events_getquery_responses.go | 74 +++ ...ud_cloudinstances_images_post_responses.go | 74 +++ ...loudinstances_stockimages_get_responses.go | 74 +++ ...dinstances_stockimages_getall_responses.go | 74 +++ ..._cloudinstances_cosimages_get_responses.go | 74 +++ ...cloudinstances_cosimages_post_responses.go | 74 +++ .../pcloud_v2_images_export_get_responses.go | 148 +++++ .../pcloud_v2_images_export_post_responses.go | 74 +++ .../pcloud_cloudinstances_delete_responses.go | 148 +++++ .../pcloud_cloudinstances_get_responses.go | 74 +++ .../pcloud_cloudinstances_put_responses.go | 148 +++++ .../pcloud_networks_getall_responses.go | 74 +++ .../pcloud_networks_ports_get_responses.go | 74 +++ .../pcloud_networks_post_responses.go | 74 +++ ...cloud_pvminstances_clone_post_responses.go | 148 +++++ ...oud_pvminstances_console_post_responses.go | 74 +++ .../pcloud_pvminstances_getall_responses.go | 74 +++ ..._pvminstances_networks_delete_responses.go | 74 +++ ...oud_pvminstances_networks_get_responses.go | 148 +++++ ..._pvminstances_networks_getall_responses.go | 148 +++++ ...ud_pvminstances_networks_post_responses.go | 148 +++++ ..._pvminstances_operations_post_responses.go | 74 +++ ...d_v2_pvminstances_capture_get_responses.go | 148 +++++ ..._v2_pvminstances_capture_post_responses.go | 76 ++- ...pcloud_v2_pvminstances_getall_responses.go | 74 +++ ...pcloud_placementgroups_delete_responses.go | 74 +++ .../pcloud_placementgroups_get_responses.go | 74 +++ ...pcloud_placementgroups_getall_responses.go | 74 +++ ...lacementgroups_members_delete_responses.go | 74 +++ ..._placementgroups_members_post_responses.go | 74 +++ .../pcloud_placementgroups_post_responses.go | 148 +++++ .../pcloud_podcapacity_get_responses.go | 148 +++++ .../p_cloud_s_a_p/pcloud_sap_get_responses.go | 74 +++ .../pcloud_sap_getall_responses.go | 148 +++++ .../pcloud_sap_post_responses.go | 148 +++++ ...pcloud_sppplacementgroups_get_responses.go | 74 +++ ...cloud_sppplacementgroups_post_responses.go | 74 +++ .../pcloud_dhcp_get_responses.go | 74 +++ .../pcloud_dhcp_getall_responses.go | 222 +++++++ .../pcloud_dhcp_post_responses.go | 148 +++++ ...loud_sharedprocessorpools_get_responses.go | 74 +++ ...oud_sharedprocessorpools_post_responses.go | 74 +++ ...oudinstances_snapshots_getall_responses.go | 74 +++ ...oud_storagecapacity_pools_get_responses.go | 74 +++ ..._storagecapacity_pools_getall_responses.go | 148 +++++ ...oud_storagecapacity_types_get_responses.go | 74 +++ ..._storagecapacity_types_getall_responses.go | 148 +++++ ...instances_storagetiers_getall_responses.go | 148 +++++ .../pcloud_systempools_get_responses.go | 148 +++++ .../pcloud_tenants_put_responses.go | 148 +++++ ...pcloud_tenants_sshkeys_delete_responses.go | 148 +++++ .../pcloud_tenants_sshkeys_post_responses.go | 148 +++++ .../pcloud_tenants_sshkeys_put_responses.go | 148 +++++ ...onnections_peersubnets_delete_responses.go | 74 +++ ...pnconnections_peersubnets_put_responses.go | 74 +++ .../pcloud_vpnconnections_post_responses.go | 74 +++ .../pcloud_ikepolicies_put_responses.go | 74 +++ .../pcloud_ipsecpolicies_post_responses.go | 74 +++ .../pcloud_ipsecpolicies_put_responses.go | 74 +++ ...loud_volumegroups_action_post_responses.go | 74 +++ ...loud_volumegroups_get_details_responses.go | 74 +++ .../pcloud_volumegroups_get_responses.go | 74 +++ ...d_volumegroups_getall_details_responses.go | 74 +++ .../pcloud_volumegroups_getall_responses.go | 74 +++ .../pcloud_volumegroups_post_responses.go | 74 +++ ...remote_copy_relationships_get_responses.go | 74 +++ ...umegroups_storage_details_get_responses.go | 74 +++ ...loud_volume_onboarding_getall_responses.go | 74 +++ ...pcloud_volume_onboarding_post_responses.go | 74 +++ ...d_cloudinstances_volumes_post_responses.go | 74 +++ ...loud_pvminstances_volumes_put_responses.go | 74 +++ ..._v2_pvminstances_volumes_post_responses.go | 74 +++ .../pcloud_v2_volumes_post_responses.go | 74 +++ ...d_v2_volumesclone_cancel_post_responses.go | 74 +++ ...pcloud_v2_volumesclone_getall_responses.go | 74 +++ .../pcloud_v2_volumesclone_post_responses.go | 74 +++ ...ud_v2_volumesclone_start_post_responses.go | 74 +++ .../pcloud_volumes_clone_post_responses.go | 74 +++ power/client/power_iaas_api_client.go | 5 + .../service_binding_binding_responses.go | 222 +++++++ .../service_binding_get_responses.go | 222 +++++++ ...ce_binding_last_operation_get_responses.go | 222 +++++++ .../service_binding_unbinding_responses.go | 222 +++++++ .../service_instance_deprovision_responses.go | 148 +++++ .../service_instance_get_responses.go | 222 +++++++ ...e_instance_last_operation_get_responses.go | 222 +++++++ .../service_instance_provision_responses.go | 222 +++++++ .../service_instance_update_responses.go | 222 +++++++ ...rvice_broker_storagetypes_get_responses.go | 296 ++++++++++ .../service_broker_swaggerspec_responses.go | 296 ++++++++++ .../v1_workspaces_get_parameters.go | 151 +++++ .../workspaces/v1_workspaces_get_responses.go | 547 ++++++++++++++++++ power/client/workspaces/workspaces_client.go | 80 +++ power/models/workspace.go | 313 ++++++++++ power/models/workspace_details.go | 96 +++ power/models/workspace_location.go | 105 ++++ power/models/workspaces.go | 124 ++++ 129 files changed, 17116 insertions(+), 7 deletions(-) create mode 100644 power/client/workspaces/v1_workspaces_get_parameters.go create mode 100644 power/client/workspaces/v1_workspaces_get_responses.go create mode 100644 power/client/workspaces/workspaces_client.go create mode 100644 power/models/workspace.go create mode 100644 power/models/workspace_details.go create mode 100644 power/models/workspace_location.go create mode 100644 power/models/workspaces.go diff --git a/power/client/authentication/service_broker_auth_callback_responses.go b/power/client/authentication/service_broker_auth_callback_responses.go index 1d2fa17e..94ed66f1 100644 --- a/power/client/authentication/service_broker_auth_callback_responses.go +++ b/power/client/authentication/service_broker_auth_callback_responses.go @@ -29,12 +29,30 @@ func (o *ServiceBrokerAuthCallbackReader) ReadResponse(response runtime.ClientRe return nil, err } return result, nil + case 400: + result := NewServiceBrokerAuthCallbackBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewServiceBrokerAuthCallbackUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 403: + result := NewServiceBrokerAuthCallbackForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerAuthCallbackNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerAuthCallbackInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +132,74 @@ func (o *ServiceBrokerAuthCallbackOK) readResponse(response runtime.ClientRespon return nil } +// NewServiceBrokerAuthCallbackBadRequest creates a ServiceBrokerAuthCallbackBadRequest with default headers values +func NewServiceBrokerAuthCallbackBadRequest() *ServiceBrokerAuthCallbackBadRequest { + return &ServiceBrokerAuthCallbackBadRequest{} +} + +/* +ServiceBrokerAuthCallbackBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerAuthCallbackBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth callback bad request response has a 2xx status code +func (o *ServiceBrokerAuthCallbackBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth callback bad request response has a 3xx status code +func (o *ServiceBrokerAuthCallbackBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth callback bad request response has a 4xx status code +func (o *ServiceBrokerAuthCallbackBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth callback bad request response has a 5xx status code +func (o *ServiceBrokerAuthCallbackBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth callback bad request response a status code equal to that given +func (o *ServiceBrokerAuthCallbackBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth callback bad request response +func (o *ServiceBrokerAuthCallbackBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerAuthCallbackBadRequest) Error() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthCallbackBadRequest) String() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthCallbackBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthCallbackBadRequest) 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 +} + // NewServiceBrokerAuthCallbackUnauthorized creates a ServiceBrokerAuthCallbackUnauthorized with default headers values func NewServiceBrokerAuthCallbackUnauthorized() *ServiceBrokerAuthCallbackUnauthorized { return &ServiceBrokerAuthCallbackUnauthorized{} @@ -182,6 +268,142 @@ func (o *ServiceBrokerAuthCallbackUnauthorized) readResponse(response runtime.Cl return nil } +// NewServiceBrokerAuthCallbackForbidden creates a ServiceBrokerAuthCallbackForbidden with default headers values +func NewServiceBrokerAuthCallbackForbidden() *ServiceBrokerAuthCallbackForbidden { + return &ServiceBrokerAuthCallbackForbidden{} +} + +/* +ServiceBrokerAuthCallbackForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerAuthCallbackForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth callback forbidden response has a 2xx status code +func (o *ServiceBrokerAuthCallbackForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth callback forbidden response has a 3xx status code +func (o *ServiceBrokerAuthCallbackForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth callback forbidden response has a 4xx status code +func (o *ServiceBrokerAuthCallbackForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth callback forbidden response has a 5xx status code +func (o *ServiceBrokerAuthCallbackForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth callback forbidden response a status code equal to that given +func (o *ServiceBrokerAuthCallbackForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth callback forbidden response +func (o *ServiceBrokerAuthCallbackForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerAuthCallbackForbidden) Error() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthCallbackForbidden) String() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthCallbackForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthCallbackForbidden) 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 +} + +// NewServiceBrokerAuthCallbackNotFound creates a ServiceBrokerAuthCallbackNotFound with default headers values +func NewServiceBrokerAuthCallbackNotFound() *ServiceBrokerAuthCallbackNotFound { + return &ServiceBrokerAuthCallbackNotFound{} +} + +/* +ServiceBrokerAuthCallbackNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthCallbackNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth callback not found response has a 2xx status code +func (o *ServiceBrokerAuthCallbackNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth callback not found response has a 3xx status code +func (o *ServiceBrokerAuthCallbackNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth callback not found response has a 4xx status code +func (o *ServiceBrokerAuthCallbackNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth callback not found response has a 5xx status code +func (o *ServiceBrokerAuthCallbackNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth callback not found response a status code equal to that given +func (o *ServiceBrokerAuthCallbackNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth callback not found response +func (o *ServiceBrokerAuthCallbackNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthCallbackNotFound) Error() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthCallbackNotFound) String() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthCallbackNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthCallbackNotFound) 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 +} + // NewServiceBrokerAuthCallbackInternalServerError creates a ServiceBrokerAuthCallbackInternalServerError with default headers values func NewServiceBrokerAuthCallbackInternalServerError() *ServiceBrokerAuthCallbackInternalServerError { return &ServiceBrokerAuthCallbackInternalServerError{} diff --git a/power/client/authentication/service_broker_auth_device_code_post_responses.go b/power/client/authentication/service_broker_auth_device_code_post_responses.go index 843690e0..6834f289 100644 --- a/power/client/authentication/service_broker_auth_device_code_post_responses.go +++ b/power/client/authentication/service_broker_auth_device_code_post_responses.go @@ -29,12 +29,30 @@ func (o *ServiceBrokerAuthDeviceCodePostReader) ReadResponse(response runtime.Cl return nil, err } return result, nil + case 400: + result := NewServiceBrokerAuthDeviceCodePostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBrokerAuthDeviceCodePostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewServiceBrokerAuthDeviceCodePostForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 404: + result := NewServiceBrokerAuthDeviceCodePostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerAuthDeviceCodePostInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +132,142 @@ func (o *ServiceBrokerAuthDeviceCodePostOK) readResponse(response runtime.Client return nil } +// NewServiceBrokerAuthDeviceCodePostBadRequest creates a ServiceBrokerAuthDeviceCodePostBadRequest with default headers values +func NewServiceBrokerAuthDeviceCodePostBadRequest() *ServiceBrokerAuthDeviceCodePostBadRequest { + return &ServiceBrokerAuthDeviceCodePostBadRequest{} +} + +/* +ServiceBrokerAuthDeviceCodePostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerAuthDeviceCodePostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth device code post bad request response has a 2xx status code +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device code post bad request response has a 3xx status code +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device code post bad request response has a 4xx status code +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device code post bad request response has a 5xx status code +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device code post bad request response a status code equal to that given +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth device code post bad request response +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) Error() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) String() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthDeviceCodePostBadRequest) 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 +} + +// NewServiceBrokerAuthDeviceCodePostUnauthorized creates a ServiceBrokerAuthDeviceCodePostUnauthorized with default headers values +func NewServiceBrokerAuthDeviceCodePostUnauthorized() *ServiceBrokerAuthDeviceCodePostUnauthorized { + return &ServiceBrokerAuthDeviceCodePostUnauthorized{} +} + +/* +ServiceBrokerAuthDeviceCodePostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerAuthDeviceCodePostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth device code post unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device code post unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device code post unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device code post unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device code post unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth device code post unauthorized response +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) Error() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) String() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthDeviceCodePostUnauthorized) 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 +} + // NewServiceBrokerAuthDeviceCodePostForbidden creates a ServiceBrokerAuthDeviceCodePostForbidden with default headers values func NewServiceBrokerAuthDeviceCodePostForbidden() *ServiceBrokerAuthDeviceCodePostForbidden { return &ServiceBrokerAuthDeviceCodePostForbidden{} @@ -122,7 +276,7 @@ func NewServiceBrokerAuthDeviceCodePostForbidden() *ServiceBrokerAuthDeviceCodeP /* ServiceBrokerAuthDeviceCodePostForbidden describes a response with status code 403, with default header values. -Quota exceeded +Forbidden */ type ServiceBrokerAuthDeviceCodePostForbidden struct { Payload *models.Error @@ -182,6 +336,74 @@ func (o *ServiceBrokerAuthDeviceCodePostForbidden) readResponse(response runtime return nil } +// NewServiceBrokerAuthDeviceCodePostNotFound creates a ServiceBrokerAuthDeviceCodePostNotFound with default headers values +func NewServiceBrokerAuthDeviceCodePostNotFound() *ServiceBrokerAuthDeviceCodePostNotFound { + return &ServiceBrokerAuthDeviceCodePostNotFound{} +} + +/* +ServiceBrokerAuthDeviceCodePostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthDeviceCodePostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth device code post not found response has a 2xx status code +func (o *ServiceBrokerAuthDeviceCodePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device code post not found response has a 3xx status code +func (o *ServiceBrokerAuthDeviceCodePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device code post not found response has a 4xx status code +func (o *ServiceBrokerAuthDeviceCodePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device code post not found response has a 5xx status code +func (o *ServiceBrokerAuthDeviceCodePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device code post not found response a status code equal to that given +func (o *ServiceBrokerAuthDeviceCodePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth device code post not found response +func (o *ServiceBrokerAuthDeviceCodePostNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthDeviceCodePostNotFound) Error() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceCodePostNotFound) String() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceCodePostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthDeviceCodePostNotFound) 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 +} + // NewServiceBrokerAuthDeviceCodePostInternalServerError creates a ServiceBrokerAuthDeviceCodePostInternalServerError with default headers values func NewServiceBrokerAuthDeviceCodePostInternalServerError() *ServiceBrokerAuthDeviceCodePostInternalServerError { return &ServiceBrokerAuthDeviceCodePostInternalServerError{} diff --git a/power/client/authentication/service_broker_auth_device_token_post_responses.go b/power/client/authentication/service_broker_auth_device_token_post_responses.go index 18e114c6..1fe6d724 100644 --- a/power/client/authentication/service_broker_auth_device_token_post_responses.go +++ b/power/client/authentication/service_broker_auth_device_token_post_responses.go @@ -37,12 +37,24 @@ func (o *ServiceBrokerAuthDeviceTokenPostReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 401: + result := NewServiceBrokerAuthDeviceTokenPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewServiceBrokerAuthDeviceTokenPostForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 404: + result := NewServiceBrokerAuthDeviceTokenPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 429: result := NewServiceBrokerAuthDeviceTokenPostTooManyRequests() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -136,7 +148,7 @@ func NewServiceBrokerAuthDeviceTokenPostBadRequest() *ServiceBrokerAuthDeviceTok /* ServiceBrokerAuthDeviceTokenPostBadRequest describes a response with status code 400, with default header values. -Authorization pending +Bad Request */ type ServiceBrokerAuthDeviceTokenPostBadRequest struct { Payload *models.Error @@ -196,6 +208,74 @@ func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) readResponse(response runti return nil } +// NewServiceBrokerAuthDeviceTokenPostUnauthorized creates a ServiceBrokerAuthDeviceTokenPostUnauthorized with default headers values +func NewServiceBrokerAuthDeviceTokenPostUnauthorized() *ServiceBrokerAuthDeviceTokenPostUnauthorized { + return &ServiceBrokerAuthDeviceTokenPostUnauthorized{} +} + +/* +ServiceBrokerAuthDeviceTokenPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerAuthDeviceTokenPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth device token post unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device token post unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device token post unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device token post unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device token post unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth device token post unauthorized response +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) String() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthDeviceTokenPostUnauthorized) 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 +} + // NewServiceBrokerAuthDeviceTokenPostForbidden creates a ServiceBrokerAuthDeviceTokenPostForbidden with default headers values func NewServiceBrokerAuthDeviceTokenPostForbidden() *ServiceBrokerAuthDeviceTokenPostForbidden { return &ServiceBrokerAuthDeviceTokenPostForbidden{} @@ -204,7 +284,7 @@ func NewServiceBrokerAuthDeviceTokenPostForbidden() *ServiceBrokerAuthDeviceToke /* ServiceBrokerAuthDeviceTokenPostForbidden describes a response with status code 403, with default header values. -User refused grant +Forbidden */ type ServiceBrokerAuthDeviceTokenPostForbidden struct { Payload *models.Error @@ -264,6 +344,74 @@ func (o *ServiceBrokerAuthDeviceTokenPostForbidden) readResponse(response runtim return nil } +// NewServiceBrokerAuthDeviceTokenPostNotFound creates a ServiceBrokerAuthDeviceTokenPostNotFound with default headers values +func NewServiceBrokerAuthDeviceTokenPostNotFound() *ServiceBrokerAuthDeviceTokenPostNotFound { + return &ServiceBrokerAuthDeviceTokenPostNotFound{} +} + +/* +ServiceBrokerAuthDeviceTokenPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthDeviceTokenPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth device token post not found response has a 2xx status code +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device token post not found response has a 3xx status code +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device token post not found response has a 4xx status code +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device token post not found response has a 5xx status code +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device token post not found response a status code equal to that given +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth device token post not found response +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) Error() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) String() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthDeviceTokenPostNotFound) 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 +} + // NewServiceBrokerAuthDeviceTokenPostTooManyRequests creates a ServiceBrokerAuthDeviceTokenPostTooManyRequests with default headers values func NewServiceBrokerAuthDeviceTokenPostTooManyRequests() *ServiceBrokerAuthDeviceTokenPostTooManyRequests { return &ServiceBrokerAuthDeviceTokenPostTooManyRequests{} diff --git a/power/client/authentication/service_broker_auth_info_token_responses.go b/power/client/authentication/service_broker_auth_info_token_responses.go index e90f281b..36886cd2 100644 --- a/power/client/authentication/service_broker_auth_info_token_responses.go +++ b/power/client/authentication/service_broker_auth_info_token_responses.go @@ -29,6 +29,30 @@ func (o *ServiceBrokerAuthInfoTokenReader) ReadResponse(response runtime.ClientR return nil, err } return result, nil + case 400: + result := NewServiceBrokerAuthInfoTokenBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBrokerAuthInfoTokenUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerAuthInfoTokenForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerAuthInfoTokenNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerAuthInfoTokenInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -108,6 +132,278 @@ func (o *ServiceBrokerAuthInfoTokenOK) readResponse(response runtime.ClientRespo return nil } +// NewServiceBrokerAuthInfoTokenBadRequest creates a ServiceBrokerAuthInfoTokenBadRequest with default headers values +func NewServiceBrokerAuthInfoTokenBadRequest() *ServiceBrokerAuthInfoTokenBadRequest { + return &ServiceBrokerAuthInfoTokenBadRequest{} +} + +/* +ServiceBrokerAuthInfoTokenBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerAuthInfoTokenBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth info token bad request response has a 2xx status code +func (o *ServiceBrokerAuthInfoTokenBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info token bad request response has a 3xx status code +func (o *ServiceBrokerAuthInfoTokenBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info token bad request response has a 4xx status code +func (o *ServiceBrokerAuthInfoTokenBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth info token bad request response has a 5xx status code +func (o *ServiceBrokerAuthInfoTokenBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info token bad request response a status code equal to that given +func (o *ServiceBrokerAuthInfoTokenBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth info token bad request response +func (o *ServiceBrokerAuthInfoTokenBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerAuthInfoTokenBadRequest) Error() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthInfoTokenBadRequest) String() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthInfoTokenBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthInfoTokenBadRequest) 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 +} + +// NewServiceBrokerAuthInfoTokenUnauthorized creates a ServiceBrokerAuthInfoTokenUnauthorized with default headers values +func NewServiceBrokerAuthInfoTokenUnauthorized() *ServiceBrokerAuthInfoTokenUnauthorized { + return &ServiceBrokerAuthInfoTokenUnauthorized{} +} + +/* +ServiceBrokerAuthInfoTokenUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerAuthInfoTokenUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth info token unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthInfoTokenUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info token unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthInfoTokenUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info token unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthInfoTokenUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth info token unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthInfoTokenUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info token unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthInfoTokenUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth info token unauthorized response +func (o *ServiceBrokerAuthInfoTokenUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerAuthInfoTokenUnauthorized) Error() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthInfoTokenUnauthorized) String() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthInfoTokenUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthInfoTokenUnauthorized) 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 +} + +// NewServiceBrokerAuthInfoTokenForbidden creates a ServiceBrokerAuthInfoTokenForbidden with default headers values +func NewServiceBrokerAuthInfoTokenForbidden() *ServiceBrokerAuthInfoTokenForbidden { + return &ServiceBrokerAuthInfoTokenForbidden{} +} + +/* +ServiceBrokerAuthInfoTokenForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerAuthInfoTokenForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth info token forbidden response has a 2xx status code +func (o *ServiceBrokerAuthInfoTokenForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info token forbidden response has a 3xx status code +func (o *ServiceBrokerAuthInfoTokenForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info token forbidden response has a 4xx status code +func (o *ServiceBrokerAuthInfoTokenForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth info token forbidden response has a 5xx status code +func (o *ServiceBrokerAuthInfoTokenForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info token forbidden response a status code equal to that given +func (o *ServiceBrokerAuthInfoTokenForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth info token forbidden response +func (o *ServiceBrokerAuthInfoTokenForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerAuthInfoTokenForbidden) Error() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthInfoTokenForbidden) String() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthInfoTokenForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthInfoTokenForbidden) 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 +} + +// NewServiceBrokerAuthInfoTokenNotFound creates a ServiceBrokerAuthInfoTokenNotFound with default headers values +func NewServiceBrokerAuthInfoTokenNotFound() *ServiceBrokerAuthInfoTokenNotFound { + return &ServiceBrokerAuthInfoTokenNotFound{} +} + +/* +ServiceBrokerAuthInfoTokenNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthInfoTokenNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth info token not found response has a 2xx status code +func (o *ServiceBrokerAuthInfoTokenNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info token not found response has a 3xx status code +func (o *ServiceBrokerAuthInfoTokenNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info token not found response has a 4xx status code +func (o *ServiceBrokerAuthInfoTokenNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth info token not found response has a 5xx status code +func (o *ServiceBrokerAuthInfoTokenNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info token not found response a status code equal to that given +func (o *ServiceBrokerAuthInfoTokenNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth info token not found response +func (o *ServiceBrokerAuthInfoTokenNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthInfoTokenNotFound) Error() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthInfoTokenNotFound) String() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthInfoTokenNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthInfoTokenNotFound) 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 +} + // NewServiceBrokerAuthInfoTokenInternalServerError creates a ServiceBrokerAuthInfoTokenInternalServerError with default headers values func NewServiceBrokerAuthInfoTokenInternalServerError() *ServiceBrokerAuthInfoTokenInternalServerError { return &ServiceBrokerAuthInfoTokenInternalServerError{} diff --git a/power/client/authentication/service_broker_auth_info_user_responses.go b/power/client/authentication/service_broker_auth_info_user_responses.go index b0169d8b..5fffd210 100644 --- a/power/client/authentication/service_broker_auth_info_user_responses.go +++ b/power/client/authentication/service_broker_auth_info_user_responses.go @@ -29,6 +29,30 @@ func (o *ServiceBrokerAuthInfoUserReader) ReadResponse(response runtime.ClientRe return nil, err } return result, nil + case 400: + result := NewServiceBrokerAuthInfoUserBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBrokerAuthInfoUserUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerAuthInfoUserForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerAuthInfoUserNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerAuthInfoUserInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -108,6 +132,278 @@ func (o *ServiceBrokerAuthInfoUserOK) readResponse(response runtime.ClientRespon return nil } +// NewServiceBrokerAuthInfoUserBadRequest creates a ServiceBrokerAuthInfoUserBadRequest with default headers values +func NewServiceBrokerAuthInfoUserBadRequest() *ServiceBrokerAuthInfoUserBadRequest { + return &ServiceBrokerAuthInfoUserBadRequest{} +} + +/* +ServiceBrokerAuthInfoUserBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerAuthInfoUserBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth info user bad request response has a 2xx status code +func (o *ServiceBrokerAuthInfoUserBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info user bad request response has a 3xx status code +func (o *ServiceBrokerAuthInfoUserBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info user bad request response has a 4xx status code +func (o *ServiceBrokerAuthInfoUserBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth info user bad request response has a 5xx status code +func (o *ServiceBrokerAuthInfoUserBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info user bad request response a status code equal to that given +func (o *ServiceBrokerAuthInfoUserBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth info user bad request response +func (o *ServiceBrokerAuthInfoUserBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerAuthInfoUserBadRequest) Error() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthInfoUserBadRequest) String() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthInfoUserBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthInfoUserBadRequest) 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 +} + +// NewServiceBrokerAuthInfoUserUnauthorized creates a ServiceBrokerAuthInfoUserUnauthorized with default headers values +func NewServiceBrokerAuthInfoUserUnauthorized() *ServiceBrokerAuthInfoUserUnauthorized { + return &ServiceBrokerAuthInfoUserUnauthorized{} +} + +/* +ServiceBrokerAuthInfoUserUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerAuthInfoUserUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth info user unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthInfoUserUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info user unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthInfoUserUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info user unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthInfoUserUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth info user unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthInfoUserUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info user unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthInfoUserUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth info user unauthorized response +func (o *ServiceBrokerAuthInfoUserUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerAuthInfoUserUnauthorized) Error() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthInfoUserUnauthorized) String() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthInfoUserUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthInfoUserUnauthorized) 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 +} + +// NewServiceBrokerAuthInfoUserForbidden creates a ServiceBrokerAuthInfoUserForbidden with default headers values +func NewServiceBrokerAuthInfoUserForbidden() *ServiceBrokerAuthInfoUserForbidden { + return &ServiceBrokerAuthInfoUserForbidden{} +} + +/* +ServiceBrokerAuthInfoUserForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerAuthInfoUserForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth info user forbidden response has a 2xx status code +func (o *ServiceBrokerAuthInfoUserForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info user forbidden response has a 3xx status code +func (o *ServiceBrokerAuthInfoUserForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info user forbidden response has a 4xx status code +func (o *ServiceBrokerAuthInfoUserForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth info user forbidden response has a 5xx status code +func (o *ServiceBrokerAuthInfoUserForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info user forbidden response a status code equal to that given +func (o *ServiceBrokerAuthInfoUserForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth info user forbidden response +func (o *ServiceBrokerAuthInfoUserForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerAuthInfoUserForbidden) Error() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthInfoUserForbidden) String() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthInfoUserForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthInfoUserForbidden) 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 +} + +// NewServiceBrokerAuthInfoUserNotFound creates a ServiceBrokerAuthInfoUserNotFound with default headers values +func NewServiceBrokerAuthInfoUserNotFound() *ServiceBrokerAuthInfoUserNotFound { + return &ServiceBrokerAuthInfoUserNotFound{} +} + +/* +ServiceBrokerAuthInfoUserNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthInfoUserNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth info user not found response has a 2xx status code +func (o *ServiceBrokerAuthInfoUserNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info user not found response has a 3xx status code +func (o *ServiceBrokerAuthInfoUserNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info user not found response has a 4xx status code +func (o *ServiceBrokerAuthInfoUserNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth info user not found response has a 5xx status code +func (o *ServiceBrokerAuthInfoUserNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info user not found response a status code equal to that given +func (o *ServiceBrokerAuthInfoUserNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth info user not found response +func (o *ServiceBrokerAuthInfoUserNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthInfoUserNotFound) Error() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthInfoUserNotFound) String() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthInfoUserNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthInfoUserNotFound) 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 +} + // NewServiceBrokerAuthInfoUserInternalServerError creates a ServiceBrokerAuthInfoUserInternalServerError with default headers values func NewServiceBrokerAuthInfoUserInternalServerError() *ServiceBrokerAuthInfoUserInternalServerError { return &ServiceBrokerAuthInfoUserInternalServerError{} diff --git a/power/client/authentication/service_broker_auth_login_responses.go b/power/client/authentication/service_broker_auth_login_responses.go index fd092b20..7500d6e1 100644 --- a/power/client/authentication/service_broker_auth_login_responses.go +++ b/power/client/authentication/service_broker_auth_login_responses.go @@ -29,12 +29,30 @@ func (o *ServiceBrokerAuthLoginReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil + case 400: + result := NewServiceBrokerAuthLoginBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewServiceBrokerAuthLoginUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 403: + result := NewServiceBrokerAuthLoginForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerAuthLoginNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerAuthLoginInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +132,74 @@ func (o *ServiceBrokerAuthLoginOK) readResponse(response runtime.ClientResponse, return nil } +// NewServiceBrokerAuthLoginBadRequest creates a ServiceBrokerAuthLoginBadRequest with default headers values +func NewServiceBrokerAuthLoginBadRequest() *ServiceBrokerAuthLoginBadRequest { + return &ServiceBrokerAuthLoginBadRequest{} +} + +/* +ServiceBrokerAuthLoginBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerAuthLoginBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth login bad request response has a 2xx status code +func (o *ServiceBrokerAuthLoginBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth login bad request response has a 3xx status code +func (o *ServiceBrokerAuthLoginBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth login bad request response has a 4xx status code +func (o *ServiceBrokerAuthLoginBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth login bad request response has a 5xx status code +func (o *ServiceBrokerAuthLoginBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth login bad request response a status code equal to that given +func (o *ServiceBrokerAuthLoginBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth login bad request response +func (o *ServiceBrokerAuthLoginBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerAuthLoginBadRequest) Error() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthLoginBadRequest) String() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthLoginBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthLoginBadRequest) 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 +} + // NewServiceBrokerAuthLoginUnauthorized creates a ServiceBrokerAuthLoginUnauthorized with default headers values func NewServiceBrokerAuthLoginUnauthorized() *ServiceBrokerAuthLoginUnauthorized { return &ServiceBrokerAuthLoginUnauthorized{} @@ -182,6 +268,142 @@ func (o *ServiceBrokerAuthLoginUnauthorized) readResponse(response runtime.Clien return nil } +// NewServiceBrokerAuthLoginForbidden creates a ServiceBrokerAuthLoginForbidden with default headers values +func NewServiceBrokerAuthLoginForbidden() *ServiceBrokerAuthLoginForbidden { + return &ServiceBrokerAuthLoginForbidden{} +} + +/* +ServiceBrokerAuthLoginForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerAuthLoginForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth login forbidden response has a 2xx status code +func (o *ServiceBrokerAuthLoginForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth login forbidden response has a 3xx status code +func (o *ServiceBrokerAuthLoginForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth login forbidden response has a 4xx status code +func (o *ServiceBrokerAuthLoginForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth login forbidden response has a 5xx status code +func (o *ServiceBrokerAuthLoginForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth login forbidden response a status code equal to that given +func (o *ServiceBrokerAuthLoginForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth login forbidden response +func (o *ServiceBrokerAuthLoginForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerAuthLoginForbidden) Error() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthLoginForbidden) String() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthLoginForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthLoginForbidden) 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 +} + +// NewServiceBrokerAuthLoginNotFound creates a ServiceBrokerAuthLoginNotFound with default headers values +func NewServiceBrokerAuthLoginNotFound() *ServiceBrokerAuthLoginNotFound { + return &ServiceBrokerAuthLoginNotFound{} +} + +/* +ServiceBrokerAuthLoginNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthLoginNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth login not found response has a 2xx status code +func (o *ServiceBrokerAuthLoginNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth login not found response has a 3xx status code +func (o *ServiceBrokerAuthLoginNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth login not found response has a 4xx status code +func (o *ServiceBrokerAuthLoginNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth login not found response has a 5xx status code +func (o *ServiceBrokerAuthLoginNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth login not found response a status code equal to that given +func (o *ServiceBrokerAuthLoginNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth login not found response +func (o *ServiceBrokerAuthLoginNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthLoginNotFound) Error() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthLoginNotFound) String() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthLoginNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthLoginNotFound) 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 +} + // NewServiceBrokerAuthLoginInternalServerError creates a ServiceBrokerAuthLoginInternalServerError with default headers values func NewServiceBrokerAuthLoginInternalServerError() *ServiceBrokerAuthLoginInternalServerError { return &ServiceBrokerAuthLoginInternalServerError{} diff --git a/power/client/authentication/service_broker_auth_logout_responses.go b/power/client/authentication/service_broker_auth_logout_responses.go index 9d8151b1..d1ef9e2c 100644 --- a/power/client/authentication/service_broker_auth_logout_responses.go +++ b/power/client/authentication/service_broker_auth_logout_responses.go @@ -29,6 +29,30 @@ func (o *ServiceBrokerAuthLogoutReader) ReadResponse(response runtime.ClientResp return nil, err } return result, nil + case 400: + result := NewServiceBrokerAuthLogoutBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBrokerAuthLogoutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerAuthLogoutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerAuthLogoutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerAuthLogoutInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -106,6 +130,278 @@ func (o *ServiceBrokerAuthLogoutOK) readResponse(response runtime.ClientResponse return nil } +// NewServiceBrokerAuthLogoutBadRequest creates a ServiceBrokerAuthLogoutBadRequest with default headers values +func NewServiceBrokerAuthLogoutBadRequest() *ServiceBrokerAuthLogoutBadRequest { + return &ServiceBrokerAuthLogoutBadRequest{} +} + +/* +ServiceBrokerAuthLogoutBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerAuthLogoutBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth logout bad request response has a 2xx status code +func (o *ServiceBrokerAuthLogoutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth logout bad request response has a 3xx status code +func (o *ServiceBrokerAuthLogoutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth logout bad request response has a 4xx status code +func (o *ServiceBrokerAuthLogoutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth logout bad request response has a 5xx status code +func (o *ServiceBrokerAuthLogoutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth logout bad request response a status code equal to that given +func (o *ServiceBrokerAuthLogoutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth logout bad request response +func (o *ServiceBrokerAuthLogoutBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerAuthLogoutBadRequest) Error() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthLogoutBadRequest) String() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthLogoutBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthLogoutBadRequest) 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 +} + +// NewServiceBrokerAuthLogoutUnauthorized creates a ServiceBrokerAuthLogoutUnauthorized with default headers values +func NewServiceBrokerAuthLogoutUnauthorized() *ServiceBrokerAuthLogoutUnauthorized { + return &ServiceBrokerAuthLogoutUnauthorized{} +} + +/* +ServiceBrokerAuthLogoutUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerAuthLogoutUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth logout unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthLogoutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth logout unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthLogoutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth logout unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthLogoutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth logout unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthLogoutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth logout unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthLogoutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth logout unauthorized response +func (o *ServiceBrokerAuthLogoutUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerAuthLogoutUnauthorized) Error() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthLogoutUnauthorized) String() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthLogoutUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthLogoutUnauthorized) 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 +} + +// NewServiceBrokerAuthLogoutForbidden creates a ServiceBrokerAuthLogoutForbidden with default headers values +func NewServiceBrokerAuthLogoutForbidden() *ServiceBrokerAuthLogoutForbidden { + return &ServiceBrokerAuthLogoutForbidden{} +} + +/* +ServiceBrokerAuthLogoutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerAuthLogoutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth logout forbidden response has a 2xx status code +func (o *ServiceBrokerAuthLogoutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth logout forbidden response has a 3xx status code +func (o *ServiceBrokerAuthLogoutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth logout forbidden response has a 4xx status code +func (o *ServiceBrokerAuthLogoutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth logout forbidden response has a 5xx status code +func (o *ServiceBrokerAuthLogoutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth logout forbidden response a status code equal to that given +func (o *ServiceBrokerAuthLogoutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth logout forbidden response +func (o *ServiceBrokerAuthLogoutForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerAuthLogoutForbidden) Error() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthLogoutForbidden) String() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthLogoutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthLogoutForbidden) 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 +} + +// NewServiceBrokerAuthLogoutNotFound creates a ServiceBrokerAuthLogoutNotFound with default headers values +func NewServiceBrokerAuthLogoutNotFound() *ServiceBrokerAuthLogoutNotFound { + return &ServiceBrokerAuthLogoutNotFound{} +} + +/* +ServiceBrokerAuthLogoutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthLogoutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth logout not found response has a 2xx status code +func (o *ServiceBrokerAuthLogoutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth logout not found response has a 3xx status code +func (o *ServiceBrokerAuthLogoutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth logout not found response has a 4xx status code +func (o *ServiceBrokerAuthLogoutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth logout not found response has a 5xx status code +func (o *ServiceBrokerAuthLogoutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth logout not found response a status code equal to that given +func (o *ServiceBrokerAuthLogoutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth logout not found response +func (o *ServiceBrokerAuthLogoutNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthLogoutNotFound) Error() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthLogoutNotFound) String() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthLogoutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthLogoutNotFound) 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 +} + // NewServiceBrokerAuthLogoutInternalServerError creates a ServiceBrokerAuthLogoutInternalServerError with default headers values func NewServiceBrokerAuthLogoutInternalServerError() *ServiceBrokerAuthLogoutInternalServerError { return &ServiceBrokerAuthLogoutInternalServerError{} diff --git a/power/client/authentication/service_broker_auth_registration_callback_responses.go b/power/client/authentication/service_broker_auth_registration_callback_responses.go index 325826f3..2833807d 100644 --- a/power/client/authentication/service_broker_auth_registration_callback_responses.go +++ b/power/client/authentication/service_broker_auth_registration_callback_responses.go @@ -29,12 +29,30 @@ func (o *ServiceBrokerAuthRegistrationCallbackReader) ReadResponse(response runt return nil, err } return result, nil + case 400: + result := NewServiceBrokerAuthRegistrationCallbackBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewServiceBrokerAuthRegistrationCallbackUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 403: + result := NewServiceBrokerAuthRegistrationCallbackForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerAuthRegistrationCallbackNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerAuthRegistrationCallbackInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +132,74 @@ func (o *ServiceBrokerAuthRegistrationCallbackOK) readResponse(response runtime. return nil } +// NewServiceBrokerAuthRegistrationCallbackBadRequest creates a ServiceBrokerAuthRegistrationCallbackBadRequest with default headers values +func NewServiceBrokerAuthRegistrationCallbackBadRequest() *ServiceBrokerAuthRegistrationCallbackBadRequest { + return &ServiceBrokerAuthRegistrationCallbackBadRequest{} +} + +/* +ServiceBrokerAuthRegistrationCallbackBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerAuthRegistrationCallbackBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth registration callback bad request response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration callback bad request response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration callback bad request response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth registration callback bad request response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration callback bad request response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth registration callback bad request response +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) Error() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) String() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthRegistrationCallbackBadRequest) 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 +} + // NewServiceBrokerAuthRegistrationCallbackUnauthorized creates a ServiceBrokerAuthRegistrationCallbackUnauthorized with default headers values func NewServiceBrokerAuthRegistrationCallbackUnauthorized() *ServiceBrokerAuthRegistrationCallbackUnauthorized { return &ServiceBrokerAuthRegistrationCallbackUnauthorized{} @@ -182,6 +268,142 @@ func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) readResponse(respons return nil } +// NewServiceBrokerAuthRegistrationCallbackForbidden creates a ServiceBrokerAuthRegistrationCallbackForbidden with default headers values +func NewServiceBrokerAuthRegistrationCallbackForbidden() *ServiceBrokerAuthRegistrationCallbackForbidden { + return &ServiceBrokerAuthRegistrationCallbackForbidden{} +} + +/* +ServiceBrokerAuthRegistrationCallbackForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerAuthRegistrationCallbackForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth registration callback forbidden response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration callback forbidden response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration callback forbidden response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth registration callback forbidden response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration callback forbidden response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth registration callback forbidden response +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) Error() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) String() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthRegistrationCallbackForbidden) 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 +} + +// NewServiceBrokerAuthRegistrationCallbackNotFound creates a ServiceBrokerAuthRegistrationCallbackNotFound with default headers values +func NewServiceBrokerAuthRegistrationCallbackNotFound() *ServiceBrokerAuthRegistrationCallbackNotFound { + return &ServiceBrokerAuthRegistrationCallbackNotFound{} +} + +/* +ServiceBrokerAuthRegistrationCallbackNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthRegistrationCallbackNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth registration callback not found response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration callback not found response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration callback not found response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth registration callback not found response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration callback not found response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth registration callback not found response +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) Error() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) String() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthRegistrationCallbackNotFound) 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 +} + // NewServiceBrokerAuthRegistrationCallbackInternalServerError creates a ServiceBrokerAuthRegistrationCallbackInternalServerError with default headers values func NewServiceBrokerAuthRegistrationCallbackInternalServerError() *ServiceBrokerAuthRegistrationCallbackInternalServerError { return &ServiceBrokerAuthRegistrationCallbackInternalServerError{} diff --git a/power/client/authentication/service_broker_auth_registration_responses.go b/power/client/authentication/service_broker_auth_registration_responses.go index de0a772e..48a0f28c 100644 --- a/power/client/authentication/service_broker_auth_registration_responses.go +++ b/power/client/authentication/service_broker_auth_registration_responses.go @@ -29,12 +29,30 @@ func (o *ServiceBrokerAuthRegistrationReader) ReadResponse(response runtime.Clie return nil, err } return result, nil + case 400: + result := NewServiceBrokerAuthRegistrationBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewServiceBrokerAuthRegistrationUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 403: + result := NewServiceBrokerAuthRegistrationForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerAuthRegistrationNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerAuthRegistrationInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -114,6 +132,74 @@ func (o *ServiceBrokerAuthRegistrationOK) readResponse(response runtime.ClientRe return nil } +// NewServiceBrokerAuthRegistrationBadRequest creates a ServiceBrokerAuthRegistrationBadRequest with default headers values +func NewServiceBrokerAuthRegistrationBadRequest() *ServiceBrokerAuthRegistrationBadRequest { + return &ServiceBrokerAuthRegistrationBadRequest{} +} + +/* +ServiceBrokerAuthRegistrationBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerAuthRegistrationBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth registration bad request response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration bad request response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration bad request response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth registration bad request response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration bad request response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth registration bad request response +func (o *ServiceBrokerAuthRegistrationBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerAuthRegistrationBadRequest) Error() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationBadRequest) String() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthRegistrationBadRequest) 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 +} + // NewServiceBrokerAuthRegistrationUnauthorized creates a ServiceBrokerAuthRegistrationUnauthorized with default headers values func NewServiceBrokerAuthRegistrationUnauthorized() *ServiceBrokerAuthRegistrationUnauthorized { return &ServiceBrokerAuthRegistrationUnauthorized{} @@ -182,6 +268,142 @@ func (o *ServiceBrokerAuthRegistrationUnauthorized) readResponse(response runtim return nil } +// NewServiceBrokerAuthRegistrationForbidden creates a ServiceBrokerAuthRegistrationForbidden with default headers values +func NewServiceBrokerAuthRegistrationForbidden() *ServiceBrokerAuthRegistrationForbidden { + return &ServiceBrokerAuthRegistrationForbidden{} +} + +/* +ServiceBrokerAuthRegistrationForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerAuthRegistrationForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth registration forbidden response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration forbidden response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration forbidden response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth registration forbidden response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration forbidden response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth registration forbidden response +func (o *ServiceBrokerAuthRegistrationForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerAuthRegistrationForbidden) Error() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationForbidden) String() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthRegistrationForbidden) 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 +} + +// NewServiceBrokerAuthRegistrationNotFound creates a ServiceBrokerAuthRegistrationNotFound with default headers values +func NewServiceBrokerAuthRegistrationNotFound() *ServiceBrokerAuthRegistrationNotFound { + return &ServiceBrokerAuthRegistrationNotFound{} +} + +/* +ServiceBrokerAuthRegistrationNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthRegistrationNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth registration not found response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration not found response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration not found response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth registration not found response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration not found response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth registration not found response +func (o *ServiceBrokerAuthRegistrationNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthRegistrationNotFound) Error() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationNotFound) String() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthRegistrationNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthRegistrationNotFound) 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 +} + // NewServiceBrokerAuthRegistrationInternalServerError creates a ServiceBrokerAuthRegistrationInternalServerError with default headers values func NewServiceBrokerAuthRegistrationInternalServerError() *ServiceBrokerAuthRegistrationInternalServerError { return &ServiceBrokerAuthRegistrationInternalServerError{} diff --git a/power/client/authentication/service_broker_auth_token_post_responses.go b/power/client/authentication/service_broker_auth_token_post_responses.go index 647bf079..dd493095 100644 --- a/power/client/authentication/service_broker_auth_token_post_responses.go +++ b/power/client/authentication/service_broker_auth_token_post_responses.go @@ -35,12 +35,24 @@ func (o *ServiceBrokerAuthTokenPostReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 401: + result := NewServiceBrokerAuthTokenPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewServiceBrokerAuthTokenPostForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 404: + result := NewServiceBrokerAuthTokenPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 429: result := NewServiceBrokerAuthTokenPostTooManyRequests() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -134,7 +146,7 @@ func NewServiceBrokerAuthTokenPostBadRequest() *ServiceBrokerAuthTokenPostBadReq /* ServiceBrokerAuthTokenPostBadRequest describes a response with status code 400, with default header values. -Authorization pending +Bad Request */ type ServiceBrokerAuthTokenPostBadRequest struct { Payload *models.Error @@ -194,6 +206,74 @@ func (o *ServiceBrokerAuthTokenPostBadRequest) readResponse(response runtime.Cli return nil } +// NewServiceBrokerAuthTokenPostUnauthorized creates a ServiceBrokerAuthTokenPostUnauthorized with default headers values +func NewServiceBrokerAuthTokenPostUnauthorized() *ServiceBrokerAuthTokenPostUnauthorized { + return &ServiceBrokerAuthTokenPostUnauthorized{} +} + +/* +ServiceBrokerAuthTokenPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerAuthTokenPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth token post unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthTokenPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth token post unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthTokenPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth token post unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthTokenPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth token post unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthTokenPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth token post unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthTokenPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth token post unauthorized response +func (o *ServiceBrokerAuthTokenPostUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerAuthTokenPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthTokenPostUnauthorized) String() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerAuthTokenPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthTokenPostUnauthorized) 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 +} + // NewServiceBrokerAuthTokenPostForbidden creates a ServiceBrokerAuthTokenPostForbidden with default headers values func NewServiceBrokerAuthTokenPostForbidden() *ServiceBrokerAuthTokenPostForbidden { return &ServiceBrokerAuthTokenPostForbidden{} @@ -202,7 +282,7 @@ func NewServiceBrokerAuthTokenPostForbidden() *ServiceBrokerAuthTokenPostForbidd /* ServiceBrokerAuthTokenPostForbidden describes a response with status code 403, with default header values. -User refused grant +Forbidden */ type ServiceBrokerAuthTokenPostForbidden struct { Payload *models.Error @@ -262,6 +342,74 @@ func (o *ServiceBrokerAuthTokenPostForbidden) readResponse(response runtime.Clie return nil } +// NewServiceBrokerAuthTokenPostNotFound creates a ServiceBrokerAuthTokenPostNotFound with default headers values +func NewServiceBrokerAuthTokenPostNotFound() *ServiceBrokerAuthTokenPostNotFound { + return &ServiceBrokerAuthTokenPostNotFound{} +} + +/* +ServiceBrokerAuthTokenPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerAuthTokenPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker auth token post not found response has a 2xx status code +func (o *ServiceBrokerAuthTokenPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth token post not found response has a 3xx status code +func (o *ServiceBrokerAuthTokenPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth token post not found response has a 4xx status code +func (o *ServiceBrokerAuthTokenPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth token post not found response has a 5xx status code +func (o *ServiceBrokerAuthTokenPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth token post not found response a status code equal to that given +func (o *ServiceBrokerAuthTokenPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker auth token post not found response +func (o *ServiceBrokerAuthTokenPostNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerAuthTokenPostNotFound) Error() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthTokenPostNotFound) String() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerAuthTokenPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerAuthTokenPostNotFound) 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 +} + // NewServiceBrokerAuthTokenPostTooManyRequests creates a ServiceBrokerAuthTokenPostTooManyRequests with default headers values func NewServiceBrokerAuthTokenPostTooManyRequests() *ServiceBrokerAuthTokenPostTooManyRequests { return &ServiceBrokerAuthTokenPostTooManyRequests{} diff --git a/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go b/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go index 77228dae..27f9fd56 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go +++ b/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go @@ -35,6 +35,24 @@ func (o *BluemixServiceInstanceGetReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 401: + result := NewBluemixServiceInstanceGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBluemixServiceInstanceGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBluemixServiceInstanceGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[GET /bluemix_v1/service_instances/{instance_id}] bluemix.serviceInstance.get", response, response.Code()) } @@ -175,3 +193,207 @@ func (o *BluemixServiceInstanceGetBadRequest) readResponse(response runtime.Clie return nil } + +// NewBluemixServiceInstanceGetUnauthorized creates a BluemixServiceInstanceGetUnauthorized with default headers values +func NewBluemixServiceInstanceGetUnauthorized() *BluemixServiceInstanceGetUnauthorized { + return &BluemixServiceInstanceGetUnauthorized{} +} + +/* +BluemixServiceInstanceGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BluemixServiceInstanceGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this bluemix service instance get unauthorized response has a 2xx status code +func (o *BluemixServiceInstanceGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bluemix service instance get unauthorized response has a 3xx status code +func (o *BluemixServiceInstanceGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance get unauthorized response has a 4xx status code +func (o *BluemixServiceInstanceGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bluemix service instance get unauthorized response has a 5xx status code +func (o *BluemixServiceInstanceGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance get unauthorized response a status code equal to that given +func (o *BluemixServiceInstanceGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bluemix service instance get unauthorized response +func (o *BluemixServiceInstanceGetUnauthorized) Code() int { + return 401 +} + +func (o *BluemixServiceInstanceGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetUnauthorized %+v", 401, o.Payload) +} + +func (o *BluemixServiceInstanceGetUnauthorized) String() string { + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetUnauthorized %+v", 401, o.Payload) +} + +func (o *BluemixServiceInstanceGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *BluemixServiceInstanceGetUnauthorized) 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 +} + +// NewBluemixServiceInstanceGetForbidden creates a BluemixServiceInstanceGetForbidden with default headers values +func NewBluemixServiceInstanceGetForbidden() *BluemixServiceInstanceGetForbidden { + return &BluemixServiceInstanceGetForbidden{} +} + +/* +BluemixServiceInstanceGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type BluemixServiceInstanceGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this bluemix service instance get forbidden response has a 2xx status code +func (o *BluemixServiceInstanceGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bluemix service instance get forbidden response has a 3xx status code +func (o *BluemixServiceInstanceGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance get forbidden response has a 4xx status code +func (o *BluemixServiceInstanceGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bluemix service instance get forbidden response has a 5xx status code +func (o *BluemixServiceInstanceGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance get forbidden response a status code equal to that given +func (o *BluemixServiceInstanceGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bluemix service instance get forbidden response +func (o *BluemixServiceInstanceGetForbidden) Code() int { + return 403 +} + +func (o *BluemixServiceInstanceGetForbidden) Error() string { + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetForbidden %+v", 403, o.Payload) +} + +func (o *BluemixServiceInstanceGetForbidden) String() string { + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetForbidden %+v", 403, o.Payload) +} + +func (o *BluemixServiceInstanceGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *BluemixServiceInstanceGetForbidden) 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 +} + +// NewBluemixServiceInstanceGetNotFound creates a BluemixServiceInstanceGetNotFound with default headers values +func NewBluemixServiceInstanceGetNotFound() *BluemixServiceInstanceGetNotFound { + return &BluemixServiceInstanceGetNotFound{} +} + +/* +BluemixServiceInstanceGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BluemixServiceInstanceGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this bluemix service instance get not found response has a 2xx status code +func (o *BluemixServiceInstanceGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bluemix service instance get not found response has a 3xx status code +func (o *BluemixServiceInstanceGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance get not found response has a 4xx status code +func (o *BluemixServiceInstanceGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bluemix service instance get not found response has a 5xx status code +func (o *BluemixServiceInstanceGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance get not found response a status code equal to that given +func (o *BluemixServiceInstanceGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bluemix service instance get not found response +func (o *BluemixServiceInstanceGetNotFound) Code() int { + return 404 +} + +func (o *BluemixServiceInstanceGetNotFound) Error() string { + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetNotFound %+v", 404, o.Payload) +} + +func (o *BluemixServiceInstanceGetNotFound) String() string { + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetNotFound %+v", 404, o.Payload) +} + +func (o *BluemixServiceInstanceGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *BluemixServiceInstanceGetNotFound) 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/bluemix_service_instances/bluemix_service_instance_put_responses.go b/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go index 8249747e..1145f9fd 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go +++ b/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go @@ -35,6 +35,24 @@ func (o *BluemixServiceInstancePutReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 401: + result := NewBluemixServiceInstancePutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewBluemixServiceInstancePutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBluemixServiceInstancePutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[PUT /bluemix_v1/service_instances/{instance_id}] bluemix.serviceInstance.put", response, response.Code()) } @@ -175,3 +193,207 @@ func (o *BluemixServiceInstancePutBadRequest) readResponse(response runtime.Clie return nil } + +// NewBluemixServiceInstancePutUnauthorized creates a BluemixServiceInstancePutUnauthorized with default headers values +func NewBluemixServiceInstancePutUnauthorized() *BluemixServiceInstancePutUnauthorized { + return &BluemixServiceInstancePutUnauthorized{} +} + +/* +BluemixServiceInstancePutUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type BluemixServiceInstancePutUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this bluemix service instance put unauthorized response has a 2xx status code +func (o *BluemixServiceInstancePutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bluemix service instance put unauthorized response has a 3xx status code +func (o *BluemixServiceInstancePutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance put unauthorized response has a 4xx status code +func (o *BluemixServiceInstancePutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this bluemix service instance put unauthorized response has a 5xx status code +func (o *BluemixServiceInstancePutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance put unauthorized response a status code equal to that given +func (o *BluemixServiceInstancePutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the bluemix service instance put unauthorized response +func (o *BluemixServiceInstancePutUnauthorized) Code() int { + return 401 +} + +func (o *BluemixServiceInstancePutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutUnauthorized %+v", 401, o.Payload) +} + +func (o *BluemixServiceInstancePutUnauthorized) String() string { + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutUnauthorized %+v", 401, o.Payload) +} + +func (o *BluemixServiceInstancePutUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *BluemixServiceInstancePutUnauthorized) 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 +} + +// NewBluemixServiceInstancePutForbidden creates a BluemixServiceInstancePutForbidden with default headers values +func NewBluemixServiceInstancePutForbidden() *BluemixServiceInstancePutForbidden { + return &BluemixServiceInstancePutForbidden{} +} + +/* +BluemixServiceInstancePutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type BluemixServiceInstancePutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this bluemix service instance put forbidden response has a 2xx status code +func (o *BluemixServiceInstancePutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bluemix service instance put forbidden response has a 3xx status code +func (o *BluemixServiceInstancePutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance put forbidden response has a 4xx status code +func (o *BluemixServiceInstancePutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this bluemix service instance put forbidden response has a 5xx status code +func (o *BluemixServiceInstancePutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance put forbidden response a status code equal to that given +func (o *BluemixServiceInstancePutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the bluemix service instance put forbidden response +func (o *BluemixServiceInstancePutForbidden) Code() int { + return 403 +} + +func (o *BluemixServiceInstancePutForbidden) Error() string { + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutForbidden %+v", 403, o.Payload) +} + +func (o *BluemixServiceInstancePutForbidden) String() string { + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutForbidden %+v", 403, o.Payload) +} + +func (o *BluemixServiceInstancePutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *BluemixServiceInstancePutForbidden) 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 +} + +// NewBluemixServiceInstancePutNotFound creates a BluemixServiceInstancePutNotFound with default headers values +func NewBluemixServiceInstancePutNotFound() *BluemixServiceInstancePutNotFound { + return &BluemixServiceInstancePutNotFound{} +} + +/* +BluemixServiceInstancePutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type BluemixServiceInstancePutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this bluemix service instance put not found response has a 2xx status code +func (o *BluemixServiceInstancePutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bluemix service instance put not found response has a 3xx status code +func (o *BluemixServiceInstancePutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance put not found response has a 4xx status code +func (o *BluemixServiceInstancePutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this bluemix service instance put not found response has a 5xx status code +func (o *BluemixServiceInstancePutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance put not found response a status code equal to that given +func (o *BluemixServiceInstancePutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the bluemix service instance put not found response +func (o *BluemixServiceInstancePutNotFound) Code() int { + return 404 +} + +func (o *BluemixServiceInstancePutNotFound) Error() string { + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutNotFound %+v", 404, o.Payload) +} + +func (o *BluemixServiceInstancePutNotFound) String() string { + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutNotFound %+v", 404, o.Payload) +} + +func (o *BluemixServiceInstancePutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *BluemixServiceInstancePutNotFound) 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/catalog/catalog_get_responses.go b/power/client/catalog/catalog_get_responses.go index 9a86f59f..f5845626 100644 --- a/power/client/catalog/catalog_get_responses.go +++ b/power/client/catalog/catalog_get_responses.go @@ -29,6 +29,30 @@ func (o *CatalogGetReader) ReadResponse(response runtime.ClientResponse, consume return nil, err } return result, nil + case 400: + result := NewCatalogGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewCatalogGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewCatalogGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewCatalogGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[GET /v2/catalog] catalog.get", response, response.Code()) } @@ -101,3 +125,275 @@ func (o *CatalogGetOK) readResponse(response runtime.ClientResponse, consumer ru return nil } + +// NewCatalogGetBadRequest creates a CatalogGetBadRequest with default headers values +func NewCatalogGetBadRequest() *CatalogGetBadRequest { + return &CatalogGetBadRequest{} +} + +/* +CatalogGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type CatalogGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this catalog get bad request response has a 2xx status code +func (o *CatalogGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this catalog get bad request response has a 3xx status code +func (o *CatalogGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this catalog get bad request response has a 4xx status code +func (o *CatalogGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this catalog get bad request response has a 5xx status code +func (o *CatalogGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this catalog get bad request response a status code equal to that given +func (o *CatalogGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the catalog get bad request response +func (o *CatalogGetBadRequest) Code() int { + return 400 +} + +func (o *CatalogGetBadRequest) Error() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetBadRequest %+v", 400, o.Payload) +} + +func (o *CatalogGetBadRequest) String() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetBadRequest %+v", 400, o.Payload) +} + +func (o *CatalogGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *CatalogGetBadRequest) 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 +} + +// NewCatalogGetUnauthorized creates a CatalogGetUnauthorized with default headers values +func NewCatalogGetUnauthorized() *CatalogGetUnauthorized { + return &CatalogGetUnauthorized{} +} + +/* +CatalogGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type CatalogGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this catalog get unauthorized response has a 2xx status code +func (o *CatalogGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this catalog get unauthorized response has a 3xx status code +func (o *CatalogGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this catalog get unauthorized response has a 4xx status code +func (o *CatalogGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this catalog get unauthorized response has a 5xx status code +func (o *CatalogGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this catalog get unauthorized response a status code equal to that given +func (o *CatalogGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the catalog get unauthorized response +func (o *CatalogGetUnauthorized) Code() int { + return 401 +} + +func (o *CatalogGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetUnauthorized %+v", 401, o.Payload) +} + +func (o *CatalogGetUnauthorized) String() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetUnauthorized %+v", 401, o.Payload) +} + +func (o *CatalogGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *CatalogGetUnauthorized) 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 +} + +// NewCatalogGetForbidden creates a CatalogGetForbidden with default headers values +func NewCatalogGetForbidden() *CatalogGetForbidden { + return &CatalogGetForbidden{} +} + +/* +CatalogGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type CatalogGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this catalog get forbidden response has a 2xx status code +func (o *CatalogGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this catalog get forbidden response has a 3xx status code +func (o *CatalogGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this catalog get forbidden response has a 4xx status code +func (o *CatalogGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this catalog get forbidden response has a 5xx status code +func (o *CatalogGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this catalog get forbidden response a status code equal to that given +func (o *CatalogGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the catalog get forbidden response +func (o *CatalogGetForbidden) Code() int { + return 403 +} + +func (o *CatalogGetForbidden) Error() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetForbidden %+v", 403, o.Payload) +} + +func (o *CatalogGetForbidden) String() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetForbidden %+v", 403, o.Payload) +} + +func (o *CatalogGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *CatalogGetForbidden) 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 +} + +// NewCatalogGetNotFound creates a CatalogGetNotFound with default headers values +func NewCatalogGetNotFound() *CatalogGetNotFound { + return &CatalogGetNotFound{} +} + +/* +CatalogGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type CatalogGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this catalog get not found response has a 2xx status code +func (o *CatalogGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this catalog get not found response has a 3xx status code +func (o *CatalogGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this catalog get not found response has a 4xx status code +func (o *CatalogGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this catalog get not found response has a 5xx status code +func (o *CatalogGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this catalog get not found response a status code equal to that given +func (o *CatalogGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the catalog get not found response +func (o *CatalogGetNotFound) Code() int { + return 404 +} + +func (o *CatalogGetNotFound) Error() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetNotFound %+v", 404, o.Payload) +} + +func (o *CatalogGetNotFound) String() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetNotFound %+v", 404, o.Payload) +} + +func (o *CatalogGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *CatalogGetNotFound) 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/hardware_platforms/service_broker_hardwareplatforms_get_responses.go b/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go index 6c13869b..d9573a44 100644 --- a/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go +++ b/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go @@ -29,6 +29,30 @@ func (o *ServiceBrokerHardwareplatformsGetReader) ReadResponse(response runtime. return nil, err } return result, nil + case 400: + result := NewServiceBrokerHardwareplatformsGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBrokerHardwareplatformsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerHardwareplatformsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerHardwareplatformsGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerHardwareplatformsGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -106,6 +130,278 @@ func (o *ServiceBrokerHardwareplatformsGetOK) readResponse(response runtime.Clie return nil } +// NewServiceBrokerHardwareplatformsGetBadRequest creates a ServiceBrokerHardwareplatformsGetBadRequest with default headers values +func NewServiceBrokerHardwareplatformsGetBadRequest() *ServiceBrokerHardwareplatformsGetBadRequest { + return &ServiceBrokerHardwareplatformsGetBadRequest{} +} + +/* +ServiceBrokerHardwareplatformsGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerHardwareplatformsGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker hardwareplatforms get bad request response has a 2xx status code +func (o *ServiceBrokerHardwareplatformsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker hardwareplatforms get bad request response has a 3xx status code +func (o *ServiceBrokerHardwareplatformsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker hardwareplatforms get bad request response has a 4xx status code +func (o *ServiceBrokerHardwareplatformsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker hardwareplatforms get bad request response has a 5xx status code +func (o *ServiceBrokerHardwareplatformsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker hardwareplatforms get bad request response a status code equal to that given +func (o *ServiceBrokerHardwareplatformsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker hardwareplatforms get bad request response +func (o *ServiceBrokerHardwareplatformsGetBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerHardwareplatformsGetBadRequest) Error() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerHardwareplatformsGetBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerHardwareplatformsGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHardwareplatformsGetBadRequest) 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 +} + +// NewServiceBrokerHardwareplatformsGetUnauthorized creates a ServiceBrokerHardwareplatformsGetUnauthorized with default headers values +func NewServiceBrokerHardwareplatformsGetUnauthorized() *ServiceBrokerHardwareplatformsGetUnauthorized { + return &ServiceBrokerHardwareplatformsGetUnauthorized{} +} + +/* +ServiceBrokerHardwareplatformsGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerHardwareplatformsGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker hardwareplatforms get unauthorized response has a 2xx status code +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker hardwareplatforms get unauthorized response has a 3xx status code +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker hardwareplatforms get unauthorized response has a 4xx status code +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker hardwareplatforms get unauthorized response has a 5xx status code +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker hardwareplatforms get unauthorized response a status code equal to that given +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker hardwareplatforms get unauthorized response +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHardwareplatformsGetUnauthorized) 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 +} + +// NewServiceBrokerHardwareplatformsGetForbidden creates a ServiceBrokerHardwareplatformsGetForbidden with default headers values +func NewServiceBrokerHardwareplatformsGetForbidden() *ServiceBrokerHardwareplatformsGetForbidden { + return &ServiceBrokerHardwareplatformsGetForbidden{} +} + +/* +ServiceBrokerHardwareplatformsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerHardwareplatformsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker hardwareplatforms get forbidden response has a 2xx status code +func (o *ServiceBrokerHardwareplatformsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker hardwareplatforms get forbidden response has a 3xx status code +func (o *ServiceBrokerHardwareplatformsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker hardwareplatforms get forbidden response has a 4xx status code +func (o *ServiceBrokerHardwareplatformsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker hardwareplatforms get forbidden response has a 5xx status code +func (o *ServiceBrokerHardwareplatformsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker hardwareplatforms get forbidden response a status code equal to that given +func (o *ServiceBrokerHardwareplatformsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker hardwareplatforms get forbidden response +func (o *ServiceBrokerHardwareplatformsGetForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerHardwareplatformsGetForbidden) Error() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerHardwareplatformsGetForbidden) String() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerHardwareplatformsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHardwareplatformsGetForbidden) 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 +} + +// NewServiceBrokerHardwareplatformsGetNotFound creates a ServiceBrokerHardwareplatformsGetNotFound with default headers values +func NewServiceBrokerHardwareplatformsGetNotFound() *ServiceBrokerHardwareplatformsGetNotFound { + return &ServiceBrokerHardwareplatformsGetNotFound{} +} + +/* +ServiceBrokerHardwareplatformsGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerHardwareplatformsGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker hardwareplatforms get not found response has a 2xx status code +func (o *ServiceBrokerHardwareplatformsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker hardwareplatforms get not found response has a 3xx status code +func (o *ServiceBrokerHardwareplatformsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker hardwareplatforms get not found response has a 4xx status code +func (o *ServiceBrokerHardwareplatformsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker hardwareplatforms get not found response has a 5xx status code +func (o *ServiceBrokerHardwareplatformsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker hardwareplatforms get not found response a status code equal to that given +func (o *ServiceBrokerHardwareplatformsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker hardwareplatforms get not found response +func (o *ServiceBrokerHardwareplatformsGetNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerHardwareplatformsGetNotFound) Error() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerHardwareplatformsGetNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerHardwareplatformsGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHardwareplatformsGetNotFound) 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 +} + // NewServiceBrokerHardwareplatformsGetInternalServerError creates a ServiceBrokerHardwareplatformsGetInternalServerError with default headers values func NewServiceBrokerHardwareplatformsGetInternalServerError() *ServiceBrokerHardwareplatformsGetInternalServerError { return &ServiceBrokerHardwareplatformsGetInternalServerError{} diff --git a/power/client/iaas_service_broker/service_broker_health_head_responses.go b/power/client/iaas_service_broker/service_broker_health_head_responses.go index 10672aca..53719cfa 100644 --- a/power/client/iaas_service_broker/service_broker_health_head_responses.go +++ b/power/client/iaas_service_broker/service_broker_health_head_responses.go @@ -35,6 +35,24 @@ func (o *ServiceBrokerHealthHeadReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 401: + result := NewServiceBrokerHealthHeadUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerHealthHeadForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerHealthHeadNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[HEAD /broker/v1/health] serviceBroker.health.head", response, response.Code()) } @@ -175,3 +193,207 @@ func (o *ServiceBrokerHealthHeadBadRequest) readResponse(response runtime.Client return nil } + +// NewServiceBrokerHealthHeadUnauthorized creates a ServiceBrokerHealthHeadUnauthorized with default headers values +func NewServiceBrokerHealthHeadUnauthorized() *ServiceBrokerHealthHeadUnauthorized { + return &ServiceBrokerHealthHeadUnauthorized{} +} + +/* +ServiceBrokerHealthHeadUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerHealthHeadUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker health head unauthorized response has a 2xx status code +func (o *ServiceBrokerHealthHeadUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker health head unauthorized response has a 3xx status code +func (o *ServiceBrokerHealthHeadUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health head unauthorized response has a 4xx status code +func (o *ServiceBrokerHealthHeadUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker health head unauthorized response has a 5xx status code +func (o *ServiceBrokerHealthHeadUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health head unauthorized response a status code equal to that given +func (o *ServiceBrokerHealthHeadUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker health head unauthorized response +func (o *ServiceBrokerHealthHeadUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerHealthHeadUnauthorized) Error() string { + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerHealthHeadUnauthorized) String() string { + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerHealthHeadUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHealthHeadUnauthorized) 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 +} + +// NewServiceBrokerHealthHeadForbidden creates a ServiceBrokerHealthHeadForbidden with default headers values +func NewServiceBrokerHealthHeadForbidden() *ServiceBrokerHealthHeadForbidden { + return &ServiceBrokerHealthHeadForbidden{} +} + +/* +ServiceBrokerHealthHeadForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerHealthHeadForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker health head forbidden response has a 2xx status code +func (o *ServiceBrokerHealthHeadForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker health head forbidden response has a 3xx status code +func (o *ServiceBrokerHealthHeadForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health head forbidden response has a 4xx status code +func (o *ServiceBrokerHealthHeadForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker health head forbidden response has a 5xx status code +func (o *ServiceBrokerHealthHeadForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health head forbidden response a status code equal to that given +func (o *ServiceBrokerHealthHeadForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker health head forbidden response +func (o *ServiceBrokerHealthHeadForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerHealthHeadForbidden) Error() string { + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerHealthHeadForbidden) String() string { + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerHealthHeadForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHealthHeadForbidden) 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 +} + +// NewServiceBrokerHealthHeadNotFound creates a ServiceBrokerHealthHeadNotFound with default headers values +func NewServiceBrokerHealthHeadNotFound() *ServiceBrokerHealthHeadNotFound { + return &ServiceBrokerHealthHeadNotFound{} +} + +/* +ServiceBrokerHealthHeadNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerHealthHeadNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker health head not found response has a 2xx status code +func (o *ServiceBrokerHealthHeadNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker health head not found response has a 3xx status code +func (o *ServiceBrokerHealthHeadNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health head not found response has a 4xx status code +func (o *ServiceBrokerHealthHeadNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker health head not found response has a 5xx status code +func (o *ServiceBrokerHealthHeadNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health head not found response a status code equal to that given +func (o *ServiceBrokerHealthHeadNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker health head not found response +func (o *ServiceBrokerHealthHeadNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerHealthHeadNotFound) Error() string { + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerHealthHeadNotFound) String() string { + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerHealthHeadNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHealthHeadNotFound) 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/iaas_service_broker/service_broker_health_responses.go b/power/client/iaas_service_broker/service_broker_health_responses.go index 49b3483c..e5a1f2fa 100644 --- a/power/client/iaas_service_broker/service_broker_health_responses.go +++ b/power/client/iaas_service_broker/service_broker_health_responses.go @@ -35,6 +35,24 @@ func (o *ServiceBrokerHealthReader) ReadResponse(response runtime.ClientResponse return nil, err } return nil, result + case 401: + result := NewServiceBrokerHealthUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerHealthForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerHealthNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[GET /broker/v1/health] serviceBroker.health", response, response.Code()) } @@ -175,3 +193,207 @@ func (o *ServiceBrokerHealthBadRequest) readResponse(response runtime.ClientResp return nil } + +// NewServiceBrokerHealthUnauthorized creates a ServiceBrokerHealthUnauthorized with default headers values +func NewServiceBrokerHealthUnauthorized() *ServiceBrokerHealthUnauthorized { + return &ServiceBrokerHealthUnauthorized{} +} + +/* +ServiceBrokerHealthUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerHealthUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker health unauthorized response has a 2xx status code +func (o *ServiceBrokerHealthUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker health unauthorized response has a 3xx status code +func (o *ServiceBrokerHealthUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health unauthorized response has a 4xx status code +func (o *ServiceBrokerHealthUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker health unauthorized response has a 5xx status code +func (o *ServiceBrokerHealthUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health unauthorized response a status code equal to that given +func (o *ServiceBrokerHealthUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker health unauthorized response +func (o *ServiceBrokerHealthUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerHealthUnauthorized) Error() string { + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerHealthUnauthorized) String() string { + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerHealthUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHealthUnauthorized) 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 +} + +// NewServiceBrokerHealthForbidden creates a ServiceBrokerHealthForbidden with default headers values +func NewServiceBrokerHealthForbidden() *ServiceBrokerHealthForbidden { + return &ServiceBrokerHealthForbidden{} +} + +/* +ServiceBrokerHealthForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerHealthForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker health forbidden response has a 2xx status code +func (o *ServiceBrokerHealthForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker health forbidden response has a 3xx status code +func (o *ServiceBrokerHealthForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health forbidden response has a 4xx status code +func (o *ServiceBrokerHealthForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker health forbidden response has a 5xx status code +func (o *ServiceBrokerHealthForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health forbidden response a status code equal to that given +func (o *ServiceBrokerHealthForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker health forbidden response +func (o *ServiceBrokerHealthForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerHealthForbidden) Error() string { + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerHealthForbidden) String() string { + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerHealthForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHealthForbidden) 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 +} + +// NewServiceBrokerHealthNotFound creates a ServiceBrokerHealthNotFound with default headers values +func NewServiceBrokerHealthNotFound() *ServiceBrokerHealthNotFound { + return &ServiceBrokerHealthNotFound{} +} + +/* +ServiceBrokerHealthNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerHealthNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker health not found response has a 2xx status code +func (o *ServiceBrokerHealthNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker health not found response has a 3xx status code +func (o *ServiceBrokerHealthNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health not found response has a 4xx status code +func (o *ServiceBrokerHealthNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker health not found response has a 5xx status code +func (o *ServiceBrokerHealthNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health not found response a status code equal to that given +func (o *ServiceBrokerHealthNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker health not found response +func (o *ServiceBrokerHealthNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerHealthNotFound) Error() string { + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerHealthNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerHealthNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerHealthNotFound) 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/iaas_service_broker/service_broker_test_timeout_responses.go b/power/client/iaas_service_broker/service_broker_test_timeout_responses.go index cbf6ca41..5660b04c 100644 --- a/power/client/iaas_service_broker/service_broker_test_timeout_responses.go +++ b/power/client/iaas_service_broker/service_broker_test_timeout_responses.go @@ -29,6 +29,30 @@ func (o *ServiceBrokerTestTimeoutReader) ReadResponse(response runtime.ClientRes return nil, err } return result, nil + case 400: + result := NewServiceBrokerTestTimeoutBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBrokerTestTimeoutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerTestTimeoutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerTestTimeoutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[GET /broker/v1/test/timeout] serviceBroker.test.timeout", response, response.Code()) } @@ -99,3 +123,275 @@ func (o *ServiceBrokerTestTimeoutOK) readResponse(response runtime.ClientRespons return nil } + +// NewServiceBrokerTestTimeoutBadRequest creates a ServiceBrokerTestTimeoutBadRequest with default headers values +func NewServiceBrokerTestTimeoutBadRequest() *ServiceBrokerTestTimeoutBadRequest { + return &ServiceBrokerTestTimeoutBadRequest{} +} + +/* +ServiceBrokerTestTimeoutBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerTestTimeoutBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker test timeout bad request response has a 2xx status code +func (o *ServiceBrokerTestTimeoutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker test timeout bad request response has a 3xx status code +func (o *ServiceBrokerTestTimeoutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker test timeout bad request response has a 4xx status code +func (o *ServiceBrokerTestTimeoutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker test timeout bad request response has a 5xx status code +func (o *ServiceBrokerTestTimeoutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker test timeout bad request response a status code equal to that given +func (o *ServiceBrokerTestTimeoutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker test timeout bad request response +func (o *ServiceBrokerTestTimeoutBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerTestTimeoutBadRequest) Error() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerTestTimeoutBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerTestTimeoutBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerTestTimeoutBadRequest) 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 +} + +// NewServiceBrokerTestTimeoutUnauthorized creates a ServiceBrokerTestTimeoutUnauthorized with default headers values +func NewServiceBrokerTestTimeoutUnauthorized() *ServiceBrokerTestTimeoutUnauthorized { + return &ServiceBrokerTestTimeoutUnauthorized{} +} + +/* +ServiceBrokerTestTimeoutUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerTestTimeoutUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker test timeout unauthorized response has a 2xx status code +func (o *ServiceBrokerTestTimeoutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker test timeout unauthorized response has a 3xx status code +func (o *ServiceBrokerTestTimeoutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker test timeout unauthorized response has a 4xx status code +func (o *ServiceBrokerTestTimeoutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker test timeout unauthorized response has a 5xx status code +func (o *ServiceBrokerTestTimeoutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker test timeout unauthorized response a status code equal to that given +func (o *ServiceBrokerTestTimeoutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker test timeout unauthorized response +func (o *ServiceBrokerTestTimeoutUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerTestTimeoutUnauthorized) Error() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerTestTimeoutUnauthorized) String() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerTestTimeoutUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerTestTimeoutUnauthorized) 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 +} + +// NewServiceBrokerTestTimeoutForbidden creates a ServiceBrokerTestTimeoutForbidden with default headers values +func NewServiceBrokerTestTimeoutForbidden() *ServiceBrokerTestTimeoutForbidden { + return &ServiceBrokerTestTimeoutForbidden{} +} + +/* +ServiceBrokerTestTimeoutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerTestTimeoutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker test timeout forbidden response has a 2xx status code +func (o *ServiceBrokerTestTimeoutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker test timeout forbidden response has a 3xx status code +func (o *ServiceBrokerTestTimeoutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker test timeout forbidden response has a 4xx status code +func (o *ServiceBrokerTestTimeoutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker test timeout forbidden response has a 5xx status code +func (o *ServiceBrokerTestTimeoutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker test timeout forbidden response a status code equal to that given +func (o *ServiceBrokerTestTimeoutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker test timeout forbidden response +func (o *ServiceBrokerTestTimeoutForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerTestTimeoutForbidden) Error() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerTestTimeoutForbidden) String() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerTestTimeoutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerTestTimeoutForbidden) 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 +} + +// NewServiceBrokerTestTimeoutNotFound creates a ServiceBrokerTestTimeoutNotFound with default headers values +func NewServiceBrokerTestTimeoutNotFound() *ServiceBrokerTestTimeoutNotFound { + return &ServiceBrokerTestTimeoutNotFound{} +} + +/* +ServiceBrokerTestTimeoutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerTestTimeoutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker test timeout not found response has a 2xx status code +func (o *ServiceBrokerTestTimeoutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker test timeout not found response has a 3xx status code +func (o *ServiceBrokerTestTimeoutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker test timeout not found response has a 4xx status code +func (o *ServiceBrokerTestTimeoutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker test timeout not found response has a 5xx status code +func (o *ServiceBrokerTestTimeoutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker test timeout not found response a status code equal to that given +func (o *ServiceBrokerTestTimeoutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker test timeout not found response +func (o *ServiceBrokerTestTimeoutNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerTestTimeoutNotFound) Error() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerTestTimeoutNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerTestTimeoutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerTestTimeoutNotFound) 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/iaas_service_broker/service_broker_version_responses.go b/power/client/iaas_service_broker/service_broker_version_responses.go index 47b6d2ce..23b0bf2a 100644 --- a/power/client/iaas_service_broker/service_broker_version_responses.go +++ b/power/client/iaas_service_broker/service_broker_version_responses.go @@ -35,6 +35,24 @@ func (o *ServiceBrokerVersionReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 401: + result := NewServiceBrokerVersionUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerVersionForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerVersionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[GET /broker/v1/version] serviceBroker.version", response, response.Code()) } @@ -175,3 +193,207 @@ func (o *ServiceBrokerVersionBadRequest) readResponse(response runtime.ClientRes return nil } + +// NewServiceBrokerVersionUnauthorized creates a ServiceBrokerVersionUnauthorized with default headers values +func NewServiceBrokerVersionUnauthorized() *ServiceBrokerVersionUnauthorized { + return &ServiceBrokerVersionUnauthorized{} +} + +/* +ServiceBrokerVersionUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerVersionUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker version unauthorized response has a 2xx status code +func (o *ServiceBrokerVersionUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker version unauthorized response has a 3xx status code +func (o *ServiceBrokerVersionUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker version unauthorized response has a 4xx status code +func (o *ServiceBrokerVersionUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker version unauthorized response has a 5xx status code +func (o *ServiceBrokerVersionUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker version unauthorized response a status code equal to that given +func (o *ServiceBrokerVersionUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker version unauthorized response +func (o *ServiceBrokerVersionUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerVersionUnauthorized) Error() string { + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerVersionUnauthorized) String() string { + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerVersionUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerVersionUnauthorized) 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 +} + +// NewServiceBrokerVersionForbidden creates a ServiceBrokerVersionForbidden with default headers values +func NewServiceBrokerVersionForbidden() *ServiceBrokerVersionForbidden { + return &ServiceBrokerVersionForbidden{} +} + +/* +ServiceBrokerVersionForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerVersionForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker version forbidden response has a 2xx status code +func (o *ServiceBrokerVersionForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker version forbidden response has a 3xx status code +func (o *ServiceBrokerVersionForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker version forbidden response has a 4xx status code +func (o *ServiceBrokerVersionForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker version forbidden response has a 5xx status code +func (o *ServiceBrokerVersionForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker version forbidden response a status code equal to that given +func (o *ServiceBrokerVersionForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker version forbidden response +func (o *ServiceBrokerVersionForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerVersionForbidden) Error() string { + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerVersionForbidden) String() string { + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerVersionForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerVersionForbidden) 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 +} + +// NewServiceBrokerVersionNotFound creates a ServiceBrokerVersionNotFound with default headers values +func NewServiceBrokerVersionNotFound() *ServiceBrokerVersionNotFound { + return &ServiceBrokerVersionNotFound{} +} + +/* +ServiceBrokerVersionNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerVersionNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker version not found response has a 2xx status code +func (o *ServiceBrokerVersionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker version not found response has a 3xx status code +func (o *ServiceBrokerVersionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker version not found response has a 4xx status code +func (o *ServiceBrokerVersionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker version not found response has a 5xx status code +func (o *ServiceBrokerVersionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker version not found response a status code equal to that given +func (o *ServiceBrokerVersionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker version not found response +func (o *ServiceBrokerVersionNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerVersionNotFound) Error() string { + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerVersionNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerVersionNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerVersionNotFound) 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/open_stacks/service_broker_openstacks_get_responses.go b/power/client/open_stacks/service_broker_openstacks_get_responses.go index 26240d3a..4dc173d8 100644 --- a/power/client/open_stacks/service_broker_openstacks_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_get_responses.go @@ -35,12 +35,24 @@ func (o *ServiceBrokerOpenstacksGetReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 401: + result := NewServiceBrokerOpenstacksGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewServiceBrokerOpenstacksGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 404: + result := NewServiceBrokerOpenstacksGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerOpenstacksGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -188,6 +200,74 @@ func (o *ServiceBrokerOpenstacksGetBadRequest) readResponse(response runtime.Cli return nil } +// NewServiceBrokerOpenstacksGetUnauthorized creates a ServiceBrokerOpenstacksGetUnauthorized with default headers values +func NewServiceBrokerOpenstacksGetUnauthorized() *ServiceBrokerOpenstacksGetUnauthorized { + return &ServiceBrokerOpenstacksGetUnauthorized{} +} + +/* +ServiceBrokerOpenstacksGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerOpenstacksGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks get unauthorized response has a 2xx status code +func (o *ServiceBrokerOpenstacksGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks get unauthorized response has a 3xx status code +func (o *ServiceBrokerOpenstacksGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks get unauthorized response has a 4xx status code +func (o *ServiceBrokerOpenstacksGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks get unauthorized response has a 5xx status code +func (o *ServiceBrokerOpenstacksGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks get unauthorized response a status code equal to that given +func (o *ServiceBrokerOpenstacksGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker openstacks get unauthorized response +func (o *ServiceBrokerOpenstacksGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerOpenstacksGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerOpenstacksGetUnauthorized) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerOpenstacksGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksGetUnauthorized) 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 +} + // NewServiceBrokerOpenstacksGetForbidden creates a ServiceBrokerOpenstacksGetForbidden with default headers values func NewServiceBrokerOpenstacksGetForbidden() *ServiceBrokerOpenstacksGetForbidden { return &ServiceBrokerOpenstacksGetForbidden{} @@ -196,7 +276,7 @@ func NewServiceBrokerOpenstacksGetForbidden() *ServiceBrokerOpenstacksGetForbidd /* ServiceBrokerOpenstacksGetForbidden describes a response with status code 403, with default header values. -Unauthorized +Forbidden */ type ServiceBrokerOpenstacksGetForbidden struct { Payload *models.Error @@ -256,6 +336,74 @@ func (o *ServiceBrokerOpenstacksGetForbidden) readResponse(response runtime.Clie return nil } +// NewServiceBrokerOpenstacksGetNotFound creates a ServiceBrokerOpenstacksGetNotFound with default headers values +func NewServiceBrokerOpenstacksGetNotFound() *ServiceBrokerOpenstacksGetNotFound { + return &ServiceBrokerOpenstacksGetNotFound{} +} + +/* +ServiceBrokerOpenstacksGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerOpenstacksGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks get not found response has a 2xx status code +func (o *ServiceBrokerOpenstacksGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks get not found response has a 3xx status code +func (o *ServiceBrokerOpenstacksGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks get not found response has a 4xx status code +func (o *ServiceBrokerOpenstacksGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks get not found response has a 5xx status code +func (o *ServiceBrokerOpenstacksGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks get not found response a status code equal to that given +func (o *ServiceBrokerOpenstacksGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker openstacks get not found response +func (o *ServiceBrokerOpenstacksGetNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerOpenstacksGetNotFound) Error() string { + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerOpenstacksGetNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerOpenstacksGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksGetNotFound) 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 +} + // NewServiceBrokerOpenstacksGetInternalServerError creates a ServiceBrokerOpenstacksGetInternalServerError with default headers values func NewServiceBrokerOpenstacksGetInternalServerError() *ServiceBrokerOpenstacksGetInternalServerError { return &ServiceBrokerOpenstacksGetInternalServerError{} diff --git a/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go b/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go index 06251f95..ea4ea262 100644 --- a/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go @@ -35,6 +35,18 @@ func (o *ServiceBrokerOpenstacksOpenstackGetReader) ReadResponse(response runtim return nil, err } return nil, result + case 401: + result := NewServiceBrokerOpenstacksOpenstackGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerOpenstacksOpenstackGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewServiceBrokerOpenstacksOpenstackGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -188,6 +200,142 @@ func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) readResponse(response ru return nil } +// NewServiceBrokerOpenstacksOpenstackGetUnauthorized creates a ServiceBrokerOpenstacksOpenstackGetUnauthorized with default headers values +func NewServiceBrokerOpenstacksOpenstackGetUnauthorized() *ServiceBrokerOpenstacksOpenstackGetUnauthorized { + return &ServiceBrokerOpenstacksOpenstackGetUnauthorized{} +} + +/* +ServiceBrokerOpenstacksOpenstackGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerOpenstacksOpenstackGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks openstack get unauthorized response has a 2xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks openstack get unauthorized response has a 3xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks openstack get unauthorized response has a 4xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks openstack get unauthorized response has a 5xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks openstack get unauthorized response a status code equal to that given +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker openstacks openstack get unauthorized response +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksOpenstackGetUnauthorized) 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 +} + +// NewServiceBrokerOpenstacksOpenstackGetForbidden creates a ServiceBrokerOpenstacksOpenstackGetForbidden with default headers values +func NewServiceBrokerOpenstacksOpenstackGetForbidden() *ServiceBrokerOpenstacksOpenstackGetForbidden { + return &ServiceBrokerOpenstacksOpenstackGetForbidden{} +} + +/* +ServiceBrokerOpenstacksOpenstackGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerOpenstacksOpenstackGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks openstack get forbidden response has a 2xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks openstack get forbidden response has a 3xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks openstack get forbidden response has a 4xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks openstack get forbidden response has a 5xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks openstack get forbidden response a status code equal to that given +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker openstacks openstack get forbidden response +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) Error() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksOpenstackGetForbidden) 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 +} + // NewServiceBrokerOpenstacksOpenstackGetNotFound creates a ServiceBrokerOpenstacksOpenstackGetNotFound with default headers values func NewServiceBrokerOpenstacksOpenstackGetNotFound() *ServiceBrokerOpenstacksOpenstackGetNotFound { return &ServiceBrokerOpenstacksOpenstackGetNotFound{} diff --git a/power/client/open_stacks/service_broker_openstacks_post_responses.go b/power/client/open_stacks/service_broker_openstacks_post_responses.go index 27de13a9..e7021aaa 100644 --- a/power/client/open_stacks/service_broker_openstacks_post_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_post_responses.go @@ -41,6 +41,24 @@ func (o *ServiceBrokerOpenstacksPostReader) ReadResponse(response runtime.Client return nil, err } return nil, result + case 401: + result := NewServiceBrokerOpenstacksPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerOpenstacksPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerOpenstacksPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewServiceBrokerOpenstacksPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -268,6 +286,210 @@ func (o *ServiceBrokerOpenstacksPostBadRequest) readResponse(response runtime.Cl return nil } +// NewServiceBrokerOpenstacksPostUnauthorized creates a ServiceBrokerOpenstacksPostUnauthorized with default headers values +func NewServiceBrokerOpenstacksPostUnauthorized() *ServiceBrokerOpenstacksPostUnauthorized { + return &ServiceBrokerOpenstacksPostUnauthorized{} +} + +/* +ServiceBrokerOpenstacksPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerOpenstacksPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks post unauthorized response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks post unauthorized response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post unauthorized response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks post unauthorized response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks post unauthorized response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker openstacks post unauthorized response +func (o *ServiceBrokerOpenstacksPostUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerOpenstacksPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerOpenstacksPostUnauthorized) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerOpenstacksPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksPostUnauthorized) 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 +} + +// NewServiceBrokerOpenstacksPostForbidden creates a ServiceBrokerOpenstacksPostForbidden with default headers values +func NewServiceBrokerOpenstacksPostForbidden() *ServiceBrokerOpenstacksPostForbidden { + return &ServiceBrokerOpenstacksPostForbidden{} +} + +/* +ServiceBrokerOpenstacksPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerOpenstacksPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks post forbidden response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks post forbidden response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post forbidden response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks post forbidden response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks post forbidden response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker openstacks post forbidden response +func (o *ServiceBrokerOpenstacksPostForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerOpenstacksPostForbidden) Error() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerOpenstacksPostForbidden) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerOpenstacksPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksPostForbidden) 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 +} + +// NewServiceBrokerOpenstacksPostNotFound creates a ServiceBrokerOpenstacksPostNotFound with default headers values +func NewServiceBrokerOpenstacksPostNotFound() *ServiceBrokerOpenstacksPostNotFound { + return &ServiceBrokerOpenstacksPostNotFound{} +} + +/* +ServiceBrokerOpenstacksPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerOpenstacksPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks post not found response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks post not found response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post not found response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks post not found response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks post not found response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker openstacks post not found response +func (o *ServiceBrokerOpenstacksPostNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerOpenstacksPostNotFound) Error() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerOpenstacksPostNotFound) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerOpenstacksPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksPostNotFound) 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 +} + // NewServiceBrokerOpenstacksPostConflict creates a ServiceBrokerOpenstacksPostConflict with default headers values func NewServiceBrokerOpenstacksPostConflict() *ServiceBrokerOpenstacksPostConflict { return &ServiceBrokerOpenstacksPostConflict{} diff --git a/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go b/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go index 1be83375..38e73206 100644 --- a/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go @@ -35,6 +35,18 @@ func (o *ServiceBrokerOpenstacksServersGetReader) ReadResponse(response runtime. return nil, err } return nil, result + case 401: + result := NewServiceBrokerOpenstacksServersGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerOpenstacksServersGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewServiceBrokerOpenstacksServersGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -188,6 +200,142 @@ func (o *ServiceBrokerOpenstacksServersGetBadRequest) readResponse(response runt return nil } +// NewServiceBrokerOpenstacksServersGetUnauthorized creates a ServiceBrokerOpenstacksServersGetUnauthorized with default headers values +func NewServiceBrokerOpenstacksServersGetUnauthorized() *ServiceBrokerOpenstacksServersGetUnauthorized { + return &ServiceBrokerOpenstacksServersGetUnauthorized{} +} + +/* +ServiceBrokerOpenstacksServersGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerOpenstacksServersGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks servers get unauthorized response has a 2xx status code +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks servers get unauthorized response has a 3xx status code +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks servers get unauthorized response has a 4xx status code +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks servers get unauthorized response has a 5xx status code +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks servers get unauthorized response a status code equal to that given +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker openstacks servers get unauthorized response +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksServersGetUnauthorized) 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 +} + +// NewServiceBrokerOpenstacksServersGetForbidden creates a ServiceBrokerOpenstacksServersGetForbidden with default headers values +func NewServiceBrokerOpenstacksServersGetForbidden() *ServiceBrokerOpenstacksServersGetForbidden { + return &ServiceBrokerOpenstacksServersGetForbidden{} +} + +/* +ServiceBrokerOpenstacksServersGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerOpenstacksServersGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker openstacks servers get forbidden response has a 2xx status code +func (o *ServiceBrokerOpenstacksServersGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks servers get forbidden response has a 3xx status code +func (o *ServiceBrokerOpenstacksServersGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks servers get forbidden response has a 4xx status code +func (o *ServiceBrokerOpenstacksServersGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks servers get forbidden response has a 5xx status code +func (o *ServiceBrokerOpenstacksServersGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks servers get forbidden response a status code equal to that given +func (o *ServiceBrokerOpenstacksServersGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker openstacks servers get forbidden response +func (o *ServiceBrokerOpenstacksServersGetForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerOpenstacksServersGetForbidden) Error() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerOpenstacksServersGetForbidden) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerOpenstacksServersGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerOpenstacksServersGetForbidden) 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 +} + // NewServiceBrokerOpenstacksServersGetNotFound creates a ServiceBrokerOpenstacksServersGetNotFound with default headers values func NewServiceBrokerOpenstacksServersGetNotFound() *ServiceBrokerOpenstacksServersGetNotFound { return &ServiceBrokerOpenstacksServersGetNotFound{} diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go index 44bdd837..1cc559d2 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go @@ -47,6 +47,12 @@ func (o *PcloudCloudconnectionsDeleteReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 403: + result := NewPcloudCloudconnectionsDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudconnectionsDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -346,6 +352,74 @@ func (o *PcloudCloudconnectionsDeleteUnauthorized) readResponse(response runtime return nil } +// NewPcloudCloudconnectionsDeleteForbidden creates a PcloudCloudconnectionsDeleteForbidden with default headers values +func NewPcloudCloudconnectionsDeleteForbidden() *PcloudCloudconnectionsDeleteForbidden { + return &PcloudCloudconnectionsDeleteForbidden{} +} + +/* +PcloudCloudconnectionsDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudconnectionsDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections delete forbidden response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections delete forbidden response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete forbidden response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections delete forbidden response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections delete forbidden response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudconnections delete forbidden response +func (o *PcloudCloudconnectionsDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudconnectionsDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsDeleteForbidden) 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 +} + // NewPcloudCloudconnectionsDeleteNotFound creates a PcloudCloudconnectionsDeleteNotFound with default headers values func NewPcloudCloudconnectionsDeleteNotFound() *PcloudCloudconnectionsDeleteNotFound { return &PcloudCloudconnectionsDeleteNotFound{} diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go index 4bdc2939..f4b8e64a 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudconnectionsGetReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 403: + result := NewPcloudCloudconnectionsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudconnectionsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -268,6 +274,74 @@ func (o *PcloudCloudconnectionsGetUnauthorized) readResponse(response runtime.Cl return nil } +// NewPcloudCloudconnectionsGetForbidden creates a PcloudCloudconnectionsGetForbidden with default headers values +func NewPcloudCloudconnectionsGetForbidden() *PcloudCloudconnectionsGetForbidden { + return &PcloudCloudconnectionsGetForbidden{} +} + +/* +PcloudCloudconnectionsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudconnectionsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections get forbidden response has a 2xx status code +func (o *PcloudCloudconnectionsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections get forbidden response has a 3xx status code +func (o *PcloudCloudconnectionsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections get forbidden response has a 4xx status code +func (o *PcloudCloudconnectionsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections get forbidden response has a 5xx status code +func (o *PcloudCloudconnectionsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections get forbidden response a status code equal to that given +func (o *PcloudCloudconnectionsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudconnections get forbidden response +func (o *PcloudCloudconnectionsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudconnectionsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsGetForbidden) 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 +} + // NewPcloudCloudconnectionsGetNotFound creates a PcloudCloudconnectionsGetNotFound with default headers values func NewPcloudCloudconnectionsGetNotFound() *PcloudCloudconnectionsGetNotFound { return &PcloudCloudconnectionsGetNotFound{} diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go index 5b2c8879..4cc11e81 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudCloudconnectionsGetallReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 404: + result := NewPcloudCloudconnectionsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 408: result := NewPcloudCloudconnectionsGetallRequestTimeout() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +342,74 @@ func (o *PcloudCloudconnectionsGetallForbidden) readResponse(response runtime.Cl return nil } +// NewPcloudCloudconnectionsGetallNotFound creates a PcloudCloudconnectionsGetallNotFound with default headers values +func NewPcloudCloudconnectionsGetallNotFound() *PcloudCloudconnectionsGetallNotFound { + return &PcloudCloudconnectionsGetallNotFound{} +} + +/* +PcloudCloudconnectionsGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudconnectionsGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections getall not found response has a 2xx status code +func (o *PcloudCloudconnectionsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections getall not found response has a 3xx status code +func (o *PcloudCloudconnectionsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections getall not found response has a 4xx status code +func (o *PcloudCloudconnectionsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections getall not found response has a 5xx status code +func (o *PcloudCloudconnectionsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections getall not found response a status code equal to that given +func (o *PcloudCloudconnectionsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudconnections getall not found response +func (o *PcloudCloudconnectionsGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudconnectionsGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudconnectionsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudconnectionsGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsGetallNotFound) 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 +} + // NewPcloudCloudconnectionsGetallRequestTimeout creates a PcloudCloudconnectionsGetallRequestTimeout with default headers values func NewPcloudCloudconnectionsGetallRequestTimeout() *PcloudCloudconnectionsGetallRequestTimeout { return &PcloudCloudconnectionsGetallRequestTimeout{} diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go index c44b13bb..4ca9cca7 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go @@ -47,6 +47,12 @@ func (o *PcloudCloudconnectionsNetworksDeleteReader) ReadResponse(response runti return nil, err } return nil, result + case 403: + result := NewPcloudCloudconnectionsNetworksDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudconnectionsNetworksDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -346,6 +352,74 @@ func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) readResponse(response return nil } +// NewPcloudCloudconnectionsNetworksDeleteForbidden creates a PcloudCloudconnectionsNetworksDeleteForbidden with default headers values +func NewPcloudCloudconnectionsNetworksDeleteForbidden() *PcloudCloudconnectionsNetworksDeleteForbidden { + return &PcloudCloudconnectionsNetworksDeleteForbidden{} +} + +/* +PcloudCloudconnectionsNetworksDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudconnectionsNetworksDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections networks delete forbidden response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete forbidden response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete forbidden response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks delete forbidden response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks delete forbidden response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudconnections networks delete forbidden response +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsNetworksDeleteForbidden) 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 +} + // NewPcloudCloudconnectionsNetworksDeleteNotFound creates a PcloudCloudconnectionsNetworksDeleteNotFound with default headers values func NewPcloudCloudconnectionsNetworksDeleteNotFound() *PcloudCloudconnectionsNetworksDeleteNotFound { return &PcloudCloudconnectionsNetworksDeleteNotFound{} diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go index 879fdf85..afa8d478 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go @@ -47,6 +47,12 @@ func (o *PcloudCloudconnectionsNetworksPutReader) ReadResponse(response runtime. return nil, err } return nil, result + case 403: + result := NewPcloudCloudconnectionsNetworksPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudconnectionsNetworksPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -346,6 +352,74 @@ func (o *PcloudCloudconnectionsNetworksPutUnauthorized) readResponse(response ru return nil } +// NewPcloudCloudconnectionsNetworksPutForbidden creates a PcloudCloudconnectionsNetworksPutForbidden with default headers values +func NewPcloudCloudconnectionsNetworksPutForbidden() *PcloudCloudconnectionsNetworksPutForbidden { + return &PcloudCloudconnectionsNetworksPutForbidden{} +} + +/* +PcloudCloudconnectionsNetworksPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudconnectionsNetworksPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections networks put forbidden response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks put forbidden response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put forbidden response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks put forbidden response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks put forbidden response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudconnections networks put forbidden response +func (o *PcloudCloudconnectionsNetworksPutForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudconnectionsNetworksPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsNetworksPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsNetworksPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsNetworksPutForbidden) 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 +} + // NewPcloudCloudconnectionsNetworksPutNotFound creates a PcloudCloudconnectionsNetworksPutNotFound with default headers values func NewPcloudCloudconnectionsNetworksPutNotFound() *PcloudCloudconnectionsNetworksPutNotFound { return &PcloudCloudconnectionsNetworksPutNotFound{} 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 eeaf1fa0..aa886b9b 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 403: + result := NewPcloudCloudconnectionsPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudconnectionsPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -440,6 +446,74 @@ func (o *PcloudCloudconnectionsPostUnauthorized) readResponse(response runtime.C return nil } +// NewPcloudCloudconnectionsPostForbidden creates a PcloudCloudconnectionsPostForbidden with default headers values +func NewPcloudCloudconnectionsPostForbidden() *PcloudCloudconnectionsPostForbidden { + return &PcloudCloudconnectionsPostForbidden{} +} + +/* +PcloudCloudconnectionsPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudconnectionsPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections post forbidden response has a 2xx status code +func (o *PcloudCloudconnectionsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post forbidden response has a 3xx status code +func (o *PcloudCloudconnectionsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post forbidden response has a 4xx status code +func (o *PcloudCloudconnectionsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections post forbidden response has a 5xx status code +func (o *PcloudCloudconnectionsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post forbidden response a status code equal to that given +func (o *PcloudCloudconnectionsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudconnections post forbidden response +func (o *PcloudCloudconnectionsPostForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudconnectionsPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsPostForbidden) 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 +} + // NewPcloudCloudconnectionsPostNotFound creates a PcloudCloudconnectionsPostNotFound with default headers values func NewPcloudCloudconnectionsPostNotFound() *PcloudCloudconnectionsPostNotFound { return &PcloudCloudconnectionsPostNotFound{} diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go index a6831700..df515672 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go @@ -47,6 +47,12 @@ func (o *PcloudCloudconnectionsPutReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 403: + result := NewPcloudCloudconnectionsPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudconnectionsPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -366,6 +372,74 @@ func (o *PcloudCloudconnectionsPutUnauthorized) readResponse(response runtime.Cl return nil } +// NewPcloudCloudconnectionsPutForbidden creates a PcloudCloudconnectionsPutForbidden with default headers values +func NewPcloudCloudconnectionsPutForbidden() *PcloudCloudconnectionsPutForbidden { + return &PcloudCloudconnectionsPutForbidden{} +} + +/* +PcloudCloudconnectionsPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudconnectionsPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections put forbidden response has a 2xx status code +func (o *PcloudCloudconnectionsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put forbidden response has a 3xx status code +func (o *PcloudCloudconnectionsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put forbidden response has a 4xx status code +func (o *PcloudCloudconnectionsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections put forbidden response has a 5xx status code +func (o *PcloudCloudconnectionsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put forbidden response a status code equal to that given +func (o *PcloudCloudconnectionsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudconnections put forbidden response +func (o *PcloudCloudconnectionsPutForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudconnectionsPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsPutForbidden) 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 +} + // NewPcloudCloudconnectionsPutNotFound creates a PcloudCloudconnectionsPutNotFound with default headers values func NewPcloudCloudconnectionsPutNotFound() *PcloudCloudconnectionsPutNotFound { return &PcloudCloudconnectionsPutNotFound{} 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 771b6f58..164c7838 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 @@ -47,6 +47,12 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallReader) ReadResponse(re return nil, err } return nil, result + case 404: + result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 408: result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -348,6 +354,74 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) readResponse return nil } +// NewPcloudCloudconnectionsVirtualprivatecloudsGetallNotFound creates a PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound with default headers values +func NewPcloudCloudconnectionsVirtualprivatecloudsGetallNotFound() *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound { + return &PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound{} +} + +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall not found response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall not found response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall not found response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall not found response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall not found response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall not found response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallNotFound) 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 +} + // NewPcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout creates a PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout with default headers values func NewPcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout() *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout { return &PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout{} diff --git a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go index 8c43ee23..d83e4ff4 100644 --- a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go +++ b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudLocationsDisasterrecoveryGetallReader) ReadResponse(response runt return nil, err } return nil, result + case 403: + result := NewPcloudLocationsDisasterrecoveryGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudLocationsDisasterrecoveryGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +268,74 @@ func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) readResponse(respons return nil } +// NewPcloudLocationsDisasterrecoveryGetallForbidden creates a PcloudLocationsDisasterrecoveryGetallForbidden with default headers values +func NewPcloudLocationsDisasterrecoveryGetallForbidden() *PcloudLocationsDisasterrecoveryGetallForbidden { + return &PcloudLocationsDisasterrecoveryGetallForbidden{} +} + +/* +PcloudLocationsDisasterrecoveryGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudLocationsDisasterrecoveryGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud locations disasterrecovery getall forbidden response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery getall forbidden response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery getall forbidden response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud locations disasterrecovery getall forbidden response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery getall forbidden response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud locations disasterrecovery getall forbidden response +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudLocationsDisasterrecoveryGetallForbidden) 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 +} + // NewPcloudLocationsDisasterrecoveryGetallNotFound creates a PcloudLocationsDisasterrecoveryGetallNotFound with default headers values func NewPcloudLocationsDisasterrecoveryGetallNotFound() *PcloudLocationsDisasterrecoveryGetallNotFound { return &PcloudLocationsDisasterrecoveryGetallNotFound{} diff --git a/power/client/p_cloud_events/pcloud_events_get_responses.go b/power/client/p_cloud_events/pcloud_events_get_responses.go index 2abf9260..b332e0ec 100644 --- a/power/client/p_cloud_events/pcloud_events_get_responses.go +++ b/power/client/p_cloud_events/pcloud_events_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudEventsGetReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return nil, result + case 401: + result := NewPcloudEventsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudEventsGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -194,6 +200,74 @@ func (o *PcloudEventsGetBadRequest) readResponse(response runtime.ClientResponse return nil } +// NewPcloudEventsGetUnauthorized creates a PcloudEventsGetUnauthorized with default headers values +func NewPcloudEventsGetUnauthorized() *PcloudEventsGetUnauthorized { + return &PcloudEventsGetUnauthorized{} +} + +/* +PcloudEventsGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudEventsGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud events get unauthorized response has a 2xx status code +func (o *PcloudEventsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events get unauthorized response has a 3xx status code +func (o *PcloudEventsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events get unauthorized response has a 4xx status code +func (o *PcloudEventsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud events get unauthorized response has a 5xx status code +func (o *PcloudEventsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events get unauthorized response a status code equal to that given +func (o *PcloudEventsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud events get unauthorized response +func (o *PcloudEventsGetUnauthorized) Code() int { + return 401 +} + +func (o *PcloudEventsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudEventsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudEventsGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudEventsGetUnauthorized) 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 +} + // NewPcloudEventsGetForbidden creates a PcloudEventsGetForbidden with default headers values func NewPcloudEventsGetForbidden() *PcloudEventsGetForbidden { return &PcloudEventsGetForbidden{} diff --git a/power/client/p_cloud_events/pcloud_events_getquery_responses.go b/power/client/p_cloud_events/pcloud_events_getquery_responses.go index 5145e8d9..97369cbf 100644 --- a/power/client/p_cloud_events/pcloud_events_getquery_responses.go +++ b/power/client/p_cloud_events/pcloud_events_getquery_responses.go @@ -47,6 +47,12 @@ func (o *PcloudEventsGetqueryReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 404: + result := NewPcloudEventsGetqueryNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudEventsGetqueryInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudEventsGetqueryForbidden) readResponse(response runtime.ClientResp return nil } +// NewPcloudEventsGetqueryNotFound creates a PcloudEventsGetqueryNotFound with default headers values +func NewPcloudEventsGetqueryNotFound() *PcloudEventsGetqueryNotFound { + return &PcloudEventsGetqueryNotFound{} +} + +/* +PcloudEventsGetqueryNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudEventsGetqueryNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud events getquery not found response has a 2xx status code +func (o *PcloudEventsGetqueryNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events getquery not found response has a 3xx status code +func (o *PcloudEventsGetqueryNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events getquery not found response has a 4xx status code +func (o *PcloudEventsGetqueryNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud events getquery not found response has a 5xx status code +func (o *PcloudEventsGetqueryNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events getquery not found response a status code equal to that given +func (o *PcloudEventsGetqueryNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud events getquery not found response +func (o *PcloudEventsGetqueryNotFound) Code() int { + return 404 +} + +func (o *PcloudEventsGetqueryNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryNotFound %+v", 404, o.Payload) +} + +func (o *PcloudEventsGetqueryNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryNotFound %+v", 404, o.Payload) +} + +func (o *PcloudEventsGetqueryNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudEventsGetqueryNotFound) 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 +} + // NewPcloudEventsGetqueryInternalServerError creates a PcloudEventsGetqueryInternalServerError with default headers values func NewPcloudEventsGetqueryInternalServerError() *PcloudEventsGetqueryInternalServerError { return &PcloudEventsGetqueryInternalServerError{} diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go index 90c81365..1dfd822e 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go @@ -53,6 +53,12 @@ func (o *PcloudCloudinstancesImagesPostReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 404: + result := NewPcloudCloudinstancesImagesPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudCloudinstancesImagesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -416,6 +422,74 @@ func (o *PcloudCloudinstancesImagesPostForbidden) readResponse(response runtime. return nil } +// NewPcloudCloudinstancesImagesPostNotFound creates a PcloudCloudinstancesImagesPostNotFound with default headers values +func NewPcloudCloudinstancesImagesPostNotFound() *PcloudCloudinstancesImagesPostNotFound { + return &PcloudCloudinstancesImagesPostNotFound{} +} + +/* +PcloudCloudinstancesImagesPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesImagesPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances images post not found response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images post not found response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post not found response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images post not found response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images post not found response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances images post not found response +func (o *PcloudCloudinstancesImagesPostNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesImagesPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesImagesPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesImagesPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesImagesPostNotFound) 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 +} + // NewPcloudCloudinstancesImagesPostConflict creates a PcloudCloudinstancesImagesPostConflict with default headers values func NewPcloudCloudinstancesImagesPostConflict() *PcloudCloudinstancesImagesPostConflict { return &PcloudCloudinstancesImagesPostConflict{} diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go index 12451a52..0758f724 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesStockimagesGetReader) ReadResponse(response runtime return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesStockimagesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesStockimagesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +268,74 @@ func (o *PcloudCloudinstancesStockimagesGetUnauthorized) readResponse(response r return nil } +// NewPcloudCloudinstancesStockimagesGetForbidden creates a PcloudCloudinstancesStockimagesGetForbidden with default headers values +func NewPcloudCloudinstancesStockimagesGetForbidden() *PcloudCloudinstancesStockimagesGetForbidden { + return &PcloudCloudinstancesStockimagesGetForbidden{} +} + +/* +PcloudCloudinstancesStockimagesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesStockimagesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances stockimages get forbidden response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages get forbidden response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages get forbidden response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances stockimages get forbidden response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages get forbidden response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances stockimages get forbidden response +func (o *PcloudCloudinstancesStockimagesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesStockimagesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesStockimagesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesStockimagesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesStockimagesGetForbidden) 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 +} + // NewPcloudCloudinstancesStockimagesGetNotFound creates a PcloudCloudinstancesStockimagesGetNotFound with default headers values func NewPcloudCloudinstancesStockimagesGetNotFound() *PcloudCloudinstancesStockimagesGetNotFound { return &PcloudCloudinstancesStockimagesGetNotFound{} diff --git a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go index 70428880..f758bd3a 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesStockimagesGetallReader) ReadResponse(response runt return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesStockimagesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesStockimagesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +268,74 @@ func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) readResponse(respons return nil } +// NewPcloudCloudinstancesStockimagesGetallForbidden creates a PcloudCloudinstancesStockimagesGetallForbidden with default headers values +func NewPcloudCloudinstancesStockimagesGetallForbidden() *PcloudCloudinstancesStockimagesGetallForbidden { + return &PcloudCloudinstancesStockimagesGetallForbidden{} +} + +/* +PcloudCloudinstancesStockimagesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesStockimagesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances stockimages getall forbidden response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages getall forbidden response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages getall forbidden response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances stockimages getall forbidden response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages getall forbidden response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances stockimages getall forbidden response +func (o *PcloudCloudinstancesStockimagesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesStockimagesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesStockimagesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesStockimagesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesStockimagesGetallForbidden) 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 +} + // NewPcloudCloudinstancesStockimagesGetallNotFound creates a PcloudCloudinstancesStockimagesGetallNotFound with default headers values func NewPcloudCloudinstancesStockimagesGetallNotFound() *PcloudCloudinstancesStockimagesGetallNotFound { return &PcloudCloudinstancesStockimagesGetallNotFound{} diff --git a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go index bfb18007..01351d96 100644 --- a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go +++ b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go @@ -29,6 +29,12 @@ func (o *PcloudV1CloudinstancesCosimagesGetReader) ReadResponse(response runtime return nil, err } return result, nil + case 400: + result := NewPcloudV1CloudinstancesCosimagesGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudV1CloudinstancesCosimagesGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -126,6 +132,74 @@ func (o *PcloudV1CloudinstancesCosimagesGetOK) readResponse(response runtime.Cli return nil } +// NewPcloudV1CloudinstancesCosimagesGetBadRequest creates a PcloudV1CloudinstancesCosimagesGetBadRequest with default headers values +func NewPcloudV1CloudinstancesCosimagesGetBadRequest() *PcloudV1CloudinstancesCosimagesGetBadRequest { + return &PcloudV1CloudinstancesCosimagesGetBadRequest{} +} + +/* +PcloudV1CloudinstancesCosimagesGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudV1CloudinstancesCosimagesGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages get bad request response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages get bad request response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages get bad request response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages get bad request response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages get bad request response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages get bad request response +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV1CloudinstancesCosimagesGetBadRequest) 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 +} + // NewPcloudV1CloudinstancesCosimagesGetUnauthorized creates a PcloudV1CloudinstancesCosimagesGetUnauthorized with default headers values func NewPcloudV1CloudinstancesCosimagesGetUnauthorized() *PcloudV1CloudinstancesCosimagesGetUnauthorized { return &PcloudV1CloudinstancesCosimagesGetUnauthorized{} diff --git a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go index d4967d3f..4e96b47b 100644 --- a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go +++ b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go @@ -47,6 +47,12 @@ func (o *PcloudV1CloudinstancesCosimagesPostReader) ReadResponse(response runtim return nil, err } return nil, result + case 404: + result := NewPcloudV1CloudinstancesCosimagesPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudV1CloudinstancesCosimagesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -342,6 +348,74 @@ func (o *PcloudV1CloudinstancesCosimagesPostForbidden) readResponse(response run return nil } +// NewPcloudV1CloudinstancesCosimagesPostNotFound creates a PcloudV1CloudinstancesCosimagesPostNotFound with default headers values +func NewPcloudV1CloudinstancesCosimagesPostNotFound() *PcloudV1CloudinstancesCosimagesPostNotFound { + return &PcloudV1CloudinstancesCosimagesPostNotFound{} +} + +/* +PcloudV1CloudinstancesCosimagesPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudV1CloudinstancesCosimagesPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages post not found response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages post not found response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages post not found response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages post not found response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages post not found response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages post not found response +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) Code() int { + return 404 +} + +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV1CloudinstancesCosimagesPostNotFound) 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 +} + // NewPcloudV1CloudinstancesCosimagesPostConflict creates a PcloudV1CloudinstancesCosimagesPostConflict with default headers values func NewPcloudV1CloudinstancesCosimagesPostConflict() *PcloudV1CloudinstancesCosimagesPostConflict { return &PcloudV1CloudinstancesCosimagesPostConflict{} diff --git a/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go b/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go index 9997de70..d1004447 100644 --- a/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go +++ b/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go @@ -29,12 +29,24 @@ func (o *PcloudV2ImagesExportGetReader) ReadResponse(response runtime.ClientResp return nil, err } return result, nil + case 400: + result := NewPcloudV2ImagesExportGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudV2ImagesExportGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 403: + result := NewPcloudV2ImagesExportGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2ImagesExportGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -120,6 +132,74 @@ func (o *PcloudV2ImagesExportGetOK) readResponse(response runtime.ClientResponse return nil } +// NewPcloudV2ImagesExportGetBadRequest creates a PcloudV2ImagesExportGetBadRequest with default headers values +func NewPcloudV2ImagesExportGetBadRequest() *PcloudV2ImagesExportGetBadRequest { + return &PcloudV2ImagesExportGetBadRequest{} +} + +/* +PcloudV2ImagesExportGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudV2ImagesExportGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 images export get bad request response has a 2xx status code +func (o *PcloudV2ImagesExportGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export get bad request response has a 3xx status code +func (o *PcloudV2ImagesExportGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export get bad request response has a 4xx status code +func (o *PcloudV2ImagesExportGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export get bad request response has a 5xx status code +func (o *PcloudV2ImagesExportGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export get bad request response a status code equal to that given +func (o *PcloudV2ImagesExportGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 images export get bad request response +func (o *PcloudV2ImagesExportGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudV2ImagesExportGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2ImagesExportGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2ImagesExportGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2ImagesExportGetBadRequest) 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 +} + // NewPcloudV2ImagesExportGetUnauthorized creates a PcloudV2ImagesExportGetUnauthorized with default headers values func NewPcloudV2ImagesExportGetUnauthorized() *PcloudV2ImagesExportGetUnauthorized { return &PcloudV2ImagesExportGetUnauthorized{} @@ -188,6 +268,74 @@ func (o *PcloudV2ImagesExportGetUnauthorized) readResponse(response runtime.Clie return nil } +// NewPcloudV2ImagesExportGetForbidden creates a PcloudV2ImagesExportGetForbidden with default headers values +func NewPcloudV2ImagesExportGetForbidden() *PcloudV2ImagesExportGetForbidden { + return &PcloudV2ImagesExportGetForbidden{} +} + +/* +PcloudV2ImagesExportGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2ImagesExportGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 images export get forbidden response has a 2xx status code +func (o *PcloudV2ImagesExportGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export get forbidden response has a 3xx status code +func (o *PcloudV2ImagesExportGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export get forbidden response has a 4xx status code +func (o *PcloudV2ImagesExportGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export get forbidden response has a 5xx status code +func (o *PcloudV2ImagesExportGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export get forbidden response a status code equal to that given +func (o *PcloudV2ImagesExportGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 images export get forbidden response +func (o *PcloudV2ImagesExportGetForbidden) Code() int { + return 403 +} + +func (o *PcloudV2ImagesExportGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2ImagesExportGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2ImagesExportGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2ImagesExportGetForbidden) 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 +} + // NewPcloudV2ImagesExportGetNotFound creates a PcloudV2ImagesExportGetNotFound with default headers values func NewPcloudV2ImagesExportGetNotFound() *PcloudV2ImagesExportGetNotFound { return &PcloudV2ImagesExportGetNotFound{} diff --git a/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go b/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go index d84e9c6e..80ba815b 100644 --- a/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go +++ b/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2ImagesExportPostReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 403: + result := NewPcloudV2ImagesExportPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2ImagesExportPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -274,6 +280,74 @@ func (o *PcloudV2ImagesExportPostUnauthorized) readResponse(response runtime.Cli return nil } +// NewPcloudV2ImagesExportPostForbidden creates a PcloudV2ImagesExportPostForbidden with default headers values +func NewPcloudV2ImagesExportPostForbidden() *PcloudV2ImagesExportPostForbidden { + return &PcloudV2ImagesExportPostForbidden{} +} + +/* +PcloudV2ImagesExportPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2ImagesExportPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 images export post forbidden response has a 2xx status code +func (o *PcloudV2ImagesExportPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export post forbidden response has a 3xx status code +func (o *PcloudV2ImagesExportPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export post forbidden response has a 4xx status code +func (o *PcloudV2ImagesExportPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export post forbidden response has a 5xx status code +func (o *PcloudV2ImagesExportPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export post forbidden response a status code equal to that given +func (o *PcloudV2ImagesExportPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 images export post forbidden response +func (o *PcloudV2ImagesExportPostForbidden) Code() int { + return 403 +} + +func (o *PcloudV2ImagesExportPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2ImagesExportPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2ImagesExportPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2ImagesExportPostForbidden) 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 +} + // NewPcloudV2ImagesExportPostNotFound creates a PcloudV2ImagesExportPostNotFound with default headers values func NewPcloudV2ImagesExportPostNotFound() *PcloudV2ImagesExportPostNotFound { return &PcloudV2ImagesExportPostNotFound{} diff --git a/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go index 69a40443..220add32 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go @@ -41,6 +41,18 @@ func (o *PcloudCloudinstancesDeleteReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudCloudinstancesDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewPcloudCloudinstancesDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -260,6 +272,142 @@ func (o *PcloudCloudinstancesDeleteUnauthorized) readResponse(response runtime.C return nil } +// NewPcloudCloudinstancesDeleteForbidden creates a PcloudCloudinstancesDeleteForbidden with default headers values +func NewPcloudCloudinstancesDeleteForbidden() *PcloudCloudinstancesDeleteForbidden { + return &PcloudCloudinstancesDeleteForbidden{} +} + +/* +PcloudCloudinstancesDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances delete forbidden response has a 2xx status code +func (o *PcloudCloudinstancesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances delete forbidden response has a 3xx status code +func (o *PcloudCloudinstancesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances delete forbidden response has a 4xx status code +func (o *PcloudCloudinstancesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances delete forbidden response has a 5xx status code +func (o *PcloudCloudinstancesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances delete forbidden response a status code equal to that given +func (o *PcloudCloudinstancesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances delete forbidden response +func (o *PcloudCloudinstancesDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesDeleteForbidden) 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 +} + +// NewPcloudCloudinstancesDeleteNotFound creates a PcloudCloudinstancesDeleteNotFound with default headers values +func NewPcloudCloudinstancesDeleteNotFound() *PcloudCloudinstancesDeleteNotFound { + return &PcloudCloudinstancesDeleteNotFound{} +} + +/* +PcloudCloudinstancesDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances delete not found response has a 2xx status code +func (o *PcloudCloudinstancesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances delete not found response has a 3xx status code +func (o *PcloudCloudinstancesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances delete not found response has a 4xx status code +func (o *PcloudCloudinstancesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances delete not found response has a 5xx status code +func (o *PcloudCloudinstancesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances delete not found response a status code equal to that given +func (o *PcloudCloudinstancesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances delete not found response +func (o *PcloudCloudinstancesDeleteNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesDeleteNotFound) 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 +} + // NewPcloudCloudinstancesDeleteGone creates a PcloudCloudinstancesDeleteGone with default headers values func NewPcloudCloudinstancesDeleteGone() *PcloudCloudinstancesDeleteGone { return &PcloudCloudinstancesDeleteGone{} diff --git a/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go index 98417de3..37be0bd2 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesGetReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +268,74 @@ func (o *PcloudCloudinstancesGetUnauthorized) readResponse(response runtime.Clie return nil } +// NewPcloudCloudinstancesGetForbidden creates a PcloudCloudinstancesGetForbidden with default headers values +func NewPcloudCloudinstancesGetForbidden() *PcloudCloudinstancesGetForbidden { + return &PcloudCloudinstancesGetForbidden{} +} + +/* +PcloudCloudinstancesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances get forbidden response has a 2xx status code +func (o *PcloudCloudinstancesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances get forbidden response has a 3xx status code +func (o *PcloudCloudinstancesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances get forbidden response has a 4xx status code +func (o *PcloudCloudinstancesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances get forbidden response has a 5xx status code +func (o *PcloudCloudinstancesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances get forbidden response a status code equal to that given +func (o *PcloudCloudinstancesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances get forbidden response +func (o *PcloudCloudinstancesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesGetForbidden) 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 +} + // NewPcloudCloudinstancesGetNotFound creates a PcloudCloudinstancesGetNotFound with default headers values func NewPcloudCloudinstancesGetNotFound() *PcloudCloudinstancesGetNotFound { return &PcloudCloudinstancesGetNotFound{} diff --git a/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go index 22d76cf5..23f5465c 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go @@ -41,6 +41,18 @@ func (o *PcloudCloudinstancesPutReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudCloudinstancesPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudCloudinstancesPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +274,142 @@ func (o *PcloudCloudinstancesPutUnauthorized) readResponse(response runtime.Clie return nil } +// NewPcloudCloudinstancesPutForbidden creates a PcloudCloudinstancesPutForbidden with default headers values +func NewPcloudCloudinstancesPutForbidden() *PcloudCloudinstancesPutForbidden { + return &PcloudCloudinstancesPutForbidden{} +} + +/* +PcloudCloudinstancesPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances put forbidden response has a 2xx status code +func (o *PcloudCloudinstancesPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances put forbidden response has a 3xx status code +func (o *PcloudCloudinstancesPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances put forbidden response has a 4xx status code +func (o *PcloudCloudinstancesPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances put forbidden response has a 5xx status code +func (o *PcloudCloudinstancesPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances put forbidden response a status code equal to that given +func (o *PcloudCloudinstancesPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances put forbidden response +func (o *PcloudCloudinstancesPutForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesPutForbidden) 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 +} + +// NewPcloudCloudinstancesPutNotFound creates a PcloudCloudinstancesPutNotFound with default headers values +func NewPcloudCloudinstancesPutNotFound() *PcloudCloudinstancesPutNotFound { + return &PcloudCloudinstancesPutNotFound{} +} + +/* +PcloudCloudinstancesPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances put not found response has a 2xx status code +func (o *PcloudCloudinstancesPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances put not found response has a 3xx status code +func (o *PcloudCloudinstancesPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances put not found response has a 4xx status code +func (o *PcloudCloudinstancesPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances put not found response has a 5xx status code +func (o *PcloudCloudinstancesPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances put not found response a status code equal to that given +func (o *PcloudCloudinstancesPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances put not found response +func (o *PcloudCloudinstancesPutNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesPutNotFound) 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 +} + // NewPcloudCloudinstancesPutUnprocessableEntity creates a PcloudCloudinstancesPutUnprocessableEntity with default headers values func NewPcloudCloudinstancesPutUnprocessableEntity() *PcloudCloudinstancesPutUnprocessableEntity { return &PcloudCloudinstancesPutUnprocessableEntity{} diff --git a/power/client/p_cloud_networks/pcloud_networks_getall_responses.go b/power/client/p_cloud_networks/pcloud_networks_getall_responses.go index 877fb107..4be69f48 100644 --- a/power/client/p_cloud_networks/pcloud_networks_getall_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudNetworksGetallReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 404: + result := NewPcloudNetworksGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudNetworksGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudNetworksGetallForbidden) readResponse(response runtime.ClientResp return nil } +// NewPcloudNetworksGetallNotFound creates a PcloudNetworksGetallNotFound with default headers values +func NewPcloudNetworksGetallNotFound() *PcloudNetworksGetallNotFound { + return &PcloudNetworksGetallNotFound{} +} + +/* +PcloudNetworksGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudNetworksGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks getall not found response has a 2xx status code +func (o *PcloudNetworksGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks getall not found response has a 3xx status code +func (o *PcloudNetworksGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks getall not found response has a 4xx status code +func (o *PcloudNetworksGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks getall not found response has a 5xx status code +func (o *PcloudNetworksGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks getall not found response a status code equal to that given +func (o *PcloudNetworksGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks getall not found response +func (o *PcloudNetworksGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudNetworksGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksGetallNotFound) 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 +} + // NewPcloudNetworksGetallInternalServerError creates a PcloudNetworksGetallInternalServerError with default headers values func NewPcloudNetworksGetallInternalServerError() *PcloudNetworksGetallInternalServerError { return &PcloudNetworksGetallInternalServerError{} diff --git a/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go index 233450a7..23eef77d 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go @@ -29,6 +29,12 @@ func (o *PcloudNetworksPortsGetReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil + case 400: + result := NewPcloudNetworksPortsGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudNetworksPortsGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -126,6 +132,74 @@ func (o *PcloudNetworksPortsGetOK) readResponse(response runtime.ClientResponse, return nil } +// NewPcloudNetworksPortsGetBadRequest creates a PcloudNetworksPortsGetBadRequest with default headers values +func NewPcloudNetworksPortsGetBadRequest() *PcloudNetworksPortsGetBadRequest { + return &PcloudNetworksPortsGetBadRequest{} +} + +/* +PcloudNetworksPortsGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudNetworksPortsGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports get bad request response has a 2xx status code +func (o *PcloudNetworksPortsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports get bad request response has a 3xx status code +func (o *PcloudNetworksPortsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports get bad request response has a 4xx status code +func (o *PcloudNetworksPortsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports get bad request response has a 5xx status code +func (o *PcloudNetworksPortsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports get bad request response a status code equal to that given +func (o *PcloudNetworksPortsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks ports get bad request response +func (o *PcloudNetworksPortsGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudNetworksPortsGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudNetworksPortsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudNetworksPortsGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsGetBadRequest) 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 +} + // NewPcloudNetworksPortsGetUnauthorized creates a PcloudNetworksPortsGetUnauthorized with default headers values func NewPcloudNetworksPortsGetUnauthorized() *PcloudNetworksPortsGetUnauthorized { return &PcloudNetworksPortsGetUnauthorized{} diff --git a/power/client/p_cloud_networks/pcloud_networks_post_responses.go b/power/client/p_cloud_networks/pcloud_networks_post_responses.go index d4c9480a..a71af6ef 100644 --- a/power/client/p_cloud_networks/pcloud_networks_post_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_post_responses.go @@ -53,6 +53,12 @@ func (o *PcloudNetworksPostReader) ReadResponse(response runtime.ClientResponse, return nil, err } return nil, result + case 404: + result := NewPcloudNetworksPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudNetworksPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -422,6 +428,74 @@ func (o *PcloudNetworksPostForbidden) readResponse(response runtime.ClientRespon return nil } +// NewPcloudNetworksPostNotFound creates a PcloudNetworksPostNotFound with default headers values +func NewPcloudNetworksPostNotFound() *PcloudNetworksPostNotFound { + return &PcloudNetworksPostNotFound{} +} + +/* +PcloudNetworksPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudNetworksPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks post not found response has a 2xx status code +func (o *PcloudNetworksPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks post not found response has a 3xx status code +func (o *PcloudNetworksPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post not found response has a 4xx status code +func (o *PcloudNetworksPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks post not found response has a 5xx status code +func (o *PcloudNetworksPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks post not found response a status code equal to that given +func (o *PcloudNetworksPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks post not found response +func (o *PcloudNetworksPostNotFound) Code() int { + return 404 +} + +func (o *PcloudNetworksPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPostNotFound) 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 +} + // NewPcloudNetworksPostConflict creates a PcloudNetworksPostConflict with default headers values func NewPcloudNetworksPostConflict() *PcloudNetworksPostConflict { return &PcloudNetworksPostConflict{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go index d26c4ae9..c7ded07d 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go @@ -41,6 +41,18 @@ func (o *PcloudPvminstancesClonePostReader) ReadResponse(response runtime.Client return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesClonePostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesClonePostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudPvminstancesClonePostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -268,6 +280,142 @@ func (o *PcloudPvminstancesClonePostUnauthorized) readResponse(response runtime. return nil } +// NewPcloudPvminstancesClonePostForbidden creates a PcloudPvminstancesClonePostForbidden with default headers values +func NewPcloudPvminstancesClonePostForbidden() *PcloudPvminstancesClonePostForbidden { + return &PcloudPvminstancesClonePostForbidden{} +} + +/* +PcloudPvminstancesClonePostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesClonePostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances clone post forbidden response has a 2xx status code +func (o *PcloudPvminstancesClonePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances clone post forbidden response has a 3xx status code +func (o *PcloudPvminstancesClonePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances clone post forbidden response has a 4xx status code +func (o *PcloudPvminstancesClonePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances clone post forbidden response has a 5xx status code +func (o *PcloudPvminstancesClonePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances clone post forbidden response a status code equal to that given +func (o *PcloudPvminstancesClonePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances clone post forbidden response +func (o *PcloudPvminstancesClonePostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesClonePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesClonePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesClonePostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesClonePostForbidden) 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 +} + +// NewPcloudPvminstancesClonePostNotFound creates a PcloudPvminstancesClonePostNotFound with default headers values +func NewPcloudPvminstancesClonePostNotFound() *PcloudPvminstancesClonePostNotFound { + return &PcloudPvminstancesClonePostNotFound{} +} + +/* +PcloudPvminstancesClonePostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesClonePostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances clone post not found response has a 2xx status code +func (o *PcloudPvminstancesClonePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances clone post not found response has a 3xx status code +func (o *PcloudPvminstancesClonePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances clone post not found response has a 4xx status code +func (o *PcloudPvminstancesClonePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances clone post not found response has a 5xx status code +func (o *PcloudPvminstancesClonePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances clone post not found response a status code equal to that given +func (o *PcloudPvminstancesClonePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances clone post not found response +func (o *PcloudPvminstancesClonePostNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesClonePostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesClonePostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesClonePostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesClonePostNotFound) 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 +} + // NewPcloudPvminstancesClonePostConflict creates a PcloudPvminstancesClonePostConflict with default headers values func NewPcloudPvminstancesClonePostConflict() *PcloudPvminstancesClonePostConflict { return &PcloudPvminstancesClonePostConflict{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go index 1091163d..dab7e80c 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go @@ -29,6 +29,12 @@ func (o *PcloudPvminstancesConsolePostReader) ReadResponse(response runtime.Clie return nil, err } return result, nil + case 400: + result := NewPcloudPvminstancesConsolePostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudPvminstancesConsolePostUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -132,6 +138,74 @@ func (o *PcloudPvminstancesConsolePostCreated) readResponse(response runtime.Cli return nil } +// NewPcloudPvminstancesConsolePostBadRequest creates a PcloudPvminstancesConsolePostBadRequest with default headers values +func NewPcloudPvminstancesConsolePostBadRequest() *PcloudPvminstancesConsolePostBadRequest { + return &PcloudPvminstancesConsolePostBadRequest{} +} + +/* +PcloudPvminstancesConsolePostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudPvminstancesConsolePostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances console post bad request response has a 2xx status code +func (o *PcloudPvminstancesConsolePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console post bad request response has a 3xx status code +func (o *PcloudPvminstancesConsolePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console post bad request response has a 4xx status code +func (o *PcloudPvminstancesConsolePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console post bad request response has a 5xx status code +func (o *PcloudPvminstancesConsolePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console post bad request response a status code equal to that given +func (o *PcloudPvminstancesConsolePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances console post bad request response +func (o *PcloudPvminstancesConsolePostBadRequest) Code() int { + return 400 +} + +func (o *PcloudPvminstancesConsolePostBadRequest) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPvminstancesConsolePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPvminstancesConsolePostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesConsolePostBadRequest) 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 +} + // NewPcloudPvminstancesConsolePostUnauthorized creates a PcloudPvminstancesConsolePostUnauthorized with default headers values func NewPcloudPvminstancesConsolePostUnauthorized() *PcloudPvminstancesConsolePostUnauthorized { return &PcloudPvminstancesConsolePostUnauthorized{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go index 8b1ed8eb..02ff99af 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudPvminstancesGetallReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 404: + result := NewPcloudPvminstancesGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 408: result := NewPcloudPvminstancesGetallRequestTimeout() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +342,74 @@ func (o *PcloudPvminstancesGetallForbidden) readResponse(response runtime.Client return nil } +// NewPcloudPvminstancesGetallNotFound creates a PcloudPvminstancesGetallNotFound with default headers values +func NewPcloudPvminstancesGetallNotFound() *PcloudPvminstancesGetallNotFound { + return &PcloudPvminstancesGetallNotFound{} +} + +/* +PcloudPvminstancesGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances getall not found response has a 2xx status code +func (o *PcloudPvminstancesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances getall not found response has a 3xx status code +func (o *PcloudPvminstancesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances getall not found response has a 4xx status code +func (o *PcloudPvminstancesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances getall not found response has a 5xx status code +func (o *PcloudPvminstancesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances getall not found response a status code equal to that given +func (o *PcloudPvminstancesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances getall not found response +func (o *PcloudPvminstancesGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesGetallNotFound) 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 +} + // NewPcloudPvminstancesGetallRequestTimeout creates a PcloudPvminstancesGetallRequestTimeout with default headers values func NewPcloudPvminstancesGetallRequestTimeout() *PcloudPvminstancesGetallRequestTimeout { return &PcloudPvminstancesGetallRequestTimeout{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go index 44bb352b..8cab7f44 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesNetworksDeleteReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesNetworksDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesNetworksDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -266,6 +272,74 @@ func (o *PcloudPvminstancesNetworksDeleteUnauthorized) readResponse(response run return nil } +// NewPcloudPvminstancesNetworksDeleteForbidden creates a PcloudPvminstancesNetworksDeleteForbidden with default headers values +func NewPcloudPvminstancesNetworksDeleteForbidden() *PcloudPvminstancesNetworksDeleteForbidden { + return &PcloudPvminstancesNetworksDeleteForbidden{} +} + +/* +PcloudPvminstancesNetworksDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesNetworksDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances networks delete forbidden response has a 2xx status code +func (o *PcloudPvminstancesNetworksDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks delete forbidden response has a 3xx status code +func (o *PcloudPvminstancesNetworksDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks delete forbidden response has a 4xx status code +func (o *PcloudPvminstancesNetworksDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks delete forbidden response has a 5xx status code +func (o *PcloudPvminstancesNetworksDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks delete forbidden response a status code equal to that given +func (o *PcloudPvminstancesNetworksDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances networks delete forbidden response +func (o *PcloudPvminstancesNetworksDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesNetworksDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesNetworksDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesNetworksDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesNetworksDeleteForbidden) 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 +} + // NewPcloudPvminstancesNetworksDeleteNotFound creates a PcloudPvminstancesNetworksDeleteNotFound with default headers values func NewPcloudPvminstancesNetworksDeleteNotFound() *PcloudPvminstancesNetworksDeleteNotFound { return &PcloudPvminstancesNetworksDeleteNotFound{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go index 0be80bc6..531951a0 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go @@ -29,12 +29,24 @@ func (o *PcloudPvminstancesNetworksGetReader) ReadResponse(response runtime.Clie return nil, err } return result, nil + case 400: + result := NewPcloudPvminstancesNetworksGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudPvminstancesNetworksGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesNetworksGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesNetworksGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -120,6 +132,74 @@ func (o *PcloudPvminstancesNetworksGetOK) readResponse(response runtime.ClientRe return nil } +// NewPcloudPvminstancesNetworksGetBadRequest creates a PcloudPvminstancesNetworksGetBadRequest with default headers values +func NewPcloudPvminstancesNetworksGetBadRequest() *PcloudPvminstancesNetworksGetBadRequest { + return &PcloudPvminstancesNetworksGetBadRequest{} +} + +/* +PcloudPvminstancesNetworksGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudPvminstancesNetworksGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances networks get bad request response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks get bad request response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks get bad request response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks get bad request response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks get bad request response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances networks get bad request response +func (o *PcloudPvminstancesNetworksGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudPvminstancesNetworksGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesNetworksGetBadRequest) 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 +} + // NewPcloudPvminstancesNetworksGetUnauthorized creates a PcloudPvminstancesNetworksGetUnauthorized with default headers values func NewPcloudPvminstancesNetworksGetUnauthorized() *PcloudPvminstancesNetworksGetUnauthorized { return &PcloudPvminstancesNetworksGetUnauthorized{} @@ -188,6 +268,74 @@ func (o *PcloudPvminstancesNetworksGetUnauthorized) readResponse(response runtim return nil } +// NewPcloudPvminstancesNetworksGetForbidden creates a PcloudPvminstancesNetworksGetForbidden with default headers values +func NewPcloudPvminstancesNetworksGetForbidden() *PcloudPvminstancesNetworksGetForbidden { + return &PcloudPvminstancesNetworksGetForbidden{} +} + +/* +PcloudPvminstancesNetworksGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesNetworksGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances networks get forbidden response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks get forbidden response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks get forbidden response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks get forbidden response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks get forbidden response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances networks get forbidden response +func (o *PcloudPvminstancesNetworksGetForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesNetworksGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesNetworksGetForbidden) 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 +} + // NewPcloudPvminstancesNetworksGetNotFound creates a PcloudPvminstancesNetworksGetNotFound with default headers values func NewPcloudPvminstancesNetworksGetNotFound() *PcloudPvminstancesNetworksGetNotFound { return &PcloudPvminstancesNetworksGetNotFound{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go index 2c3a095e..5ec15c71 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudPvminstancesNetworksGetallReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesNetworksGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesNetworksGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudPvminstancesNetworksGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -256,6 +268,142 @@ func (o *PcloudPvminstancesNetworksGetallUnauthorized) readResponse(response run return nil } +// NewPcloudPvminstancesNetworksGetallForbidden creates a PcloudPvminstancesNetworksGetallForbidden with default headers values +func NewPcloudPvminstancesNetworksGetallForbidden() *PcloudPvminstancesNetworksGetallForbidden { + return &PcloudPvminstancesNetworksGetallForbidden{} +} + +/* +PcloudPvminstancesNetworksGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesNetworksGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances networks getall forbidden response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks getall forbidden response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks getall forbidden response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks getall forbidden response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks getall forbidden response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances networks getall forbidden response +func (o *PcloudPvminstancesNetworksGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesNetworksGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesNetworksGetallForbidden) 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 +} + +// NewPcloudPvminstancesNetworksGetallNotFound creates a PcloudPvminstancesNetworksGetallNotFound with default headers values +func NewPcloudPvminstancesNetworksGetallNotFound() *PcloudPvminstancesNetworksGetallNotFound { + return &PcloudPvminstancesNetworksGetallNotFound{} +} + +/* +PcloudPvminstancesNetworksGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesNetworksGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances networks getall not found response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks getall not found response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks getall not found response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks getall not found response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks getall not found response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances networks getall not found response +func (o *PcloudPvminstancesNetworksGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesNetworksGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesNetworksGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesNetworksGetallNotFound) 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 +} + // NewPcloudPvminstancesNetworksGetallInternalServerError creates a PcloudPvminstancesNetworksGetallInternalServerError with default headers values func NewPcloudPvminstancesNetworksGetallInternalServerError() *PcloudPvminstancesNetworksGetallInternalServerError { return &PcloudPvminstancesNetworksGetallInternalServerError{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go index 8c6e1e9e..59404682 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go @@ -41,6 +41,18 @@ func (o *PcloudPvminstancesNetworksPostReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesNetworksPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesNetworksPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudPvminstancesNetworksPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -268,6 +280,142 @@ func (o *PcloudPvminstancesNetworksPostUnauthorized) readResponse(response runti return nil } +// NewPcloudPvminstancesNetworksPostForbidden creates a PcloudPvminstancesNetworksPostForbidden with default headers values +func NewPcloudPvminstancesNetworksPostForbidden() *PcloudPvminstancesNetworksPostForbidden { + return &PcloudPvminstancesNetworksPostForbidden{} +} + +/* +PcloudPvminstancesNetworksPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesNetworksPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances networks post forbidden response has a 2xx status code +func (o *PcloudPvminstancesNetworksPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks post forbidden response has a 3xx status code +func (o *PcloudPvminstancesNetworksPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks post forbidden response has a 4xx status code +func (o *PcloudPvminstancesNetworksPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks post forbidden response has a 5xx status code +func (o *PcloudPvminstancesNetworksPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks post forbidden response a status code equal to that given +func (o *PcloudPvminstancesNetworksPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances networks post forbidden response +func (o *PcloudPvminstancesNetworksPostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesNetworksPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesNetworksPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesNetworksPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesNetworksPostForbidden) 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 +} + +// NewPcloudPvminstancesNetworksPostNotFound creates a PcloudPvminstancesNetworksPostNotFound with default headers values +func NewPcloudPvminstancesNetworksPostNotFound() *PcloudPvminstancesNetworksPostNotFound { + return &PcloudPvminstancesNetworksPostNotFound{} +} + +/* +PcloudPvminstancesNetworksPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesNetworksPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances networks post not found response has a 2xx status code +func (o *PcloudPvminstancesNetworksPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks post not found response has a 3xx status code +func (o *PcloudPvminstancesNetworksPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks post not found response has a 4xx status code +func (o *PcloudPvminstancesNetworksPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks post not found response has a 5xx status code +func (o *PcloudPvminstancesNetworksPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks post not found response a status code equal to that given +func (o *PcloudPvminstancesNetworksPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances networks post not found response +func (o *PcloudPvminstancesNetworksPostNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesNetworksPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesNetworksPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesNetworksPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesNetworksPostNotFound) 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 +} + // NewPcloudPvminstancesNetworksPostConflict creates a PcloudPvminstancesNetworksPostConflict with default headers values func NewPcloudPvminstancesNetworksPostConflict() *PcloudPvminstancesNetworksPostConflict { return &PcloudPvminstancesNetworksPostConflict{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go index d43c820d..b02cae3f 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesOperationsPostReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesOperationsPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesOperationsPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -266,6 +272,74 @@ func (o *PcloudPvminstancesOperationsPostUnauthorized) readResponse(response run return nil } +// NewPcloudPvminstancesOperationsPostForbidden creates a PcloudPvminstancesOperationsPostForbidden with default headers values +func NewPcloudPvminstancesOperationsPostForbidden() *PcloudPvminstancesOperationsPostForbidden { + return &PcloudPvminstancesOperationsPostForbidden{} +} + +/* +PcloudPvminstancesOperationsPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesOperationsPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances operations post forbidden response has a 2xx status code +func (o *PcloudPvminstancesOperationsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances operations post forbidden response has a 3xx status code +func (o *PcloudPvminstancesOperationsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances operations post forbidden response has a 4xx status code +func (o *PcloudPvminstancesOperationsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances operations post forbidden response has a 5xx status code +func (o *PcloudPvminstancesOperationsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances operations post forbidden response a status code equal to that given +func (o *PcloudPvminstancesOperationsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances operations post forbidden response +func (o *PcloudPvminstancesOperationsPostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesOperationsPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesOperationsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesOperationsPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesOperationsPostForbidden) 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 +} + // NewPcloudPvminstancesOperationsPostNotFound creates a PcloudPvminstancesOperationsPostNotFound with default headers values func NewPcloudPvminstancesOperationsPostNotFound() *PcloudPvminstancesOperationsPostNotFound { return &PcloudPvminstancesOperationsPostNotFound{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go index 2ec97cfd..fe4f0293 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go @@ -29,12 +29,24 @@ func (o *PcloudV2PvminstancesCaptureGetReader) ReadResponse(response runtime.Cli return nil, err } return result, nil + case 400: + result := NewPcloudV2PvminstancesCaptureGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudV2PvminstancesCaptureGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 403: + result := NewPcloudV2PvminstancesCaptureGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2PvminstancesCaptureGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -120,6 +132,74 @@ func (o *PcloudV2PvminstancesCaptureGetOK) readResponse(response runtime.ClientR return nil } +// NewPcloudV2PvminstancesCaptureGetBadRequest creates a PcloudV2PvminstancesCaptureGetBadRequest with default headers values +func NewPcloudV2PvminstancesCaptureGetBadRequest() *PcloudV2PvminstancesCaptureGetBadRequest { + return &PcloudV2PvminstancesCaptureGetBadRequest{} +} + +/* +PcloudV2PvminstancesCaptureGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudV2PvminstancesCaptureGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances capture get bad request response has a 2xx status code +func (o *PcloudV2PvminstancesCaptureGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture get bad request response has a 3xx status code +func (o *PcloudV2PvminstancesCaptureGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture get bad request response has a 4xx status code +func (o *PcloudV2PvminstancesCaptureGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture get bad request response has a 5xx status code +func (o *PcloudV2PvminstancesCaptureGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture get bad request response a status code equal to that given +func (o *PcloudV2PvminstancesCaptureGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 pvminstances capture get bad request response +func (o *PcloudV2PvminstancesCaptureGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudV2PvminstancesCaptureGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2PvminstancesCaptureGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2PvminstancesCaptureGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesCaptureGetBadRequest) 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 +} + // NewPcloudV2PvminstancesCaptureGetUnauthorized creates a PcloudV2PvminstancesCaptureGetUnauthorized with default headers values func NewPcloudV2PvminstancesCaptureGetUnauthorized() *PcloudV2PvminstancesCaptureGetUnauthorized { return &PcloudV2PvminstancesCaptureGetUnauthorized{} @@ -188,6 +268,74 @@ func (o *PcloudV2PvminstancesCaptureGetUnauthorized) readResponse(response runti return nil } +// NewPcloudV2PvminstancesCaptureGetForbidden creates a PcloudV2PvminstancesCaptureGetForbidden with default headers values +func NewPcloudV2PvminstancesCaptureGetForbidden() *PcloudV2PvminstancesCaptureGetForbidden { + return &PcloudV2PvminstancesCaptureGetForbidden{} +} + +/* +PcloudV2PvminstancesCaptureGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2PvminstancesCaptureGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances capture get forbidden response has a 2xx status code +func (o *PcloudV2PvminstancesCaptureGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture get forbidden response has a 3xx status code +func (o *PcloudV2PvminstancesCaptureGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture get forbidden response has a 4xx status code +func (o *PcloudV2PvminstancesCaptureGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture get forbidden response has a 5xx status code +func (o *PcloudV2PvminstancesCaptureGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture get forbidden response a status code equal to that given +func (o *PcloudV2PvminstancesCaptureGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 pvminstances capture get forbidden response +func (o *PcloudV2PvminstancesCaptureGetForbidden) Code() int { + return 403 +} + +func (o *PcloudV2PvminstancesCaptureGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2PvminstancesCaptureGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2PvminstancesCaptureGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesCaptureGetForbidden) 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 +} + // NewPcloudV2PvminstancesCaptureGetNotFound creates a PcloudV2PvminstancesCaptureGetNotFound with default headers values func NewPcloudV2PvminstancesCaptureGetNotFound() *PcloudV2PvminstancesCaptureGetNotFound { return &PcloudV2PvminstancesCaptureGetNotFound{} diff --git a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go index 0e64a728..362a6173 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2PvminstancesCapturePostReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 403: + result := NewPcloudV2PvminstancesCapturePostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2PvminstancesCapturePostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -274,6 +280,74 @@ func (o *PcloudV2PvminstancesCapturePostUnauthorized) readResponse(response runt return nil } +// NewPcloudV2PvminstancesCapturePostForbidden creates a PcloudV2PvminstancesCapturePostForbidden with default headers values +func NewPcloudV2PvminstancesCapturePostForbidden() *PcloudV2PvminstancesCapturePostForbidden { + return &PcloudV2PvminstancesCapturePostForbidden{} +} + +/* +PcloudV2PvminstancesCapturePostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2PvminstancesCapturePostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances capture post forbidden response has a 2xx status code +func (o *PcloudV2PvminstancesCapturePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture post forbidden response has a 3xx status code +func (o *PcloudV2PvminstancesCapturePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture post forbidden response has a 4xx status code +func (o *PcloudV2PvminstancesCapturePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture post forbidden response has a 5xx status code +func (o *PcloudV2PvminstancesCapturePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture post forbidden response a status code equal to that given +func (o *PcloudV2PvminstancesCapturePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 pvminstances capture post forbidden response +func (o *PcloudV2PvminstancesCapturePostForbidden) Code() int { + return 403 +} + +func (o *PcloudV2PvminstancesCapturePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2PvminstancesCapturePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2PvminstancesCapturePostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesCapturePostForbidden) 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 +} + // NewPcloudV2PvminstancesCapturePostNotFound creates a PcloudV2PvminstancesCapturePostNotFound with default headers values func NewPcloudV2PvminstancesCapturePostNotFound() *PcloudV2PvminstancesCapturePostNotFound { return &PcloudV2PvminstancesCapturePostNotFound{} @@ -282,7 +356,7 @@ func NewPcloudV2PvminstancesCapturePostNotFound() *PcloudV2PvminstancesCapturePo /* PcloudV2PvminstancesCapturePostNotFound describes a response with status code 404, with default header values. -pvm instance id not found +Not Found */ type PcloudV2PvminstancesCapturePostNotFound struct { Payload *models.Error diff --git a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go index 44c9ddb4..cc9bce59 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudV2PvminstancesGetallReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 404: + result := NewPcloudV2PvminstancesGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 408: result := NewPcloudV2PvminstancesGetallRequestTimeout() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +342,74 @@ func (o *PcloudV2PvminstancesGetallForbidden) readResponse(response runtime.Clie return nil } +// NewPcloudV2PvminstancesGetallNotFound creates a PcloudV2PvminstancesGetallNotFound with default headers values +func NewPcloudV2PvminstancesGetallNotFound() *PcloudV2PvminstancesGetallNotFound { + return &PcloudV2PvminstancesGetallNotFound{} +} + +/* +PcloudV2PvminstancesGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudV2PvminstancesGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances getall not found response has a 2xx status code +func (o *PcloudV2PvminstancesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances getall not found response has a 3xx status code +func (o *PcloudV2PvminstancesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances getall not found response has a 4xx status code +func (o *PcloudV2PvminstancesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances getall not found response has a 5xx status code +func (o *PcloudV2PvminstancesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances getall not found response a status code equal to that given +func (o *PcloudV2PvminstancesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 pvminstances getall not found response +func (o *PcloudV2PvminstancesGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudV2PvminstancesGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesGetallNotFound) 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 +} + // NewPcloudV2PvminstancesGetallRequestTimeout creates a PcloudV2PvminstancesGetallRequestTimeout with default headers values func NewPcloudV2PvminstancesGetallRequestTimeout() *PcloudV2PvminstancesGetallRequestTimeout { return &PcloudV2PvminstancesGetallRequestTimeout{} diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go index 99c7382d..de762b14 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsDeleteReader) ReadResponse(response runtime.Client return nil, err } return nil, result + case 401: + result := NewPcloudPlacementgroupsDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudPlacementgroupsDeleteForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -192,6 +198,74 @@ func (o *PcloudPlacementgroupsDeleteBadRequest) readResponse(response runtime.Cl return nil } +// NewPcloudPlacementgroupsDeleteUnauthorized creates a PcloudPlacementgroupsDeleteUnauthorized with default headers values +func NewPcloudPlacementgroupsDeleteUnauthorized() *PcloudPlacementgroupsDeleteUnauthorized { + return &PcloudPlacementgroupsDeleteUnauthorized{} +} + +/* +PcloudPlacementgroupsDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPlacementgroupsDeleteUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups delete unauthorized response has a 2xx status code +func (o *PcloudPlacementgroupsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups delete unauthorized response has a 3xx status code +func (o *PcloudPlacementgroupsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups delete unauthorized response has a 4xx status code +func (o *PcloudPlacementgroupsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups delete unauthorized response has a 5xx status code +func (o *PcloudPlacementgroupsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups delete unauthorized response a status code equal to that given +func (o *PcloudPlacementgroupsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud placementgroups delete unauthorized response +func (o *PcloudPlacementgroupsDeleteUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPlacementgroupsDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsDeleteUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsDeleteUnauthorized) 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 +} + // NewPcloudPlacementgroupsDeleteForbidden creates a PcloudPlacementgroupsDeleteForbidden with default headers values func NewPcloudPlacementgroupsDeleteForbidden() *PcloudPlacementgroupsDeleteForbidden { return &PcloudPlacementgroupsDeleteForbidden{} diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go index 6add7a6e..5a9b0ee8 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsGetReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 401: + result := NewPcloudPlacementgroupsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudPlacementgroupsGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -194,6 +200,74 @@ func (o *PcloudPlacementgroupsGetBadRequest) readResponse(response runtime.Clien return nil } +// NewPcloudPlacementgroupsGetUnauthorized creates a PcloudPlacementgroupsGetUnauthorized with default headers values +func NewPcloudPlacementgroupsGetUnauthorized() *PcloudPlacementgroupsGetUnauthorized { + return &PcloudPlacementgroupsGetUnauthorized{} +} + +/* +PcloudPlacementgroupsGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPlacementgroupsGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups get unauthorized response has a 2xx status code +func (o *PcloudPlacementgroupsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups get unauthorized response has a 3xx status code +func (o *PcloudPlacementgroupsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups get unauthorized response has a 4xx status code +func (o *PcloudPlacementgroupsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups get unauthorized response has a 5xx status code +func (o *PcloudPlacementgroupsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups get unauthorized response a status code equal to that given +func (o *PcloudPlacementgroupsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud placementgroups get unauthorized response +func (o *PcloudPlacementgroupsGetUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPlacementgroupsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsGetUnauthorized) 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 +} + // NewPcloudPlacementgroupsGetForbidden creates a PcloudPlacementgroupsGetForbidden with default headers values func NewPcloudPlacementgroupsGetForbidden() *PcloudPlacementgroupsGetForbidden { return &PcloudPlacementgroupsGetForbidden{} diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go index ee9a8f87..ce497c95 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudPlacementgroupsGetallReader) ReadResponse(response runtime.Client return nil, err } return nil, result + case 404: + result := NewPcloudPlacementgroupsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudPlacementgroupsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudPlacementgroupsGetallForbidden) readResponse(response runtime.Cli return nil } +// NewPcloudPlacementgroupsGetallNotFound creates a PcloudPlacementgroupsGetallNotFound with default headers values +func NewPcloudPlacementgroupsGetallNotFound() *PcloudPlacementgroupsGetallNotFound { + return &PcloudPlacementgroupsGetallNotFound{} +} + +/* +PcloudPlacementgroupsGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPlacementgroupsGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups getall not found response has a 2xx status code +func (o *PcloudPlacementgroupsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups getall not found response has a 3xx status code +func (o *PcloudPlacementgroupsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups getall not found response has a 4xx status code +func (o *PcloudPlacementgroupsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups getall not found response has a 5xx status code +func (o *PcloudPlacementgroupsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups getall not found response a status code equal to that given +func (o *PcloudPlacementgroupsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud placementgroups getall not found response +func (o *PcloudPlacementgroupsGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudPlacementgroupsGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPlacementgroupsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPlacementgroupsGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsGetallNotFound) 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 +} + // NewPcloudPlacementgroupsGetallInternalServerError creates a PcloudPlacementgroupsGetallInternalServerError with default headers values func NewPcloudPlacementgroupsGetallInternalServerError() *PcloudPlacementgroupsGetallInternalServerError { return &PcloudPlacementgroupsGetallInternalServerError{} diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go index 2bde965b..f7e58a2e 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsMembersDeleteReader) ReadResponse(response runtime return nil, err } return nil, result + case 401: + result := NewPcloudPlacementgroupsMembersDeleteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudPlacementgroupsMembersDeleteForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -206,6 +212,74 @@ func (o *PcloudPlacementgroupsMembersDeleteBadRequest) readResponse(response run return nil } +// NewPcloudPlacementgroupsMembersDeleteUnauthorized creates a PcloudPlacementgroupsMembersDeleteUnauthorized with default headers values +func NewPcloudPlacementgroupsMembersDeleteUnauthorized() *PcloudPlacementgroupsMembersDeleteUnauthorized { + return &PcloudPlacementgroupsMembersDeleteUnauthorized{} +} + +/* +PcloudPlacementgroupsMembersDeleteUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPlacementgroupsMembersDeleteUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups members delete unauthorized response has a 2xx status code +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members delete unauthorized response has a 3xx status code +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members delete unauthorized response has a 4xx status code +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members delete unauthorized response has a 5xx status code +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members delete unauthorized response a status code equal to that given +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud placementgroups members delete unauthorized response +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsMembersDeleteUnauthorized) 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 +} + // NewPcloudPlacementgroupsMembersDeleteForbidden creates a PcloudPlacementgroupsMembersDeleteForbidden with default headers values func NewPcloudPlacementgroupsMembersDeleteForbidden() *PcloudPlacementgroupsMembersDeleteForbidden { return &PcloudPlacementgroupsMembersDeleteForbidden{} diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go index 41626a29..5c0e64d8 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsMembersPostReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 401: + result := NewPcloudPlacementgroupsMembersPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudPlacementgroupsMembersPostForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -206,6 +212,74 @@ func (o *PcloudPlacementgroupsMembersPostBadRequest) readResponse(response runti return nil } +// NewPcloudPlacementgroupsMembersPostUnauthorized creates a PcloudPlacementgroupsMembersPostUnauthorized with default headers values +func NewPcloudPlacementgroupsMembersPostUnauthorized() *PcloudPlacementgroupsMembersPostUnauthorized { + return &PcloudPlacementgroupsMembersPostUnauthorized{} +} + +/* +PcloudPlacementgroupsMembersPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPlacementgroupsMembersPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups members post unauthorized response has a 2xx status code +func (o *PcloudPlacementgroupsMembersPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members post unauthorized response has a 3xx status code +func (o *PcloudPlacementgroupsMembersPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members post unauthorized response has a 4xx status code +func (o *PcloudPlacementgroupsMembersPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members post unauthorized response has a 5xx status code +func (o *PcloudPlacementgroupsMembersPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members post unauthorized response a status code equal to that given +func (o *PcloudPlacementgroupsMembersPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud placementgroups members post unauthorized response +func (o *PcloudPlacementgroupsMembersPostUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPlacementgroupsMembersPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsMembersPostUnauthorized) 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 +} + // NewPcloudPlacementgroupsMembersPostForbidden creates a PcloudPlacementgroupsMembersPostForbidden with default headers values func NewPcloudPlacementgroupsMembersPostForbidden() *PcloudPlacementgroupsMembersPostForbidden { return &PcloudPlacementgroupsMembersPostForbidden{} diff --git a/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go index b5c5e3bc..71a5a918 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go @@ -35,12 +35,24 @@ func (o *PcloudPlacementgroupsPostReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 401: + result := NewPcloudPlacementgroupsPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudPlacementgroupsPostForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 404: + result := NewPcloudPlacementgroupsPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudPlacementgroupsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -200,6 +212,74 @@ func (o *PcloudPlacementgroupsPostBadRequest) readResponse(response runtime.Clie return nil } +// NewPcloudPlacementgroupsPostUnauthorized creates a PcloudPlacementgroupsPostUnauthorized with default headers values +func NewPcloudPlacementgroupsPostUnauthorized() *PcloudPlacementgroupsPostUnauthorized { + return &PcloudPlacementgroupsPostUnauthorized{} +} + +/* +PcloudPlacementgroupsPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPlacementgroupsPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups post unauthorized response has a 2xx status code +func (o *PcloudPlacementgroupsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups post unauthorized response has a 3xx status code +func (o *PcloudPlacementgroupsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups post unauthorized response has a 4xx status code +func (o *PcloudPlacementgroupsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups post unauthorized response has a 5xx status code +func (o *PcloudPlacementgroupsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups post unauthorized response a status code equal to that given +func (o *PcloudPlacementgroupsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud placementgroups post unauthorized response +func (o *PcloudPlacementgroupsPostUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPlacementgroupsPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPlacementgroupsPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsPostUnauthorized) 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 +} + // NewPcloudPlacementgroupsPostForbidden creates a PcloudPlacementgroupsPostForbidden with default headers values func NewPcloudPlacementgroupsPostForbidden() *PcloudPlacementgroupsPostForbidden { return &PcloudPlacementgroupsPostForbidden{} @@ -268,6 +348,74 @@ func (o *PcloudPlacementgroupsPostForbidden) readResponse(response runtime.Clien return nil } +// NewPcloudPlacementgroupsPostNotFound creates a PcloudPlacementgroupsPostNotFound with default headers values +func NewPcloudPlacementgroupsPostNotFound() *PcloudPlacementgroupsPostNotFound { + return &PcloudPlacementgroupsPostNotFound{} +} + +/* +PcloudPlacementgroupsPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPlacementgroupsPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups post not found response has a 2xx status code +func (o *PcloudPlacementgroupsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups post not found response has a 3xx status code +func (o *PcloudPlacementgroupsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups post not found response has a 4xx status code +func (o *PcloudPlacementgroupsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups post not found response has a 5xx status code +func (o *PcloudPlacementgroupsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups post not found response a status code equal to that given +func (o *PcloudPlacementgroupsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud placementgroups post not found response +func (o *PcloudPlacementgroupsPostNotFound) Code() int { + return 404 +} + +func (o *PcloudPlacementgroupsPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPlacementgroupsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPlacementgroupsPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsPostNotFound) 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 +} + // NewPcloudPlacementgroupsPostConflict creates a PcloudPlacementgroupsPostConflict with default headers values func NewPcloudPlacementgroupsPostConflict() *PcloudPlacementgroupsPostConflict { return &PcloudPlacementgroupsPostConflict{} diff --git a/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go b/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go index 51557ecc..681badbb 100644 --- a/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go +++ b/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go @@ -29,6 +29,12 @@ func (o *PcloudPodcapacityGetReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil + case 400: + result := NewPcloudPodcapacityGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudPodcapacityGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -41,6 +47,12 @@ func (o *PcloudPodcapacityGetReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 404: + result := NewPcloudPodcapacityGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudPodcapacityGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -120,6 +132,74 @@ func (o *PcloudPodcapacityGetOK) readResponse(response runtime.ClientResponse, c return nil } +// NewPcloudPodcapacityGetBadRequest creates a PcloudPodcapacityGetBadRequest with default headers values +func NewPcloudPodcapacityGetBadRequest() *PcloudPodcapacityGetBadRequest { + return &PcloudPodcapacityGetBadRequest{} +} + +/* +PcloudPodcapacityGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudPodcapacityGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud podcapacity get bad request response has a 2xx status code +func (o *PcloudPodcapacityGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud podcapacity get bad request response has a 3xx status code +func (o *PcloudPodcapacityGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud podcapacity get bad request response has a 4xx status code +func (o *PcloudPodcapacityGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud podcapacity get bad request response has a 5xx status code +func (o *PcloudPodcapacityGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud podcapacity get bad request response a status code equal to that given +func (o *PcloudPodcapacityGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud podcapacity get bad request response +func (o *PcloudPodcapacityGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudPodcapacityGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPodcapacityGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudPodcapacityGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPodcapacityGetBadRequest) 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 +} + // NewPcloudPodcapacityGetUnauthorized creates a PcloudPodcapacityGetUnauthorized with default headers values func NewPcloudPodcapacityGetUnauthorized() *PcloudPodcapacityGetUnauthorized { return &PcloudPodcapacityGetUnauthorized{} @@ -256,6 +336,74 @@ func (o *PcloudPodcapacityGetForbidden) readResponse(response runtime.ClientResp return nil } +// NewPcloudPodcapacityGetNotFound creates a PcloudPodcapacityGetNotFound with default headers values +func NewPcloudPodcapacityGetNotFound() *PcloudPodcapacityGetNotFound { + return &PcloudPodcapacityGetNotFound{} +} + +/* +PcloudPodcapacityGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPodcapacityGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud podcapacity get not found response has a 2xx status code +func (o *PcloudPodcapacityGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud podcapacity get not found response has a 3xx status code +func (o *PcloudPodcapacityGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud podcapacity get not found response has a 4xx status code +func (o *PcloudPodcapacityGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud podcapacity get not found response has a 5xx status code +func (o *PcloudPodcapacityGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud podcapacity get not found response a status code equal to that given +func (o *PcloudPodcapacityGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud podcapacity get not found response +func (o *PcloudPodcapacityGetNotFound) Code() int { + return 404 +} + +func (o *PcloudPodcapacityGetNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPodcapacityGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPodcapacityGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPodcapacityGetNotFound) 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 +} + // NewPcloudPodcapacityGetInternalServerError creates a PcloudPodcapacityGetInternalServerError with default headers values func NewPcloudPodcapacityGetInternalServerError() *PcloudPodcapacityGetInternalServerError { return &PcloudPodcapacityGetInternalServerError{} diff --git a/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go index 10afeb68..ec80f3bd 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudSapGetReader) ReadResponse(response runtime.ClientResponse, consu return nil, err } return nil, result + case 403: + result := NewPcloudSapGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudSapGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +268,74 @@ func (o *PcloudSapGetUnauthorized) readResponse(response runtime.ClientResponse, return nil } +// NewPcloudSapGetForbidden creates a PcloudSapGetForbidden with default headers values +func NewPcloudSapGetForbidden() *PcloudSapGetForbidden { + return &PcloudSapGetForbidden{} +} + +/* +PcloudSapGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudSapGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sap get forbidden response has a 2xx status code +func (o *PcloudSapGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap get forbidden response has a 3xx status code +func (o *PcloudSapGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap get forbidden response has a 4xx status code +func (o *PcloudSapGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap get forbidden response has a 5xx status code +func (o *PcloudSapGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap get forbidden response a status code equal to that given +func (o *PcloudSapGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sap get forbidden response +func (o *PcloudSapGetForbidden) Code() int { + return 403 +} + +func (o *PcloudSapGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSapGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSapGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSapGetForbidden) 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 +} + // NewPcloudSapGetNotFound creates a PcloudSapGetNotFound with default headers values func NewPcloudSapGetNotFound() *PcloudSapGetNotFound { return &PcloudSapGetNotFound{} diff --git a/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go index 93f36e08..52684d05 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudSapGetallReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return nil, result + case 403: + result := NewPcloudSapGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudSapGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudSapGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -256,6 +268,142 @@ func (o *PcloudSapGetallUnauthorized) readResponse(response runtime.ClientRespon return nil } +// NewPcloudSapGetallForbidden creates a PcloudSapGetallForbidden with default headers values +func NewPcloudSapGetallForbidden() *PcloudSapGetallForbidden { + return &PcloudSapGetallForbidden{} +} + +/* +PcloudSapGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudSapGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sap getall forbidden response has a 2xx status code +func (o *PcloudSapGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap getall forbidden response has a 3xx status code +func (o *PcloudSapGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap getall forbidden response has a 4xx status code +func (o *PcloudSapGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap getall forbidden response has a 5xx status code +func (o *PcloudSapGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap getall forbidden response a status code equal to that given +func (o *PcloudSapGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sap getall forbidden response +func (o *PcloudSapGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudSapGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSapGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSapGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSapGetallForbidden) 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 +} + +// NewPcloudSapGetallNotFound creates a PcloudSapGetallNotFound with default headers values +func NewPcloudSapGetallNotFound() *PcloudSapGetallNotFound { + return &PcloudSapGetallNotFound{} +} + +/* +PcloudSapGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudSapGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sap getall not found response has a 2xx status code +func (o *PcloudSapGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap getall not found response has a 3xx status code +func (o *PcloudSapGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap getall not found response has a 4xx status code +func (o *PcloudSapGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap getall not found response has a 5xx status code +func (o *PcloudSapGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap getall not found response a status code equal to that given +func (o *PcloudSapGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sap getall not found response +func (o *PcloudSapGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudSapGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSapGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSapGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSapGetallNotFound) 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 +} + // NewPcloudSapGetallInternalServerError creates a PcloudSapGetallInternalServerError with default headers values func NewPcloudSapGetallInternalServerError() *PcloudSapGetallInternalServerError { return &PcloudSapGetallInternalServerError{} diff --git a/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go index b55b2ab4..f68c030e 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go @@ -53,6 +53,18 @@ func (o *PcloudSapPostReader) ReadResponse(response runtime.ClientResponse, cons return nil, err } return nil, result + case 403: + result := NewPcloudSapPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudSapPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudSapPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -410,6 +422,142 @@ func (o *PcloudSapPostUnauthorized) readResponse(response runtime.ClientResponse return nil } +// NewPcloudSapPostForbidden creates a PcloudSapPostForbidden with default headers values +func NewPcloudSapPostForbidden() *PcloudSapPostForbidden { + return &PcloudSapPostForbidden{} +} + +/* +PcloudSapPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudSapPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sap post forbidden response has a 2xx status code +func (o *PcloudSapPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap post forbidden response has a 3xx status code +func (o *PcloudSapPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post forbidden response has a 4xx status code +func (o *PcloudSapPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap post forbidden response has a 5xx status code +func (o *PcloudSapPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post forbidden response a status code equal to that given +func (o *PcloudSapPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sap post forbidden response +func (o *PcloudSapPostForbidden) Code() int { + return 403 +} + +func (o *PcloudSapPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSapPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSapPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSapPostForbidden) 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 +} + +// NewPcloudSapPostNotFound creates a PcloudSapPostNotFound with default headers values +func NewPcloudSapPostNotFound() *PcloudSapPostNotFound { + return &PcloudSapPostNotFound{} +} + +/* +PcloudSapPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudSapPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sap post not found response has a 2xx status code +func (o *PcloudSapPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap post not found response has a 3xx status code +func (o *PcloudSapPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post not found response has a 4xx status code +func (o *PcloudSapPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap post not found response has a 5xx status code +func (o *PcloudSapPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post not found response a status code equal to that given +func (o *PcloudSapPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sap post not found response +func (o *PcloudSapPostNotFound) Code() int { + return 404 +} + +func (o *PcloudSapPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSapPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSapPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSapPostNotFound) 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 +} + // NewPcloudSapPostConflict creates a PcloudSapPostConflict with default headers values func NewPcloudSapPostConflict() *PcloudSapPostConflict { return &PcloudSapPostConflict{} diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go index cc6012df..07a983d3 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudSppplacementgroupsGetReader) ReadResponse(response runtime.Client return nil, err } return nil, result + case 403: + result := NewPcloudSppplacementgroupsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudSppplacementgroupsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +268,74 @@ func (o *PcloudSppplacementgroupsGetUnauthorized) readResponse(response runtime. return nil } +// NewPcloudSppplacementgroupsGetForbidden creates a PcloudSppplacementgroupsGetForbidden with default headers values +func NewPcloudSppplacementgroupsGetForbidden() *PcloudSppplacementgroupsGetForbidden { + return &PcloudSppplacementgroupsGetForbidden{} +} + +/* +PcloudSppplacementgroupsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudSppplacementgroupsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sppplacementgroups get forbidden response has a 2xx status code +func (o *PcloudSppplacementgroupsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups get forbidden response has a 3xx status code +func (o *PcloudSppplacementgroupsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups get forbidden response has a 4xx status code +func (o *PcloudSppplacementgroupsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups get forbidden response has a 5xx status code +func (o *PcloudSppplacementgroupsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups get forbidden response a status code equal to that given +func (o *PcloudSppplacementgroupsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sppplacementgroups get forbidden response +func (o *PcloudSppplacementgroupsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudSppplacementgroupsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSppplacementgroupsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSppplacementgroupsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSppplacementgroupsGetForbidden) 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 +} + // NewPcloudSppplacementgroupsGetNotFound creates a PcloudSppplacementgroupsGetNotFound with default headers values func NewPcloudSppplacementgroupsGetNotFound() *PcloudSppplacementgroupsGetNotFound { return &PcloudSppplacementgroupsGetNotFound{} diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go index 4b01ddae..d11ee16e 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go @@ -47,6 +47,12 @@ func (o *PcloudSppplacementgroupsPostReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 404: + result := NewPcloudSppplacementgroupsPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudSppplacementgroupsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -342,6 +348,74 @@ func (o *PcloudSppplacementgroupsPostForbidden) readResponse(response runtime.Cl return nil } +// NewPcloudSppplacementgroupsPostNotFound creates a PcloudSppplacementgroupsPostNotFound with default headers values +func NewPcloudSppplacementgroupsPostNotFound() *PcloudSppplacementgroupsPostNotFound { + return &PcloudSppplacementgroupsPostNotFound{} +} + +/* +PcloudSppplacementgroupsPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudSppplacementgroupsPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sppplacementgroups post not found response has a 2xx status code +func (o *PcloudSppplacementgroupsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups post not found response has a 3xx status code +func (o *PcloudSppplacementgroupsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups post not found response has a 4xx status code +func (o *PcloudSppplacementgroupsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups post not found response has a 5xx status code +func (o *PcloudSppplacementgroupsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups post not found response a status code equal to that given +func (o *PcloudSppplacementgroupsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sppplacementgroups post not found response +func (o *PcloudSppplacementgroupsPostNotFound) Code() int { + return 404 +} + +func (o *PcloudSppplacementgroupsPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSppplacementgroupsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSppplacementgroupsPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSppplacementgroupsPostNotFound) 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 +} + // NewPcloudSppplacementgroupsPostConflict creates a PcloudSppplacementgroupsPostConflict with default headers values func NewPcloudSppplacementgroupsPostConflict() *PcloudSppplacementgroupsPostConflict { return &PcloudSppplacementgroupsPostConflict{} diff --git a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go index 858d6ea3..b8847e08 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudDhcpGetReader) ReadResponse(response runtime.ClientResponse, cons return nil, err } return nil, result + case 401: + result := NewPcloudDhcpGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudDhcpGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -194,6 +200,74 @@ func (o *PcloudDhcpGetBadRequest) readResponse(response runtime.ClientResponse, return nil } +// NewPcloudDhcpGetUnauthorized creates a PcloudDhcpGetUnauthorized with default headers values +func NewPcloudDhcpGetUnauthorized() *PcloudDhcpGetUnauthorized { + return &PcloudDhcpGetUnauthorized{} +} + +/* +PcloudDhcpGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudDhcpGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud dhcp get unauthorized response has a 2xx status code +func (o *PcloudDhcpGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp get unauthorized response has a 3xx status code +func (o *PcloudDhcpGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp get unauthorized response has a 4xx status code +func (o *PcloudDhcpGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp get unauthorized response has a 5xx status code +func (o *PcloudDhcpGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp get unauthorized response a status code equal to that given +func (o *PcloudDhcpGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud dhcp get unauthorized response +func (o *PcloudDhcpGetUnauthorized) Code() int { + return 401 +} + +func (o *PcloudDhcpGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudDhcpGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudDhcpGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudDhcpGetUnauthorized) 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 +} + // NewPcloudDhcpGetForbidden creates a PcloudDhcpGetForbidden with default headers values func NewPcloudDhcpGetForbidden() *PcloudDhcpGetForbidden { return &PcloudDhcpGetForbidden{} diff --git a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go index 9d90835b..f90457a4 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go @@ -29,12 +29,30 @@ func (o *PcloudDhcpGetallReader) ReadResponse(response runtime.ClientResponse, c return nil, err } return result, nil + case 400: + result := NewPcloudDhcpGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewPcloudDhcpGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudDhcpGetallForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 404: + result := NewPcloudDhcpGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudDhcpGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -112,6 +130,142 @@ func (o *PcloudDhcpGetallOK) readResponse(response runtime.ClientResponse, consu return nil } +// NewPcloudDhcpGetallBadRequest creates a PcloudDhcpGetallBadRequest with default headers values +func NewPcloudDhcpGetallBadRequest() *PcloudDhcpGetallBadRequest { + return &PcloudDhcpGetallBadRequest{} +} + +/* +PcloudDhcpGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudDhcpGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud dhcp getall bad request response has a 2xx status code +func (o *PcloudDhcpGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp getall bad request response has a 3xx status code +func (o *PcloudDhcpGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp getall bad request response has a 4xx status code +func (o *PcloudDhcpGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp getall bad request response has a 5xx status code +func (o *PcloudDhcpGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp getall bad request response a status code equal to that given +func (o *PcloudDhcpGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud dhcp getall bad request response +func (o *PcloudDhcpGetallBadRequest) Code() int { + return 400 +} + +func (o *PcloudDhcpGetallBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudDhcpGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudDhcpGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudDhcpGetallBadRequest) 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 +} + +// NewPcloudDhcpGetallUnauthorized creates a PcloudDhcpGetallUnauthorized with default headers values +func NewPcloudDhcpGetallUnauthorized() *PcloudDhcpGetallUnauthorized { + return &PcloudDhcpGetallUnauthorized{} +} + +/* +PcloudDhcpGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudDhcpGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud dhcp getall unauthorized response has a 2xx status code +func (o *PcloudDhcpGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp getall unauthorized response has a 3xx status code +func (o *PcloudDhcpGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp getall unauthorized response has a 4xx status code +func (o *PcloudDhcpGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp getall unauthorized response has a 5xx status code +func (o *PcloudDhcpGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp getall unauthorized response a status code equal to that given +func (o *PcloudDhcpGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud dhcp getall unauthorized response +func (o *PcloudDhcpGetallUnauthorized) Code() int { + return 401 +} + +func (o *PcloudDhcpGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudDhcpGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudDhcpGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudDhcpGetallUnauthorized) 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 +} + // NewPcloudDhcpGetallForbidden creates a PcloudDhcpGetallForbidden with default headers values func NewPcloudDhcpGetallForbidden() *PcloudDhcpGetallForbidden { return &PcloudDhcpGetallForbidden{} @@ -180,6 +334,74 @@ func (o *PcloudDhcpGetallForbidden) readResponse(response runtime.ClientResponse return nil } +// NewPcloudDhcpGetallNotFound creates a PcloudDhcpGetallNotFound with default headers values +func NewPcloudDhcpGetallNotFound() *PcloudDhcpGetallNotFound { + return &PcloudDhcpGetallNotFound{} +} + +/* +PcloudDhcpGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudDhcpGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud dhcp getall not found response has a 2xx status code +func (o *PcloudDhcpGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp getall not found response has a 3xx status code +func (o *PcloudDhcpGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp getall not found response has a 4xx status code +func (o *PcloudDhcpGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp getall not found response has a 5xx status code +func (o *PcloudDhcpGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp getall not found response a status code equal to that given +func (o *PcloudDhcpGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud dhcp getall not found response +func (o *PcloudDhcpGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudDhcpGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudDhcpGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudDhcpGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudDhcpGetallNotFound) 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 +} + // NewPcloudDhcpGetallInternalServerError creates a PcloudDhcpGetallInternalServerError with default headers values func NewPcloudDhcpGetallInternalServerError() *PcloudDhcpGetallInternalServerError { return &PcloudDhcpGetallInternalServerError{} diff --git a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go index 43bd535f..2578e70c 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go @@ -35,12 +35,24 @@ func (o *PcloudDhcpPostReader) ReadResponse(response runtime.ClientResponse, con return nil, err } return nil, result + case 401: + result := NewPcloudDhcpPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudDhcpPostForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 404: + result := NewPcloudDhcpPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudDhcpPostInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -188,6 +200,74 @@ func (o *PcloudDhcpPostBadRequest) readResponse(response runtime.ClientResponse, return nil } +// NewPcloudDhcpPostUnauthorized creates a PcloudDhcpPostUnauthorized with default headers values +func NewPcloudDhcpPostUnauthorized() *PcloudDhcpPostUnauthorized { + return &PcloudDhcpPostUnauthorized{} +} + +/* +PcloudDhcpPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudDhcpPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud dhcp post unauthorized response has a 2xx status code +func (o *PcloudDhcpPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp post unauthorized response has a 3xx status code +func (o *PcloudDhcpPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp post unauthorized response has a 4xx status code +func (o *PcloudDhcpPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp post unauthorized response has a 5xx status code +func (o *PcloudDhcpPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp post unauthorized response a status code equal to that given +func (o *PcloudDhcpPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud dhcp post unauthorized response +func (o *PcloudDhcpPostUnauthorized) Code() int { + return 401 +} + +func (o *PcloudDhcpPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudDhcpPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudDhcpPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudDhcpPostUnauthorized) 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 +} + // NewPcloudDhcpPostForbidden creates a PcloudDhcpPostForbidden with default headers values func NewPcloudDhcpPostForbidden() *PcloudDhcpPostForbidden { return &PcloudDhcpPostForbidden{} @@ -256,6 +336,74 @@ func (o *PcloudDhcpPostForbidden) readResponse(response runtime.ClientResponse, return nil } +// NewPcloudDhcpPostNotFound creates a PcloudDhcpPostNotFound with default headers values +func NewPcloudDhcpPostNotFound() *PcloudDhcpPostNotFound { + return &PcloudDhcpPostNotFound{} +} + +/* +PcloudDhcpPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudDhcpPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud dhcp post not found response has a 2xx status code +func (o *PcloudDhcpPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp post not found response has a 3xx status code +func (o *PcloudDhcpPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp post not found response has a 4xx status code +func (o *PcloudDhcpPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp post not found response has a 5xx status code +func (o *PcloudDhcpPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp post not found response a status code equal to that given +func (o *PcloudDhcpPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud dhcp post not found response +func (o *PcloudDhcpPostNotFound) Code() int { + return 404 +} + +func (o *PcloudDhcpPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudDhcpPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudDhcpPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudDhcpPostNotFound) 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 +} + // NewPcloudDhcpPostInternalServerError creates a PcloudDhcpPostInternalServerError with default headers values func NewPcloudDhcpPostInternalServerError() *PcloudDhcpPostInternalServerError { return &PcloudDhcpPostInternalServerError{} diff --git a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go index 002a0f3e..52cdaca5 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudSharedprocessorpoolsGetReader) ReadResponse(response runtime.Clie return nil, err } return nil, result + case 403: + result := NewPcloudSharedprocessorpoolsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudSharedprocessorpoolsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +268,74 @@ func (o *PcloudSharedprocessorpoolsGetUnauthorized) readResponse(response runtim return nil } +// NewPcloudSharedprocessorpoolsGetForbidden creates a PcloudSharedprocessorpoolsGetForbidden with default headers values +func NewPcloudSharedprocessorpoolsGetForbidden() *PcloudSharedprocessorpoolsGetForbidden { + return &PcloudSharedprocessorpoolsGetForbidden{} +} + +/* +PcloudSharedprocessorpoolsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudSharedprocessorpoolsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sharedprocessorpools get forbidden response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools get forbidden response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools get forbidden response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools get forbidden response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools get forbidden response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sharedprocessorpools get forbidden response +func (o *PcloudSharedprocessorpoolsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudSharedprocessorpoolsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSharedprocessorpoolsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSharedprocessorpoolsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSharedprocessorpoolsGetForbidden) 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 +} + // NewPcloudSharedprocessorpoolsGetNotFound creates a PcloudSharedprocessorpoolsGetNotFound with default headers values func NewPcloudSharedprocessorpoolsGetNotFound() *PcloudSharedprocessorpoolsGetNotFound { return &PcloudSharedprocessorpoolsGetNotFound{} diff --git a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go index 5e87d98d..97d5f4ce 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go @@ -47,6 +47,12 @@ func (o *PcloudSharedprocessorpoolsPostReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 404: + result := NewPcloudSharedprocessorpoolsPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudSharedprocessorpoolsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -342,6 +348,74 @@ func (o *PcloudSharedprocessorpoolsPostForbidden) readResponse(response runtime. return nil } +// NewPcloudSharedprocessorpoolsPostNotFound creates a PcloudSharedprocessorpoolsPostNotFound with default headers values +func NewPcloudSharedprocessorpoolsPostNotFound() *PcloudSharedprocessorpoolsPostNotFound { + return &PcloudSharedprocessorpoolsPostNotFound{} +} + +/* +PcloudSharedprocessorpoolsPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudSharedprocessorpoolsPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud sharedprocessorpools post not found response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools post not found response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools post not found response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools post not found response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools post not found response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sharedprocessorpools post not found response +func (o *PcloudSharedprocessorpoolsPostNotFound) Code() int { + return 404 +} + +func (o *PcloudSharedprocessorpoolsPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSharedprocessorpoolsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSharedprocessorpoolsPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSharedprocessorpoolsPostNotFound) 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 +} + // NewPcloudSharedprocessorpoolsPostConflict creates a PcloudSharedprocessorpoolsPostConflict with default headers values func NewPcloudSharedprocessorpoolsPostConflict() *PcloudSharedprocessorpoolsPostConflict { return &PcloudSharedprocessorpoolsPostConflict{} diff --git a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go index f2579e02..5cf8680e 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go +++ b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudCloudinstancesSnapshotsGetallReader) ReadResponse(response runtim return nil, err } return nil, result + case 404: + result := NewPcloudCloudinstancesSnapshotsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudCloudinstancesSnapshotsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudCloudinstancesSnapshotsGetallForbidden) readResponse(response run return nil } +// NewPcloudCloudinstancesSnapshotsGetallNotFound creates a PcloudCloudinstancesSnapshotsGetallNotFound with default headers values +func NewPcloudCloudinstancesSnapshotsGetallNotFound() *PcloudCloudinstancesSnapshotsGetallNotFound { + return &PcloudCloudinstancesSnapshotsGetallNotFound{} +} + +/* +PcloudCloudinstancesSnapshotsGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesSnapshotsGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances snapshots getall not found response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots getall not found response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots getall not found response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots getall not found response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots getall not found response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances snapshots getall not found response +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSnapshotsGetallNotFound) 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 +} + // NewPcloudCloudinstancesSnapshotsGetallInternalServerError creates a PcloudCloudinstancesSnapshotsGetallInternalServerError with default headers values func NewPcloudCloudinstancesSnapshotsGetallInternalServerError() *PcloudCloudinstancesSnapshotsGetallInternalServerError { return &PcloudCloudinstancesSnapshotsGetallInternalServerError{} diff --git a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go index d6d742cb..041ad0f2 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go @@ -29,6 +29,12 @@ func (o *PcloudStoragecapacityPoolsGetReader) ReadResponse(response runtime.Clie return nil, err } return result, nil + case 400: + result := NewPcloudStoragecapacityPoolsGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudStoragecapacityPoolsGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -126,6 +132,74 @@ func (o *PcloudStoragecapacityPoolsGetOK) readResponse(response runtime.ClientRe return nil } +// NewPcloudStoragecapacityPoolsGetBadRequest creates a PcloudStoragecapacityPoolsGetBadRequest with default headers values +func NewPcloudStoragecapacityPoolsGetBadRequest() *PcloudStoragecapacityPoolsGetBadRequest { + return &PcloudStoragecapacityPoolsGetBadRequest{} +} + +/* +PcloudStoragecapacityPoolsGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudStoragecapacityPoolsGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity pools get bad request response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools get bad request response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools get bad request response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity pools get bad request response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools get bad request response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud storagecapacity pools get bad request response +func (o *PcloudStoragecapacityPoolsGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudStoragecapacityPoolsGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityPoolsGetBadRequest) 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 +} + // NewPcloudStoragecapacityPoolsGetUnauthorized creates a PcloudStoragecapacityPoolsGetUnauthorized with default headers values func NewPcloudStoragecapacityPoolsGetUnauthorized() *PcloudStoragecapacityPoolsGetUnauthorized { return &PcloudStoragecapacityPoolsGetUnauthorized{} diff --git a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go index f5bbc1a9..10087904 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go @@ -29,6 +29,12 @@ func (o *PcloudStoragecapacityPoolsGetallReader) ReadResponse(response runtime.C return nil, err } return result, nil + case 400: + result := NewPcloudStoragecapacityPoolsGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudStoragecapacityPoolsGetallUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -41,6 +47,12 @@ func (o *PcloudStoragecapacityPoolsGetallReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 404: + result := NewPcloudStoragecapacityPoolsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudStoragecapacityPoolsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -120,6 +132,74 @@ func (o *PcloudStoragecapacityPoolsGetallOK) readResponse(response runtime.Clien return nil } +// NewPcloudStoragecapacityPoolsGetallBadRequest creates a PcloudStoragecapacityPoolsGetallBadRequest with default headers values +func NewPcloudStoragecapacityPoolsGetallBadRequest() *PcloudStoragecapacityPoolsGetallBadRequest { + return &PcloudStoragecapacityPoolsGetallBadRequest{} +} + +/* +PcloudStoragecapacityPoolsGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudStoragecapacityPoolsGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity pools getall bad request response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools getall bad request response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools getall bad request response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity pools getall bad request response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools getall bad request response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud storagecapacity pools getall bad request response +func (o *PcloudStoragecapacityPoolsGetallBadRequest) Code() int { + return 400 +} + +func (o *PcloudStoragecapacityPoolsGetallBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityPoolsGetallBadRequest) 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 +} + // NewPcloudStoragecapacityPoolsGetallUnauthorized creates a PcloudStoragecapacityPoolsGetallUnauthorized with default headers values func NewPcloudStoragecapacityPoolsGetallUnauthorized() *PcloudStoragecapacityPoolsGetallUnauthorized { return &PcloudStoragecapacityPoolsGetallUnauthorized{} @@ -256,6 +336,74 @@ func (o *PcloudStoragecapacityPoolsGetallForbidden) readResponse(response runtim return nil } +// NewPcloudStoragecapacityPoolsGetallNotFound creates a PcloudStoragecapacityPoolsGetallNotFound with default headers values +func NewPcloudStoragecapacityPoolsGetallNotFound() *PcloudStoragecapacityPoolsGetallNotFound { + return &PcloudStoragecapacityPoolsGetallNotFound{} +} + +/* +PcloudStoragecapacityPoolsGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudStoragecapacityPoolsGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity pools getall not found response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools getall not found response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools getall not found response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity pools getall not found response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools getall not found response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud storagecapacity pools getall not found response +func (o *PcloudStoragecapacityPoolsGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudStoragecapacityPoolsGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityPoolsGetallNotFound) 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 +} + // NewPcloudStoragecapacityPoolsGetallInternalServerError creates a PcloudStoragecapacityPoolsGetallInternalServerError with default headers values func NewPcloudStoragecapacityPoolsGetallInternalServerError() *PcloudStoragecapacityPoolsGetallInternalServerError { return &PcloudStoragecapacityPoolsGetallInternalServerError{} diff --git a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go index 47d4bab5..9b491a30 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go @@ -29,6 +29,12 @@ func (o *PcloudStoragecapacityTypesGetReader) ReadResponse(response runtime.Clie return nil, err } return result, nil + case 400: + result := NewPcloudStoragecapacityTypesGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudStoragecapacityTypesGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -126,6 +132,74 @@ func (o *PcloudStoragecapacityTypesGetOK) readResponse(response runtime.ClientRe return nil } +// NewPcloudStoragecapacityTypesGetBadRequest creates a PcloudStoragecapacityTypesGetBadRequest with default headers values +func NewPcloudStoragecapacityTypesGetBadRequest() *PcloudStoragecapacityTypesGetBadRequest { + return &PcloudStoragecapacityTypesGetBadRequest{} +} + +/* +PcloudStoragecapacityTypesGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudStoragecapacityTypesGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity types get bad request response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types get bad request response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types get bad request response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity types get bad request response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types get bad request response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud storagecapacity types get bad request response +func (o *PcloudStoragecapacityTypesGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudStoragecapacityTypesGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityTypesGetBadRequest) 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 +} + // NewPcloudStoragecapacityTypesGetUnauthorized creates a PcloudStoragecapacityTypesGetUnauthorized with default headers values func NewPcloudStoragecapacityTypesGetUnauthorized() *PcloudStoragecapacityTypesGetUnauthorized { return &PcloudStoragecapacityTypesGetUnauthorized{} diff --git a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go index a6347209..50173880 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go @@ -29,6 +29,12 @@ func (o *PcloudStoragecapacityTypesGetallReader) ReadResponse(response runtime.C return nil, err } return result, nil + case 400: + result := NewPcloudStoragecapacityTypesGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudStoragecapacityTypesGetallUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -41,6 +47,12 @@ func (o *PcloudStoragecapacityTypesGetallReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 404: + result := NewPcloudStoragecapacityTypesGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudStoragecapacityTypesGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -120,6 +132,74 @@ func (o *PcloudStoragecapacityTypesGetallOK) readResponse(response runtime.Clien return nil } +// NewPcloudStoragecapacityTypesGetallBadRequest creates a PcloudStoragecapacityTypesGetallBadRequest with default headers values +func NewPcloudStoragecapacityTypesGetallBadRequest() *PcloudStoragecapacityTypesGetallBadRequest { + return &PcloudStoragecapacityTypesGetallBadRequest{} +} + +/* +PcloudStoragecapacityTypesGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudStoragecapacityTypesGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity types getall bad request response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types getall bad request response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types getall bad request response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity types getall bad request response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types getall bad request response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud storagecapacity types getall bad request response +func (o *PcloudStoragecapacityTypesGetallBadRequest) Code() int { + return 400 +} + +func (o *PcloudStoragecapacityTypesGetallBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityTypesGetallBadRequest) 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 +} + // NewPcloudStoragecapacityTypesGetallUnauthorized creates a PcloudStoragecapacityTypesGetallUnauthorized with default headers values func NewPcloudStoragecapacityTypesGetallUnauthorized() *PcloudStoragecapacityTypesGetallUnauthorized { return &PcloudStoragecapacityTypesGetallUnauthorized{} @@ -256,6 +336,74 @@ func (o *PcloudStoragecapacityTypesGetallForbidden) readResponse(response runtim return nil } +// NewPcloudStoragecapacityTypesGetallNotFound creates a PcloudStoragecapacityTypesGetallNotFound with default headers values +func NewPcloudStoragecapacityTypesGetallNotFound() *PcloudStoragecapacityTypesGetallNotFound { + return &PcloudStoragecapacityTypesGetallNotFound{} +} + +/* +PcloudStoragecapacityTypesGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudStoragecapacityTypesGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity types getall not found response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types getall not found response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types getall not found response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity types getall not found response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types getall not found response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud storagecapacity types getall not found response +func (o *PcloudStoragecapacityTypesGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudStoragecapacityTypesGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityTypesGetallNotFound) 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 +} + // NewPcloudStoragecapacityTypesGetallInternalServerError creates a PcloudStoragecapacityTypesGetallInternalServerError with default headers values func NewPcloudStoragecapacityTypesGetallInternalServerError() *PcloudStoragecapacityTypesGetallInternalServerError { return &PcloudStoragecapacityTypesGetallInternalServerError{} diff --git a/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go b/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go index b10d1d7e..e74971ae 100644 --- a/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go +++ b/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudCloudinstancesStoragetiersGetallReader) ReadResponse(response run return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesStoragetiersGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudCloudinstancesStoragetiersGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudCloudinstancesStoragetiersGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -254,6 +266,142 @@ func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) readResponse(respon return nil } +// NewPcloudCloudinstancesStoragetiersGetallForbidden creates a PcloudCloudinstancesStoragetiersGetallForbidden with default headers values +func NewPcloudCloudinstancesStoragetiersGetallForbidden() *PcloudCloudinstancesStoragetiersGetallForbidden { + return &PcloudCloudinstancesStoragetiersGetallForbidden{} +} + +/* +PcloudCloudinstancesStoragetiersGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesStoragetiersGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances storagetiers getall forbidden response has a 2xx status code +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances storagetiers getall forbidden response has a 3xx status code +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances storagetiers getall forbidden response has a 4xx status code +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances storagetiers getall forbidden response has a 5xx status code +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances storagetiers getall forbidden response a status code equal to that given +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances storagetiers getall forbidden response +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesStoragetiersGetallForbidden) 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 +} + +// NewPcloudCloudinstancesStoragetiersGetallNotFound creates a PcloudCloudinstancesStoragetiersGetallNotFound with default headers values +func NewPcloudCloudinstancesStoragetiersGetallNotFound() *PcloudCloudinstancesStoragetiersGetallNotFound { + return &PcloudCloudinstancesStoragetiersGetallNotFound{} +} + +/* +PcloudCloudinstancesStoragetiersGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesStoragetiersGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances storagetiers getall not found response has a 2xx status code +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances storagetiers getall not found response has a 3xx status code +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances storagetiers getall not found response has a 4xx status code +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances storagetiers getall not found response has a 5xx status code +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances storagetiers getall not found response a status code equal to that given +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances storagetiers getall not found response +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesStoragetiersGetallNotFound) 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 +} + // NewPcloudCloudinstancesStoragetiersGetallInternalServerError creates a PcloudCloudinstancesStoragetiersGetallInternalServerError with default headers values func NewPcloudCloudinstancesStoragetiersGetallInternalServerError() *PcloudCloudinstancesStoragetiersGetallInternalServerError { return &PcloudCloudinstancesStoragetiersGetallInternalServerError{} diff --git a/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go b/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go index 08edec80..f354158d 100644 --- a/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go +++ b/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go @@ -29,6 +29,12 @@ func (o *PcloudSystempoolsGetReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil + case 400: + result := NewPcloudSystempoolsGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudSystempoolsGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -41,6 +47,12 @@ func (o *PcloudSystempoolsGetReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 404: + result := NewPcloudSystempoolsGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudSystempoolsGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -118,6 +130,74 @@ func (o *PcloudSystempoolsGetOK) readResponse(response runtime.ClientResponse, c return nil } +// NewPcloudSystempoolsGetBadRequest creates a PcloudSystempoolsGetBadRequest with default headers values +func NewPcloudSystempoolsGetBadRequest() *PcloudSystempoolsGetBadRequest { + return &PcloudSystempoolsGetBadRequest{} +} + +/* +PcloudSystempoolsGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudSystempoolsGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud systempools get bad request response has a 2xx status code +func (o *PcloudSystempoolsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud systempools get bad request response has a 3xx status code +func (o *PcloudSystempoolsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud systempools get bad request response has a 4xx status code +func (o *PcloudSystempoolsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud systempools get bad request response has a 5xx status code +func (o *PcloudSystempoolsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud systempools get bad request response a status code equal to that given +func (o *PcloudSystempoolsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud systempools get bad request response +func (o *PcloudSystempoolsGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudSystempoolsGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudSystempoolsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudSystempoolsGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSystempoolsGetBadRequest) 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 +} + // NewPcloudSystempoolsGetUnauthorized creates a PcloudSystempoolsGetUnauthorized with default headers values func NewPcloudSystempoolsGetUnauthorized() *PcloudSystempoolsGetUnauthorized { return &PcloudSystempoolsGetUnauthorized{} @@ -254,6 +334,74 @@ func (o *PcloudSystempoolsGetForbidden) readResponse(response runtime.ClientResp return nil } +// NewPcloudSystempoolsGetNotFound creates a PcloudSystempoolsGetNotFound with default headers values +func NewPcloudSystempoolsGetNotFound() *PcloudSystempoolsGetNotFound { + return &PcloudSystempoolsGetNotFound{} +} + +/* +PcloudSystempoolsGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudSystempoolsGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud systempools get not found response has a 2xx status code +func (o *PcloudSystempoolsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud systempools get not found response has a 3xx status code +func (o *PcloudSystempoolsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud systempools get not found response has a 4xx status code +func (o *PcloudSystempoolsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud systempools get not found response has a 5xx status code +func (o *PcloudSystempoolsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud systempools get not found response a status code equal to that given +func (o *PcloudSystempoolsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud systempools get not found response +func (o *PcloudSystempoolsGetNotFound) Code() int { + return 404 +} + +func (o *PcloudSystempoolsGetNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSystempoolsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetNotFound %+v", 404, o.Payload) +} + +func (o *PcloudSystempoolsGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSystempoolsGetNotFound) 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 +} + // NewPcloudSystempoolsGetInternalServerError creates a PcloudSystempoolsGetInternalServerError with default headers values func NewPcloudSystempoolsGetInternalServerError() *PcloudSystempoolsGetInternalServerError { return &PcloudSystempoolsGetInternalServerError{} diff --git a/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go b/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go index ba35e620..a047d725 100644 --- a/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go +++ b/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go @@ -41,6 +41,18 @@ func (o *PcloudTenantsPutReader) ReadResponse(response runtime.ClientResponse, c return nil, err } return nil, result + case 403: + result := NewPcloudTenantsPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudTenantsPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudTenantsPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +274,142 @@ func (o *PcloudTenantsPutUnauthorized) readResponse(response runtime.ClientRespo return nil } +// NewPcloudTenantsPutForbidden creates a PcloudTenantsPutForbidden with default headers values +func NewPcloudTenantsPutForbidden() *PcloudTenantsPutForbidden { + return &PcloudTenantsPutForbidden{} +} + +/* +PcloudTenantsPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudTenantsPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants put forbidden response has a 2xx status code +func (o *PcloudTenantsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants put forbidden response has a 3xx status code +func (o *PcloudTenantsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants put forbidden response has a 4xx status code +func (o *PcloudTenantsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants put forbidden response has a 5xx status code +func (o *PcloudTenantsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants put forbidden response a status code equal to that given +func (o *PcloudTenantsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tenants put forbidden response +func (o *PcloudTenantsPutForbidden) Code() int { + return 403 +} + +func (o *PcloudTenantsPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsPutForbidden) 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 +} + +// NewPcloudTenantsPutNotFound creates a PcloudTenantsPutNotFound with default headers values +func NewPcloudTenantsPutNotFound() *PcloudTenantsPutNotFound { + return &PcloudTenantsPutNotFound{} +} + +/* +PcloudTenantsPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudTenantsPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants put not found response has a 2xx status code +func (o *PcloudTenantsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants put not found response has a 3xx status code +func (o *PcloudTenantsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants put not found response has a 4xx status code +func (o *PcloudTenantsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants put not found response has a 5xx status code +func (o *PcloudTenantsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants put not found response a status code equal to that given +func (o *PcloudTenantsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tenants put not found response +func (o *PcloudTenantsPutNotFound) Code() int { + return 404 +} + +func (o *PcloudTenantsPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTenantsPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTenantsPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsPutNotFound) 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 +} + // NewPcloudTenantsPutUnprocessableEntity creates a PcloudTenantsPutUnprocessableEntity with default headers values func NewPcloudTenantsPutUnprocessableEntity() *PcloudTenantsPutUnprocessableEntity { return &PcloudTenantsPutUnprocessableEntity{} diff --git a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go index ad5f0ef6..55bf8338 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go @@ -41,6 +41,18 @@ func (o *PcloudTenantsSshkeysDeleteReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 403: + result := NewPcloudTenantsSshkeysDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudTenantsSshkeysDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewPcloudTenantsSshkeysDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -260,6 +272,142 @@ func (o *PcloudTenantsSshkeysDeleteUnauthorized) readResponse(response runtime.C return nil } +// NewPcloudTenantsSshkeysDeleteForbidden creates a PcloudTenantsSshkeysDeleteForbidden with default headers values +func NewPcloudTenantsSshkeysDeleteForbidden() *PcloudTenantsSshkeysDeleteForbidden { + return &PcloudTenantsSshkeysDeleteForbidden{} +} + +/* +PcloudTenantsSshkeysDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudTenantsSshkeysDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants sshkeys delete forbidden response has a 2xx status code +func (o *PcloudTenantsSshkeysDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys delete forbidden response has a 3xx status code +func (o *PcloudTenantsSshkeysDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys delete forbidden response has a 4xx status code +func (o *PcloudTenantsSshkeysDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys delete forbidden response has a 5xx status code +func (o *PcloudTenantsSshkeysDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys delete forbidden response a status code equal to that given +func (o *PcloudTenantsSshkeysDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tenants sshkeys delete forbidden response +func (o *PcloudTenantsSshkeysDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudTenantsSshkeysDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsSshkeysDeleteForbidden) 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 +} + +// NewPcloudTenantsSshkeysDeleteNotFound creates a PcloudTenantsSshkeysDeleteNotFound with default headers values +func NewPcloudTenantsSshkeysDeleteNotFound() *PcloudTenantsSshkeysDeleteNotFound { + return &PcloudTenantsSshkeysDeleteNotFound{} +} + +/* +PcloudTenantsSshkeysDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudTenantsSshkeysDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants sshkeys delete not found response has a 2xx status code +func (o *PcloudTenantsSshkeysDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys delete not found response has a 3xx status code +func (o *PcloudTenantsSshkeysDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys delete not found response has a 4xx status code +func (o *PcloudTenantsSshkeysDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys delete not found response has a 5xx status code +func (o *PcloudTenantsSshkeysDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys delete not found response a status code equal to that given +func (o *PcloudTenantsSshkeysDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tenants sshkeys delete not found response +func (o *PcloudTenantsSshkeysDeleteNotFound) Code() int { + return 404 +} + +func (o *PcloudTenantsSshkeysDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTenantsSshkeysDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTenantsSshkeysDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsSshkeysDeleteNotFound) 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 +} + // NewPcloudTenantsSshkeysDeleteGone creates a PcloudTenantsSshkeysDeleteGone with default headers values func NewPcloudTenantsSshkeysDeleteGone() *PcloudTenantsSshkeysDeleteGone { return &PcloudTenantsSshkeysDeleteGone{} diff --git a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go index 400bde8c..44d8ed2a 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go @@ -47,6 +47,18 @@ func (o *PcloudTenantsSshkeysPostReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 403: + result := NewPcloudTenantsSshkeysPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudTenantsSshkeysPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudTenantsSshkeysPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -342,6 +354,142 @@ func (o *PcloudTenantsSshkeysPostUnauthorized) readResponse(response runtime.Cli return nil } +// NewPcloudTenantsSshkeysPostForbidden creates a PcloudTenantsSshkeysPostForbidden with default headers values +func NewPcloudTenantsSshkeysPostForbidden() *PcloudTenantsSshkeysPostForbidden { + return &PcloudTenantsSshkeysPostForbidden{} +} + +/* +PcloudTenantsSshkeysPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudTenantsSshkeysPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants sshkeys post forbidden response has a 2xx status code +func (o *PcloudTenantsSshkeysPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys post forbidden response has a 3xx status code +func (o *PcloudTenantsSshkeysPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post forbidden response has a 4xx status code +func (o *PcloudTenantsSshkeysPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys post forbidden response has a 5xx status code +func (o *PcloudTenantsSshkeysPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys post forbidden response a status code equal to that given +func (o *PcloudTenantsSshkeysPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tenants sshkeys post forbidden response +func (o *PcloudTenantsSshkeysPostForbidden) Code() int { + return 403 +} + +func (o *PcloudTenantsSshkeysPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsSshkeysPostForbidden) 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 +} + +// NewPcloudTenantsSshkeysPostNotFound creates a PcloudTenantsSshkeysPostNotFound with default headers values +func NewPcloudTenantsSshkeysPostNotFound() *PcloudTenantsSshkeysPostNotFound { + return &PcloudTenantsSshkeysPostNotFound{} +} + +/* +PcloudTenantsSshkeysPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudTenantsSshkeysPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants sshkeys post not found response has a 2xx status code +func (o *PcloudTenantsSshkeysPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys post not found response has a 3xx status code +func (o *PcloudTenantsSshkeysPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post not found response has a 4xx status code +func (o *PcloudTenantsSshkeysPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys post not found response has a 5xx status code +func (o *PcloudTenantsSshkeysPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys post not found response a status code equal to that given +func (o *PcloudTenantsSshkeysPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tenants sshkeys post not found response +func (o *PcloudTenantsSshkeysPostNotFound) Code() int { + return 404 +} + +func (o *PcloudTenantsSshkeysPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTenantsSshkeysPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTenantsSshkeysPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsSshkeysPostNotFound) 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 +} + // NewPcloudTenantsSshkeysPostConflict creates a PcloudTenantsSshkeysPostConflict with default headers values func NewPcloudTenantsSshkeysPostConflict() *PcloudTenantsSshkeysPostConflict { return &PcloudTenantsSshkeysPostConflict{} diff --git a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go index a21bc67f..21beb65a 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go @@ -41,6 +41,18 @@ func (o *PcloudTenantsSshkeysPutReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 403: + result := NewPcloudTenantsSshkeysPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudTenantsSshkeysPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudTenantsSshkeysPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -262,6 +274,142 @@ func (o *PcloudTenantsSshkeysPutUnauthorized) readResponse(response runtime.Clie return nil } +// NewPcloudTenantsSshkeysPutForbidden creates a PcloudTenantsSshkeysPutForbidden with default headers values +func NewPcloudTenantsSshkeysPutForbidden() *PcloudTenantsSshkeysPutForbidden { + return &PcloudTenantsSshkeysPutForbidden{} +} + +/* +PcloudTenantsSshkeysPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudTenantsSshkeysPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants sshkeys put forbidden response has a 2xx status code +func (o *PcloudTenantsSshkeysPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys put forbidden response has a 3xx status code +func (o *PcloudTenantsSshkeysPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys put forbidden response has a 4xx status code +func (o *PcloudTenantsSshkeysPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys put forbidden response has a 5xx status code +func (o *PcloudTenantsSshkeysPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys put forbidden response a status code equal to that given +func (o *PcloudTenantsSshkeysPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tenants sshkeys put forbidden response +func (o *PcloudTenantsSshkeysPutForbidden) Code() int { + return 403 +} + +func (o *PcloudTenantsSshkeysPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsSshkeysPutForbidden) 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 +} + +// NewPcloudTenantsSshkeysPutNotFound creates a PcloudTenantsSshkeysPutNotFound with default headers values +func NewPcloudTenantsSshkeysPutNotFound() *PcloudTenantsSshkeysPutNotFound { + return &PcloudTenantsSshkeysPutNotFound{} +} + +/* +PcloudTenantsSshkeysPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudTenantsSshkeysPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants sshkeys put not found response has a 2xx status code +func (o *PcloudTenantsSshkeysPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys put not found response has a 3xx status code +func (o *PcloudTenantsSshkeysPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys put not found response has a 4xx status code +func (o *PcloudTenantsSshkeysPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys put not found response has a 5xx status code +func (o *PcloudTenantsSshkeysPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys put not found response a status code equal to that given +func (o *PcloudTenantsSshkeysPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tenants sshkeys put not found response +func (o *PcloudTenantsSshkeysPutNotFound) Code() int { + return 404 +} + +func (o *PcloudTenantsSshkeysPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTenantsSshkeysPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudTenantsSshkeysPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsSshkeysPutNotFound) 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 +} + // NewPcloudTenantsSshkeysPutUnprocessableEntity creates a PcloudTenantsSshkeysPutUnprocessableEntity with default headers values func NewPcloudTenantsSshkeysPutUnprocessableEntity() *PcloudTenantsSshkeysPutUnprocessableEntity { return &PcloudTenantsSshkeysPutUnprocessableEntity{} diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go index cbcb7e7b..7679711f 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go @@ -47,6 +47,12 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteReader) ReadResponse(response runt return nil, err } return nil, result + case 404: + result := NewPcloudVpnconnectionsPeersubnetsDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +342,74 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) readResponse(response r return nil } +// NewPcloudVpnconnectionsPeersubnetsDeleteNotFound creates a PcloudVpnconnectionsPeersubnetsDeleteNotFound with default headers values +func NewPcloudVpnconnectionsPeersubnetsDeleteNotFound() *PcloudVpnconnectionsPeersubnetsDeleteNotFound { + return &PcloudVpnconnectionsPeersubnetsDeleteNotFound{} +} + +/* +PcloudVpnconnectionsPeersubnetsDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVpnconnectionsPeersubnetsDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud vpnconnections peersubnets delete not found response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets delete not found response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets delete not found response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets delete not found response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets delete not found response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets delete not found response +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) Code() int { + return 404 +} + +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVpnconnectionsPeersubnetsDeleteNotFound) 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 +} + // NewPcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity creates a PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity with default headers values func NewPcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity() *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity { return &PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity{} diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go index 13b0efea..76504c51 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go @@ -47,6 +47,12 @@ func (o *PcloudVpnconnectionsPeersubnetsPutReader) ReadResponse(response runtime return nil, err } return nil, result + case 404: + result := NewPcloudVpnconnectionsPeersubnetsPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudVpnconnectionsPeersubnetsPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +342,74 @@ func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) readResponse(response runt return nil } +// NewPcloudVpnconnectionsPeersubnetsPutNotFound creates a PcloudVpnconnectionsPeersubnetsPutNotFound with default headers values +func NewPcloudVpnconnectionsPeersubnetsPutNotFound() *PcloudVpnconnectionsPeersubnetsPutNotFound { + return &PcloudVpnconnectionsPeersubnetsPutNotFound{} +} + +/* +PcloudVpnconnectionsPeersubnetsPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVpnconnectionsPeersubnetsPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud vpnconnections peersubnets put not found response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets put not found response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets put not found response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets put not found response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets put not found response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets put not found response +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) Code() int { + return 404 +} + +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVpnconnectionsPeersubnetsPutNotFound) 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 +} + // NewPcloudVpnconnectionsPeersubnetsPutUnprocessableEntity creates a PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity with default headers values func NewPcloudVpnconnectionsPeersubnetsPutUnprocessableEntity() *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity { return &PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity{} diff --git a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go index e58d74d9..9611191b 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go @@ -47,6 +47,12 @@ func (o *PcloudVpnconnectionsPostReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 404: + result := NewPcloudVpnconnectionsPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudVpnconnectionsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -342,6 +348,74 @@ func (o *PcloudVpnconnectionsPostForbidden) readResponse(response runtime.Client return nil } +// NewPcloudVpnconnectionsPostNotFound creates a PcloudVpnconnectionsPostNotFound with default headers values +func NewPcloudVpnconnectionsPostNotFound() *PcloudVpnconnectionsPostNotFound { + return &PcloudVpnconnectionsPostNotFound{} +} + +/* +PcloudVpnconnectionsPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVpnconnectionsPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud vpnconnections post not found response has a 2xx status code +func (o *PcloudVpnconnectionsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections post not found response has a 3xx status code +func (o *PcloudVpnconnectionsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections post not found response has a 4xx status code +func (o *PcloudVpnconnectionsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections post not found response has a 5xx status code +func (o *PcloudVpnconnectionsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections post not found response a status code equal to that given +func (o *PcloudVpnconnectionsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections post not found response +func (o *PcloudVpnconnectionsPostNotFound) Code() int { + return 404 +} + +func (o *PcloudVpnconnectionsPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVpnconnectionsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVpnconnectionsPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVpnconnectionsPostNotFound) 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 +} + // NewPcloudVpnconnectionsPostConflict creates a PcloudVpnconnectionsPostConflict with default headers values func NewPcloudVpnconnectionsPostConflict() *PcloudVpnconnectionsPostConflict { return &PcloudVpnconnectionsPostConflict{} diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go index 9569acf4..ea4472aa 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go @@ -47,6 +47,12 @@ func (o *PcloudIkepoliciesPutReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 404: + result := NewPcloudIkepoliciesPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudIkepoliciesPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +342,74 @@ func (o *PcloudIkepoliciesPutForbidden) readResponse(response runtime.ClientResp return nil } +// NewPcloudIkepoliciesPutNotFound creates a PcloudIkepoliciesPutNotFound with default headers values +func NewPcloudIkepoliciesPutNotFound() *PcloudIkepoliciesPutNotFound { + return &PcloudIkepoliciesPutNotFound{} +} + +/* +PcloudIkepoliciesPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudIkepoliciesPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud ikepolicies put not found response has a 2xx status code +func (o *PcloudIkepoliciesPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies put not found response has a 3xx status code +func (o *PcloudIkepoliciesPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies put not found response has a 4xx status code +func (o *PcloudIkepoliciesPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies put not found response has a 5xx status code +func (o *PcloudIkepoliciesPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies put not found response a status code equal to that given +func (o *PcloudIkepoliciesPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ikepolicies put not found response +func (o *PcloudIkepoliciesPutNotFound) Code() int { + return 404 +} + +func (o *PcloudIkepoliciesPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudIkepoliciesPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudIkepoliciesPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudIkepoliciesPutNotFound) 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 +} + // NewPcloudIkepoliciesPutUnprocessableEntity creates a PcloudIkepoliciesPutUnprocessableEntity with default headers values func NewPcloudIkepoliciesPutUnprocessableEntity() *PcloudIkepoliciesPutUnprocessableEntity { return &PcloudIkepoliciesPutUnprocessableEntity{} diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go index d6da1f20..cc76168a 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go @@ -47,6 +47,12 @@ func (o *PcloudIpsecpoliciesPostReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 404: + result := NewPcloudIpsecpoliciesPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudIpsecpoliciesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -342,6 +348,74 @@ func (o *PcloudIpsecpoliciesPostForbidden) readResponse(response runtime.ClientR return nil } +// NewPcloudIpsecpoliciesPostNotFound creates a PcloudIpsecpoliciesPostNotFound with default headers values +func NewPcloudIpsecpoliciesPostNotFound() *PcloudIpsecpoliciesPostNotFound { + return &PcloudIpsecpoliciesPostNotFound{} +} + +/* +PcloudIpsecpoliciesPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudIpsecpoliciesPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud ipsecpolicies post not found response has a 2xx status code +func (o *PcloudIpsecpoliciesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies post not found response has a 3xx status code +func (o *PcloudIpsecpoliciesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies post not found response has a 4xx status code +func (o *PcloudIpsecpoliciesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies post not found response has a 5xx status code +func (o *PcloudIpsecpoliciesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies post not found response a status code equal to that given +func (o *PcloudIpsecpoliciesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ipsecpolicies post not found response +func (o *PcloudIpsecpoliciesPostNotFound) Code() int { + return 404 +} + +func (o *PcloudIpsecpoliciesPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudIpsecpoliciesPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudIpsecpoliciesPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudIpsecpoliciesPostNotFound) 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 +} + // NewPcloudIpsecpoliciesPostConflict creates a PcloudIpsecpoliciesPostConflict with default headers values func NewPcloudIpsecpoliciesPostConflict() *PcloudIpsecpoliciesPostConflict { return &PcloudIpsecpoliciesPostConflict{} diff --git a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go index 3b79fe08..d8cdbed6 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go @@ -47,6 +47,12 @@ func (o *PcloudIpsecpoliciesPutReader) ReadResponse(response runtime.ClientRespo return nil, err } return nil, result + case 404: + result := NewPcloudIpsecpoliciesPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudIpsecpoliciesPutConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -342,6 +348,74 @@ func (o *PcloudIpsecpoliciesPutForbidden) readResponse(response runtime.ClientRe return nil } +// NewPcloudIpsecpoliciesPutNotFound creates a PcloudIpsecpoliciesPutNotFound with default headers values +func NewPcloudIpsecpoliciesPutNotFound() *PcloudIpsecpoliciesPutNotFound { + return &PcloudIpsecpoliciesPutNotFound{} +} + +/* +PcloudIpsecpoliciesPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudIpsecpoliciesPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud ipsecpolicies put not found response has a 2xx status code +func (o *PcloudIpsecpoliciesPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies put not found response has a 3xx status code +func (o *PcloudIpsecpoliciesPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies put not found response has a 4xx status code +func (o *PcloudIpsecpoliciesPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies put not found response has a 5xx status code +func (o *PcloudIpsecpoliciesPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies put not found response a status code equal to that given +func (o *PcloudIpsecpoliciesPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ipsecpolicies put not found response +func (o *PcloudIpsecpoliciesPutNotFound) Code() int { + return 404 +} + +func (o *PcloudIpsecpoliciesPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudIpsecpoliciesPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudIpsecpoliciesPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudIpsecpoliciesPutNotFound) 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 +} + // NewPcloudIpsecpoliciesPutConflict creates a PcloudIpsecpoliciesPutConflict with default headers values func NewPcloudIpsecpoliciesPutConflict() *PcloudIpsecpoliciesPutConflict { return &PcloudIpsecpoliciesPutConflict{} diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go index bc14d943..43eb6695 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go @@ -35,6 +35,12 @@ func (o *PcloudVolumegroupsActionPostReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 401: + result := NewPcloudVolumegroupsActionPostUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudVolumegroupsActionPostForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -198,6 +204,74 @@ func (o *PcloudVolumegroupsActionPostBadRequest) readResponse(response runtime.C return nil } +// NewPcloudVolumegroupsActionPostUnauthorized creates a PcloudVolumegroupsActionPostUnauthorized with default headers values +func NewPcloudVolumegroupsActionPostUnauthorized() *PcloudVolumegroupsActionPostUnauthorized { + return &PcloudVolumegroupsActionPostUnauthorized{} +} + +/* +PcloudVolumegroupsActionPostUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudVolumegroupsActionPostUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups action post unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsActionPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups action post unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsActionPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups action post unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsActionPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups action post unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsActionPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups action post unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsActionPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups action post unauthorized response +func (o *PcloudVolumegroupsActionPostUnauthorized) Code() int { + return 401 +} + +func (o *PcloudVolumegroupsActionPostUnauthorized) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsActionPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsActionPostUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsActionPostUnauthorized) 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 +} + // NewPcloudVolumegroupsActionPostForbidden creates a PcloudVolumegroupsActionPostForbidden with default headers values func NewPcloudVolumegroupsActionPostForbidden() *PcloudVolumegroupsActionPostForbidden { return &PcloudVolumegroupsActionPostForbidden{} diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go index 44c4561a..8f99d2ed 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go @@ -35,6 +35,12 @@ func (o *PcloudVolumegroupsGetDetailsReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 401: + result := NewPcloudVolumegroupsGetDetailsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudVolumegroupsGetDetailsForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -194,6 +200,74 @@ func (o *PcloudVolumegroupsGetDetailsBadRequest) readResponse(response runtime.C return nil } +// NewPcloudVolumegroupsGetDetailsUnauthorized creates a PcloudVolumegroupsGetDetailsUnauthorized with default headers values +func NewPcloudVolumegroupsGetDetailsUnauthorized() *PcloudVolumegroupsGetDetailsUnauthorized { + return &PcloudVolumegroupsGetDetailsUnauthorized{} +} + +/* +PcloudVolumegroupsGetDetailsUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudVolumegroupsGetDetailsUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups get details unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsGetDetailsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get details unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsGetDetailsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get details unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsGetDetailsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups get details unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsGetDetailsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get details unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsGetDetailsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups get details unauthorized response +func (o *PcloudVolumegroupsGetDetailsUnauthorized) Code() int { + return 401 +} + +func (o *PcloudVolumegroupsGetDetailsUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsGetDetailsUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsGetDetailsUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsGetDetailsUnauthorized) 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 +} + // NewPcloudVolumegroupsGetDetailsForbidden creates a PcloudVolumegroupsGetDetailsForbidden with default headers values func NewPcloudVolumegroupsGetDetailsForbidden() *PcloudVolumegroupsGetDetailsForbidden { return &PcloudVolumegroupsGetDetailsForbidden{} diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go index d4369a70..e2efcd04 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudVolumegroupsGetReader) ReadResponse(response runtime.ClientRespon return nil, err } return nil, result + case 401: + result := NewPcloudVolumegroupsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudVolumegroupsGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -194,6 +200,74 @@ func (o *PcloudVolumegroupsGetBadRequest) readResponse(response runtime.ClientRe return nil } +// NewPcloudVolumegroupsGetUnauthorized creates a PcloudVolumegroupsGetUnauthorized with default headers values +func NewPcloudVolumegroupsGetUnauthorized() *PcloudVolumegroupsGetUnauthorized { + return &PcloudVolumegroupsGetUnauthorized{} +} + +/* +PcloudVolumegroupsGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudVolumegroupsGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups get unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups get unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups get unauthorized response +func (o *PcloudVolumegroupsGetUnauthorized) Code() int { + return 401 +} + +func (o *PcloudVolumegroupsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsGetUnauthorized) 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 +} + // NewPcloudVolumegroupsGetForbidden creates a PcloudVolumegroupsGetForbidden with default headers values func NewPcloudVolumegroupsGetForbidden() *PcloudVolumegroupsGetForbidden { return &PcloudVolumegroupsGetForbidden{} diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go index f1d42151..4397ec85 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go @@ -47,6 +47,12 @@ func (o *PcloudVolumegroupsGetallDetailsReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 404: + result := NewPcloudVolumegroupsGetallDetailsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudVolumegroupsGetallDetailsInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudVolumegroupsGetallDetailsForbidden) readResponse(response runtime return nil } +// NewPcloudVolumegroupsGetallDetailsNotFound creates a PcloudVolumegroupsGetallDetailsNotFound with default headers values +func NewPcloudVolumegroupsGetallDetailsNotFound() *PcloudVolumegroupsGetallDetailsNotFound { + return &PcloudVolumegroupsGetallDetailsNotFound{} +} + +/* +PcloudVolumegroupsGetallDetailsNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVolumegroupsGetallDetailsNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups getall details not found response has a 2xx status code +func (o *PcloudVolumegroupsGetallDetailsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall details not found response has a 3xx status code +func (o *PcloudVolumegroupsGetallDetailsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall details not found response has a 4xx status code +func (o *PcloudVolumegroupsGetallDetailsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups getall details not found response has a 5xx status code +func (o *PcloudVolumegroupsGetallDetailsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall details not found response a status code equal to that given +func (o *PcloudVolumegroupsGetallDetailsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups getall details not found response +func (o *PcloudVolumegroupsGetallDetailsNotFound) Code() int { + return 404 +} + +func (o *PcloudVolumegroupsGetallDetailsNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumegroupsGetallDetailsNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumegroupsGetallDetailsNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsGetallDetailsNotFound) 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 +} + // NewPcloudVolumegroupsGetallDetailsInternalServerError creates a PcloudVolumegroupsGetallDetailsInternalServerError with default headers values func NewPcloudVolumegroupsGetallDetailsInternalServerError() *PcloudVolumegroupsGetallDetailsInternalServerError { return &PcloudVolumegroupsGetallDetailsInternalServerError{} diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go index 655345ec..f488e4dd 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudVolumegroupsGetallReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 404: + result := NewPcloudVolumegroupsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudVolumegroupsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudVolumegroupsGetallForbidden) readResponse(response runtime.Client return nil } +// NewPcloudVolumegroupsGetallNotFound creates a PcloudVolumegroupsGetallNotFound with default headers values +func NewPcloudVolumegroupsGetallNotFound() *PcloudVolumegroupsGetallNotFound { + return &PcloudVolumegroupsGetallNotFound{} +} + +/* +PcloudVolumegroupsGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVolumegroupsGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups getall not found response has a 2xx status code +func (o *PcloudVolumegroupsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall not found response has a 3xx status code +func (o *PcloudVolumegroupsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall not found response has a 4xx status code +func (o *PcloudVolumegroupsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups getall not found response has a 5xx status code +func (o *PcloudVolumegroupsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall not found response a status code equal to that given +func (o *PcloudVolumegroupsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups getall not found response +func (o *PcloudVolumegroupsGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudVolumegroupsGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumegroupsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumegroupsGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsGetallNotFound) 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 +} + // NewPcloudVolumegroupsGetallInternalServerError creates a PcloudVolumegroupsGetallInternalServerError with default headers values func NewPcloudVolumegroupsGetallInternalServerError() *PcloudVolumegroupsGetallInternalServerError { return &PcloudVolumegroupsGetallInternalServerError{} diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go index 55a93e06..a5f9b46d 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go @@ -53,6 +53,12 @@ func (o *PcloudVolumegroupsPostReader) ReadResponse(response runtime.ClientRespo return nil, err } return nil, result + case 404: + result := NewPcloudVolumegroupsPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudVolumegroupsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -422,6 +428,74 @@ func (o *PcloudVolumegroupsPostForbidden) readResponse(response runtime.ClientRe return nil } +// NewPcloudVolumegroupsPostNotFound creates a PcloudVolumegroupsPostNotFound with default headers values +func NewPcloudVolumegroupsPostNotFound() *PcloudVolumegroupsPostNotFound { + return &PcloudVolumegroupsPostNotFound{} +} + +/* +PcloudVolumegroupsPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVolumegroupsPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups post not found response has a 2xx status code +func (o *PcloudVolumegroupsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups post not found response has a 3xx status code +func (o *PcloudVolumegroupsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post not found response has a 4xx status code +func (o *PcloudVolumegroupsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups post not found response has a 5xx status code +func (o *PcloudVolumegroupsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups post not found response a status code equal to that given +func (o *PcloudVolumegroupsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups post not found response +func (o *PcloudVolumegroupsPostNotFound) Code() int { + return 404 +} + +func (o *PcloudVolumegroupsPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumegroupsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumegroupsPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsPostNotFound) 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 +} + // NewPcloudVolumegroupsPostConflict creates a PcloudVolumegroupsPostConflict with default headers values func NewPcloudVolumegroupsPostConflict() *PcloudVolumegroupsPostConflict { return &PcloudVolumegroupsPostConflict{} diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go index 1342787e..e3092d6b 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetReader) ReadResponse(respon return nil, err } return nil, result + case 401: + result := NewPcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudVolumegroupsRemoteCopyRelationshipsGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -200,6 +206,74 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) readResponse(re return nil } +// NewPcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized creates a PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized with default headers values +func NewPcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized() *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized { + return &PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized{} +} + +/* +PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups remote copy relationships get unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups remote copy relationships get unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups remote copy relationships get unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups remote copy relationships get unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups remote copy relationships get unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups remote copy relationships get unauthorized response +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) Code() int { + return 401 +} + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetUnauthorized) 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 +} + // NewPcloudVolumegroupsRemoteCopyRelationshipsGetForbidden creates a PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden with default headers values func NewPcloudVolumegroupsRemoteCopyRelationshipsGetForbidden() *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden { return &PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden{} diff --git a/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go index 48c26316..6d39a07e 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudVolumegroupsStorageDetailsGetReader) ReadResponse(response runtim return nil, err } return nil, result + case 401: + result := NewPcloudVolumegroupsStorageDetailsGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudVolumegroupsStorageDetailsGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -200,6 +206,74 @@ func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) readResponse(response ru return nil } +// NewPcloudVolumegroupsStorageDetailsGetUnauthorized creates a PcloudVolumegroupsStorageDetailsGetUnauthorized with default headers values +func NewPcloudVolumegroupsStorageDetailsGetUnauthorized() *PcloudVolumegroupsStorageDetailsGetUnauthorized { + return &PcloudVolumegroupsStorageDetailsGetUnauthorized{} +} + +/* +PcloudVolumegroupsStorageDetailsGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudVolumegroupsStorageDetailsGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups storage details get unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups storage details get unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups storage details get unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups storage details get unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups storage details get unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups storage details get unauthorized response +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) Code() int { + return 401 +} + +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsStorageDetailsGetUnauthorized) 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 +} + // NewPcloudVolumegroupsStorageDetailsGetForbidden creates a PcloudVolumegroupsStorageDetailsGetForbidden with default headers values func NewPcloudVolumegroupsStorageDetailsGetForbidden() *PcloudVolumegroupsStorageDetailsGetForbidden { return &PcloudVolumegroupsStorageDetailsGetForbidden{} diff --git a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go index eab18f18..1108621d 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go +++ b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudVolumeOnboardingGetallReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 404: + result := NewPcloudVolumeOnboardingGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudVolumeOnboardingGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudVolumeOnboardingGetallForbidden) readResponse(response runtime.Cl return nil } +// NewPcloudVolumeOnboardingGetallNotFound creates a PcloudVolumeOnboardingGetallNotFound with default headers values +func NewPcloudVolumeOnboardingGetallNotFound() *PcloudVolumeOnboardingGetallNotFound { + return &PcloudVolumeOnboardingGetallNotFound{} +} + +/* +PcloudVolumeOnboardingGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVolumeOnboardingGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volume onboarding getall not found response has a 2xx status code +func (o *PcloudVolumeOnboardingGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding getall not found response has a 3xx status code +func (o *PcloudVolumeOnboardingGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding getall not found response has a 4xx status code +func (o *PcloudVolumeOnboardingGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding getall not found response has a 5xx status code +func (o *PcloudVolumeOnboardingGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding getall not found response a status code equal to that given +func (o *PcloudVolumeOnboardingGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volume onboarding getall not found response +func (o *PcloudVolumeOnboardingGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudVolumeOnboardingGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumeOnboardingGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumeOnboardingGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumeOnboardingGetallNotFound) 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 +} + // NewPcloudVolumeOnboardingGetallInternalServerError creates a PcloudVolumeOnboardingGetallInternalServerError with default headers values func NewPcloudVolumeOnboardingGetallInternalServerError() *PcloudVolumeOnboardingGetallInternalServerError { return &PcloudVolumeOnboardingGetallInternalServerError{} diff --git a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go index c80721fb..3e728d57 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go +++ b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go @@ -47,6 +47,12 @@ func (o *PcloudVolumeOnboardingPostReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 404: + result := NewPcloudVolumeOnboardingPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudVolumeOnboardingPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +342,74 @@ func (o *PcloudVolumeOnboardingPostForbidden) readResponse(response runtime.Clie return nil } +// NewPcloudVolumeOnboardingPostNotFound creates a PcloudVolumeOnboardingPostNotFound with default headers values +func NewPcloudVolumeOnboardingPostNotFound() *PcloudVolumeOnboardingPostNotFound { + return &PcloudVolumeOnboardingPostNotFound{} +} + +/* +PcloudVolumeOnboardingPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVolumeOnboardingPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volume onboarding post not found response has a 2xx status code +func (o *PcloudVolumeOnboardingPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding post not found response has a 3xx status code +func (o *PcloudVolumeOnboardingPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding post not found response has a 4xx status code +func (o *PcloudVolumeOnboardingPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding post not found response has a 5xx status code +func (o *PcloudVolumeOnboardingPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding post not found response a status code equal to that given +func (o *PcloudVolumeOnboardingPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volume onboarding post not found response +func (o *PcloudVolumeOnboardingPostNotFound) Code() int { + return 404 +} + +func (o *PcloudVolumeOnboardingPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumeOnboardingPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumeOnboardingPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumeOnboardingPostNotFound) 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 +} + // NewPcloudVolumeOnboardingPostConflict creates a PcloudVolumeOnboardingPostConflict with default headers values func NewPcloudVolumeOnboardingPostConflict() *PcloudVolumeOnboardingPostConflict { return &PcloudVolumeOnboardingPostConflict{} 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 79c8e286..ce16de98 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 @@ -47,6 +47,12 @@ func (o *PcloudCloudinstancesVolumesPostReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 404: + result := NewPcloudCloudinstancesVolumesPostNotFound() + 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 { @@ -342,6 +348,74 @@ func (o *PcloudCloudinstancesVolumesPostForbidden) readResponse(response runtime return nil } +// NewPcloudCloudinstancesVolumesPostNotFound creates a PcloudCloudinstancesVolumesPostNotFound with default headers values +func NewPcloudCloudinstancesVolumesPostNotFound() *PcloudCloudinstancesVolumesPostNotFound { + return &PcloudCloudinstancesVolumesPostNotFound{} +} + +/* +PcloudCloudinstancesVolumesPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesVolumesPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances volumes post not found response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes post not found response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes post not found response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes post not found response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes post not found response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances volumes post not found response +func (o *PcloudCloudinstancesVolumesPostNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesVolumesPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesVolumesPostNotFound) 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_pvminstances_volumes_put_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go index 06bcb9ee..bcdd7318 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPvminstancesVolumesPutReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 401: + result := NewPcloudPvminstancesVolumesPutUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 403: result := NewPcloudPvminstancesVolumesPutForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -192,6 +198,74 @@ func (o *PcloudPvminstancesVolumesPutBadRequest) readResponse(response runtime.C return nil } +// NewPcloudPvminstancesVolumesPutUnauthorized creates a PcloudPvminstancesVolumesPutUnauthorized with default headers values +func NewPcloudPvminstancesVolumesPutUnauthorized() *PcloudPvminstancesVolumesPutUnauthorized { + return &PcloudPvminstancesVolumesPutUnauthorized{} +} + +/* +PcloudPvminstancesVolumesPutUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPvminstancesVolumesPutUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances volumes put unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVolumesPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes put unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVolumesPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes put unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVolumesPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes put unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVolumesPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes put unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVolumesPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances volumes put unauthorized response +func (o *PcloudPvminstancesVolumesPutUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPvminstancesVolumesPutUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesVolumesPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPvminstancesVolumesPutUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVolumesPutUnauthorized) 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 +} + // NewPcloudPvminstancesVolumesPutForbidden creates a PcloudPvminstancesVolumesPutForbidden with default headers values func NewPcloudPvminstancesVolumesPutForbidden() *PcloudPvminstancesVolumesPutForbidden { return &PcloudPvminstancesVolumesPutForbidden{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go index 33b0e8d9..53e98942 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2PvminstancesVolumesPostReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 403: + result := NewPcloudV2PvminstancesVolumesPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2PvminstancesVolumesPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -268,6 +274,74 @@ func (o *PcloudV2PvminstancesVolumesPostUnauthorized) readResponse(response runt return nil } +// NewPcloudV2PvminstancesVolumesPostForbidden creates a PcloudV2PvminstancesVolumesPostForbidden with default headers values +func NewPcloudV2PvminstancesVolumesPostForbidden() *PcloudV2PvminstancesVolumesPostForbidden { + return &PcloudV2PvminstancesVolumesPostForbidden{} +} + +/* +PcloudV2PvminstancesVolumesPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2PvminstancesVolumesPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances volumes post forbidden response has a 2xx status code +func (o *PcloudV2PvminstancesVolumesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances volumes post forbidden response has a 3xx status code +func (o *PcloudV2PvminstancesVolumesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances volumes post forbidden response has a 4xx status code +func (o *PcloudV2PvminstancesVolumesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances volumes post forbidden response has a 5xx status code +func (o *PcloudV2PvminstancesVolumesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances volumes post forbidden response a status code equal to that given +func (o *PcloudV2PvminstancesVolumesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 pvminstances volumes post forbidden response +func (o *PcloudV2PvminstancesVolumesPostForbidden) Code() int { + return 403 +} + +func (o *PcloudV2PvminstancesVolumesPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2PvminstancesVolumesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2PvminstancesVolumesPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesVolumesPostForbidden) 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 +} + // NewPcloudV2PvminstancesVolumesPostNotFound creates a PcloudV2PvminstancesVolumesPostNotFound with default headers values func NewPcloudV2PvminstancesVolumesPostNotFound() *PcloudV2PvminstancesVolumesPostNotFound { return &PcloudV2PvminstancesVolumesPostNotFound{} 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 e36b3237..55821f6b 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 @@ -47,6 +47,12 @@ func (o *PcloudV2VolumesPostReader) ReadResponse(response runtime.ClientResponse return nil, err } return nil, result + case 404: + result := NewPcloudV2VolumesPostNotFound() + 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 { @@ -342,6 +348,74 @@ func (o *PcloudV2VolumesPostForbidden) readResponse(response runtime.ClientRespo return nil } +// NewPcloudV2VolumesPostNotFound creates a PcloudV2VolumesPostNotFound with default headers values +func NewPcloudV2VolumesPostNotFound() *PcloudV2VolumesPostNotFound { + return &PcloudV2VolumesPostNotFound{} +} + +/* +PcloudV2VolumesPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudV2VolumesPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 volumes post not found response has a 2xx status code +func (o *PcloudV2VolumesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes post not found response has a 3xx status code +func (o *PcloudV2VolumesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes post not found response has a 4xx status code +func (o *PcloudV2VolumesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes post not found response has a 5xx status code +func (o *PcloudV2VolumesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes post not found response a status code equal to that given +func (o *PcloudV2VolumesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumes post not found response +func (o *PcloudV2VolumesPostNotFound) Code() int { + return 404 +} + +func (o *PcloudV2VolumesPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2VolumesPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2VolumesPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumesPostNotFound) 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 70fa229a..f02784f0 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 @@ -29,6 +29,12 @@ func (o *PcloudV2VolumescloneCancelPostReader) ReadResponse(response runtime.Cli return nil, err } return result, nil + case 400: + result := NewPcloudV2VolumescloneCancelPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudV2VolumescloneCancelPostUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -126,6 +132,74 @@ func (o *PcloudV2VolumescloneCancelPostAccepted) readResponse(response runtime.C return nil } +// NewPcloudV2VolumescloneCancelPostBadRequest creates a PcloudV2VolumescloneCancelPostBadRequest with default headers values +func NewPcloudV2VolumescloneCancelPostBadRequest() *PcloudV2VolumescloneCancelPostBadRequest { + return &PcloudV2VolumescloneCancelPostBadRequest{} +} + +/* +PcloudV2VolumescloneCancelPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudV2VolumescloneCancelPostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 volumesclone cancel post bad request response has a 2xx status code +func (o *PcloudV2VolumescloneCancelPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone cancel post bad request response has a 3xx status code +func (o *PcloudV2VolumescloneCancelPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone cancel post bad request response has a 4xx status code +func (o *PcloudV2VolumescloneCancelPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone cancel post bad request response has a 5xx status code +func (o *PcloudV2VolumescloneCancelPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone cancel post bad request response a status code equal to that given +func (o *PcloudV2VolumescloneCancelPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumesclone cancel post bad request response +func (o *PcloudV2VolumescloneCancelPostBadRequest) Code() int { + return 400 +} + +func (o *PcloudV2VolumescloneCancelPostBadRequest) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2VolumescloneCancelPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2VolumescloneCancelPostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneCancelPostBadRequest) 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 +} + // NewPcloudV2VolumescloneCancelPostUnauthorized creates a PcloudV2VolumescloneCancelPostUnauthorized with default headers values func NewPcloudV2VolumescloneCancelPostUnauthorized() *PcloudV2VolumescloneCancelPostUnauthorized { return &PcloudV2VolumescloneCancelPostUnauthorized{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go index 711350d2..95d3652e 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go @@ -47,6 +47,12 @@ func (o *PcloudV2VolumescloneGetallReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 404: + result := NewPcloudV2VolumescloneGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudV2VolumescloneGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudV2VolumescloneGetallForbidden) readResponse(response runtime.Clie return nil } +// NewPcloudV2VolumescloneGetallNotFound creates a PcloudV2VolumescloneGetallNotFound with default headers values +func NewPcloudV2VolumescloneGetallNotFound() *PcloudV2VolumescloneGetallNotFound { + return &PcloudV2VolumescloneGetallNotFound{} +} + +/* +PcloudV2VolumescloneGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudV2VolumescloneGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 volumesclone getall not found response has a 2xx status code +func (o *PcloudV2VolumescloneGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone getall not found response has a 3xx status code +func (o *PcloudV2VolumescloneGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone getall not found response has a 4xx status code +func (o *PcloudV2VolumescloneGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone getall not found response has a 5xx status code +func (o *PcloudV2VolumescloneGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone getall not found response a status code equal to that given +func (o *PcloudV2VolumescloneGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumesclone getall not found response +func (o *PcloudV2VolumescloneGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudV2VolumescloneGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2VolumescloneGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2VolumescloneGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneGetallNotFound) 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 +} + // NewPcloudV2VolumescloneGetallInternalServerError creates a PcloudV2VolumescloneGetallInternalServerError with default headers values func NewPcloudV2VolumescloneGetallInternalServerError() *PcloudV2VolumescloneGetallInternalServerError { return &PcloudV2VolumescloneGetallInternalServerError{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go index 52f49616..396cbfce 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go @@ -47,6 +47,12 @@ func (o *PcloudV2VolumesclonePostReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 404: + result := NewPcloudV2VolumesclonePostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudV2VolumesclonePostInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -330,6 +336,74 @@ func (o *PcloudV2VolumesclonePostForbidden) readResponse(response runtime.Client return nil } +// NewPcloudV2VolumesclonePostNotFound creates a PcloudV2VolumesclonePostNotFound with default headers values +func NewPcloudV2VolumesclonePostNotFound() *PcloudV2VolumesclonePostNotFound { + return &PcloudV2VolumesclonePostNotFound{} +} + +/* +PcloudV2VolumesclonePostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudV2VolumesclonePostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 volumesclone post not found response has a 2xx status code +func (o *PcloudV2VolumesclonePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone post not found response has a 3xx status code +func (o *PcloudV2VolumesclonePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone post not found response has a 4xx status code +func (o *PcloudV2VolumesclonePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone post not found response has a 5xx status code +func (o *PcloudV2VolumesclonePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone post not found response a status code equal to that given +func (o *PcloudV2VolumesclonePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumesclone post not found response +func (o *PcloudV2VolumesclonePostNotFound) Code() int { + return 404 +} + +func (o *PcloudV2VolumesclonePostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2VolumesclonePostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudV2VolumesclonePostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumesclonePostNotFound) 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 +} + // NewPcloudV2VolumesclonePostInternalServerError creates a PcloudV2VolumesclonePostInternalServerError with default headers values func NewPcloudV2VolumesclonePostInternalServerError() *PcloudV2VolumesclonePostInternalServerError { return &PcloudV2VolumesclonePostInternalServerError{} 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 e87ad615..2c48aa39 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 @@ -29,6 +29,12 @@ func (o *PcloudV2VolumescloneStartPostReader) ReadResponse(response runtime.Clie return nil, err } return result, nil + case 400: + result := NewPcloudV2VolumescloneStartPostBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudV2VolumescloneStartPostUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -126,6 +132,74 @@ func (o *PcloudV2VolumescloneStartPostOK) readResponse(response runtime.ClientRe return nil } +// NewPcloudV2VolumescloneStartPostBadRequest creates a PcloudV2VolumescloneStartPostBadRequest with default headers values +func NewPcloudV2VolumescloneStartPostBadRequest() *PcloudV2VolumescloneStartPostBadRequest { + return &PcloudV2VolumescloneStartPostBadRequest{} +} + +/* +PcloudV2VolumescloneStartPostBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudV2VolumescloneStartPostBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 volumesclone start post bad request response has a 2xx status code +func (o *PcloudV2VolumescloneStartPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone start post bad request response has a 3xx status code +func (o *PcloudV2VolumescloneStartPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone start post bad request response has a 4xx status code +func (o *PcloudV2VolumescloneStartPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone start post bad request response has a 5xx status code +func (o *PcloudV2VolumescloneStartPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone start post bad request response a status code equal to that given +func (o *PcloudV2VolumescloneStartPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumesclone start post bad request response +func (o *PcloudV2VolumescloneStartPostBadRequest) Code() int { + return 400 +} + +func (o *PcloudV2VolumescloneStartPostBadRequest) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2VolumescloneStartPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2VolumescloneStartPostBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneStartPostBadRequest) 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 +} + // NewPcloudV2VolumescloneStartPostUnauthorized creates a PcloudV2VolumescloneStartPostUnauthorized with default headers values func NewPcloudV2VolumescloneStartPostUnauthorized() *PcloudV2VolumescloneStartPostUnauthorized { return &PcloudV2VolumescloneStartPostUnauthorized{} 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 84333bc5..212814d9 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 @@ -47,6 +47,12 @@ func (o *PcloudVolumesClonePostReader) ReadResponse(response runtime.ClientRespo return nil, err } return nil, result + case 404: + result := NewPcloudVolumesClonePostNotFound() + 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 { @@ -336,6 +342,74 @@ func (o *PcloudVolumesClonePostForbidden) readResponse(response runtime.ClientRe return nil } +// NewPcloudVolumesClonePostNotFound creates a PcloudVolumesClonePostNotFound with default headers values +func NewPcloudVolumesClonePostNotFound() *PcloudVolumesClonePostNotFound { + return &PcloudVolumesClonePostNotFound{} +} + +/* +PcloudVolumesClonePostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudVolumesClonePostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumes clone post not found response has a 2xx status code +func (o *PcloudVolumesClonePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumes clone post not found response has a 3xx status code +func (o *PcloudVolumesClonePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumes clone post not found response has a 4xx status code +func (o *PcloudVolumesClonePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumes clone post not found response has a 5xx status code +func (o *PcloudVolumesClonePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumes clone post not found response a status code equal to that given +func (o *PcloudVolumesClonePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumes clone post not found response +func (o *PcloudVolumesClonePostNotFound) Code() int { + return 404 +} + +func (o *PcloudVolumesClonePostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumesClonePostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudVolumesClonePostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumesClonePostNotFound) 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/client/power_iaas_api_client.go b/power/client/power_iaas_api_client.go index f1510a09..fd2774b4 100644 --- a/power/client/power_iaas_api_client.go +++ b/power/client/power_iaas_api_client.go @@ -50,6 +50,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/service_instances" "github.com/IBM-Cloud/power-go-client/power/client/storage_types" "github.com/IBM-Cloud/power-go-client/power/client/swagger_spec" + "github.com/IBM-Cloud/power-go-client/power/client/workspaces" ) // Default power iaas API HTTP client. @@ -134,6 +135,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaasA cli.ServiceInstances = service_instances.New(transport, formats) cli.StorageTypes = storage_types.New(transport, formats) cli.SwaggerSpec = swagger_spec.New(transport, formats) + cli.Workspaces = workspaces.New(transport, formats) return cli } @@ -258,6 +260,8 @@ type PowerIaasAPI struct { SwaggerSpec swagger_spec.ClientService + Workspaces workspaces.ClientService + Transport runtime.ClientTransport } @@ -304,4 +308,5 @@ func (c *PowerIaasAPI) SetTransport(transport runtime.ClientTransport) { c.ServiceInstances.SetTransport(transport) c.StorageTypes.SetTransport(transport) c.SwaggerSpec.SetTransport(transport) + c.Workspaces.SetTransport(transport) } diff --git a/power/client/service_bindings/service_binding_binding_responses.go b/power/client/service_bindings/service_binding_binding_responses.go index 7798ad9e..2c32202d 100644 --- a/power/client/service_bindings/service_binding_binding_responses.go +++ b/power/client/service_bindings/service_binding_binding_responses.go @@ -47,6 +47,24 @@ func (o *ServiceBindingBindingReader) ReadResponse(response runtime.ClientRespon return nil, err } return nil, result + case 401: + result := NewServiceBindingBindingUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBindingBindingForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBindingBindingNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewServiceBindingBindingConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +354,210 @@ func (o *ServiceBindingBindingBadRequest) readResponse(response runtime.ClientRe return nil } +// NewServiceBindingBindingUnauthorized creates a ServiceBindingBindingUnauthorized with default headers values +func NewServiceBindingBindingUnauthorized() *ServiceBindingBindingUnauthorized { + return &ServiceBindingBindingUnauthorized{} +} + +/* +ServiceBindingBindingUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBindingBindingUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding binding unauthorized response has a 2xx status code +func (o *ServiceBindingBindingUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding binding unauthorized response has a 3xx status code +func (o *ServiceBindingBindingUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding unauthorized response has a 4xx status code +func (o *ServiceBindingBindingUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding binding unauthorized response has a 5xx status code +func (o *ServiceBindingBindingUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding unauthorized response a status code equal to that given +func (o *ServiceBindingBindingUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service binding binding unauthorized response +func (o *ServiceBindingBindingUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBindingBindingUnauthorized) Error() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBindingBindingUnauthorized) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBindingBindingUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingBindingUnauthorized) 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 +} + +// NewServiceBindingBindingForbidden creates a ServiceBindingBindingForbidden with default headers values +func NewServiceBindingBindingForbidden() *ServiceBindingBindingForbidden { + return &ServiceBindingBindingForbidden{} +} + +/* +ServiceBindingBindingForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBindingBindingForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding binding forbidden response has a 2xx status code +func (o *ServiceBindingBindingForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding binding forbidden response has a 3xx status code +func (o *ServiceBindingBindingForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding forbidden response has a 4xx status code +func (o *ServiceBindingBindingForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding binding forbidden response has a 5xx status code +func (o *ServiceBindingBindingForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding forbidden response a status code equal to that given +func (o *ServiceBindingBindingForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service binding binding forbidden response +func (o *ServiceBindingBindingForbidden) Code() int { + return 403 +} + +func (o *ServiceBindingBindingForbidden) Error() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBindingBindingForbidden) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBindingBindingForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingBindingForbidden) 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 +} + +// NewServiceBindingBindingNotFound creates a ServiceBindingBindingNotFound with default headers values +func NewServiceBindingBindingNotFound() *ServiceBindingBindingNotFound { + return &ServiceBindingBindingNotFound{} +} + +/* +ServiceBindingBindingNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBindingBindingNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding binding not found response has a 2xx status code +func (o *ServiceBindingBindingNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding binding not found response has a 3xx status code +func (o *ServiceBindingBindingNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding not found response has a 4xx status code +func (o *ServiceBindingBindingNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding binding not found response has a 5xx status code +func (o *ServiceBindingBindingNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding not found response a status code equal to that given +func (o *ServiceBindingBindingNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service binding binding not found response +func (o *ServiceBindingBindingNotFound) Code() int { + return 404 +} + +func (o *ServiceBindingBindingNotFound) Error() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBindingBindingNotFound) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBindingBindingNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingBindingNotFound) 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 +} + // NewServiceBindingBindingConflict creates a ServiceBindingBindingConflict with default headers values func NewServiceBindingBindingConflict() *ServiceBindingBindingConflict { return &ServiceBindingBindingConflict{} diff --git a/power/client/service_bindings/service_binding_get_responses.go b/power/client/service_bindings/service_binding_get_responses.go index 7e7766fc..3701f13c 100644 --- a/power/client/service_bindings/service_binding_get_responses.go +++ b/power/client/service_bindings/service_binding_get_responses.go @@ -29,6 +29,24 @@ func (o *ServiceBindingGetReader) ReadResponse(response runtime.ClientResponse, return nil, err } return result, nil + case 400: + result := NewServiceBindingGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBindingGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBindingGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewServiceBindingGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -108,6 +126,210 @@ func (o *ServiceBindingGetOK) readResponse(response runtime.ClientResponse, cons return nil } +// NewServiceBindingGetBadRequest creates a ServiceBindingGetBadRequest with default headers values +func NewServiceBindingGetBadRequest() *ServiceBindingGetBadRequest { + return &ServiceBindingGetBadRequest{} +} + +/* +ServiceBindingGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBindingGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding get bad request response has a 2xx status code +func (o *ServiceBindingGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding get bad request response has a 3xx status code +func (o *ServiceBindingGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding get bad request response has a 4xx status code +func (o *ServiceBindingGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding get bad request response has a 5xx status code +func (o *ServiceBindingGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding get bad request response a status code equal to that given +func (o *ServiceBindingGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service binding get bad request response +func (o *ServiceBindingGetBadRequest) Code() int { + return 400 +} + +func (o *ServiceBindingGetBadRequest) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBindingGetBadRequest) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBindingGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingGetBadRequest) 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 +} + +// NewServiceBindingGetUnauthorized creates a ServiceBindingGetUnauthorized with default headers values +func NewServiceBindingGetUnauthorized() *ServiceBindingGetUnauthorized { + return &ServiceBindingGetUnauthorized{} +} + +/* +ServiceBindingGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBindingGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding get unauthorized response has a 2xx status code +func (o *ServiceBindingGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding get unauthorized response has a 3xx status code +func (o *ServiceBindingGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding get unauthorized response has a 4xx status code +func (o *ServiceBindingGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding get unauthorized response has a 5xx status code +func (o *ServiceBindingGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding get unauthorized response a status code equal to that given +func (o *ServiceBindingGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service binding get unauthorized response +func (o *ServiceBindingGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBindingGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBindingGetUnauthorized) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBindingGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingGetUnauthorized) 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 +} + +// NewServiceBindingGetForbidden creates a ServiceBindingGetForbidden with default headers values +func NewServiceBindingGetForbidden() *ServiceBindingGetForbidden { + return &ServiceBindingGetForbidden{} +} + +/* +ServiceBindingGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBindingGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding get forbidden response has a 2xx status code +func (o *ServiceBindingGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding get forbidden response has a 3xx status code +func (o *ServiceBindingGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding get forbidden response has a 4xx status code +func (o *ServiceBindingGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding get forbidden response has a 5xx status code +func (o *ServiceBindingGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding get forbidden response a status code equal to that given +func (o *ServiceBindingGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service binding get forbidden response +func (o *ServiceBindingGetForbidden) Code() int { + return 403 +} + +func (o *ServiceBindingGetForbidden) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBindingGetForbidden) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBindingGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingGetForbidden) 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 +} + // NewServiceBindingGetNotFound creates a ServiceBindingGetNotFound with default headers values func NewServiceBindingGetNotFound() *ServiceBindingGetNotFound { return &ServiceBindingGetNotFound{} diff --git a/power/client/service_bindings/service_binding_last_operation_get_responses.go b/power/client/service_bindings/service_binding_last_operation_get_responses.go index 96a34e82..00066825 100644 --- a/power/client/service_bindings/service_binding_last_operation_get_responses.go +++ b/power/client/service_bindings/service_binding_last_operation_get_responses.go @@ -35,6 +35,24 @@ func (o *ServiceBindingLastOperationGetReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 401: + result := NewServiceBindingLastOperationGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBindingLastOperationGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBindingLastOperationGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewServiceBindingLastOperationGetGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -182,6 +200,210 @@ func (o *ServiceBindingLastOperationGetBadRequest) readResponse(response runtime return nil } +// NewServiceBindingLastOperationGetUnauthorized creates a ServiceBindingLastOperationGetUnauthorized with default headers values +func NewServiceBindingLastOperationGetUnauthorized() *ServiceBindingLastOperationGetUnauthorized { + return &ServiceBindingLastOperationGetUnauthorized{} +} + +/* +ServiceBindingLastOperationGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBindingLastOperationGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding last operation get unauthorized response has a 2xx status code +func (o *ServiceBindingLastOperationGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding last operation get unauthorized response has a 3xx status code +func (o *ServiceBindingLastOperationGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding last operation get unauthorized response has a 4xx status code +func (o *ServiceBindingLastOperationGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding last operation get unauthorized response has a 5xx status code +func (o *ServiceBindingLastOperationGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding last operation get unauthorized response a status code equal to that given +func (o *ServiceBindingLastOperationGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service binding last operation get unauthorized response +func (o *ServiceBindingLastOperationGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBindingLastOperationGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBindingLastOperationGetUnauthorized) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBindingLastOperationGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingLastOperationGetUnauthorized) 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 +} + +// NewServiceBindingLastOperationGetForbidden creates a ServiceBindingLastOperationGetForbidden with default headers values +func NewServiceBindingLastOperationGetForbidden() *ServiceBindingLastOperationGetForbidden { + return &ServiceBindingLastOperationGetForbidden{} +} + +/* +ServiceBindingLastOperationGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBindingLastOperationGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding last operation get forbidden response has a 2xx status code +func (o *ServiceBindingLastOperationGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding last operation get forbidden response has a 3xx status code +func (o *ServiceBindingLastOperationGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding last operation get forbidden response has a 4xx status code +func (o *ServiceBindingLastOperationGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding last operation get forbidden response has a 5xx status code +func (o *ServiceBindingLastOperationGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding last operation get forbidden response a status code equal to that given +func (o *ServiceBindingLastOperationGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service binding last operation get forbidden response +func (o *ServiceBindingLastOperationGetForbidden) Code() int { + return 403 +} + +func (o *ServiceBindingLastOperationGetForbidden) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBindingLastOperationGetForbidden) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBindingLastOperationGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingLastOperationGetForbidden) 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 +} + +// NewServiceBindingLastOperationGetNotFound creates a ServiceBindingLastOperationGetNotFound with default headers values +func NewServiceBindingLastOperationGetNotFound() *ServiceBindingLastOperationGetNotFound { + return &ServiceBindingLastOperationGetNotFound{} +} + +/* +ServiceBindingLastOperationGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBindingLastOperationGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding last operation get not found response has a 2xx status code +func (o *ServiceBindingLastOperationGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding last operation get not found response has a 3xx status code +func (o *ServiceBindingLastOperationGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding last operation get not found response has a 4xx status code +func (o *ServiceBindingLastOperationGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding last operation get not found response has a 5xx status code +func (o *ServiceBindingLastOperationGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding last operation get not found response a status code equal to that given +func (o *ServiceBindingLastOperationGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service binding last operation get not found response +func (o *ServiceBindingLastOperationGetNotFound) Code() int { + return 404 +} + +func (o *ServiceBindingLastOperationGetNotFound) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBindingLastOperationGetNotFound) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBindingLastOperationGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingLastOperationGetNotFound) 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 +} + // NewServiceBindingLastOperationGetGone creates a ServiceBindingLastOperationGetGone with default headers values func NewServiceBindingLastOperationGetGone() *ServiceBindingLastOperationGetGone { return &ServiceBindingLastOperationGetGone{} diff --git a/power/client/service_bindings/service_binding_unbinding_responses.go b/power/client/service_bindings/service_binding_unbinding_responses.go index 44b855de..6f1cb703 100644 --- a/power/client/service_bindings/service_binding_unbinding_responses.go +++ b/power/client/service_bindings/service_binding_unbinding_responses.go @@ -41,6 +41,24 @@ func (o *ServiceBindingUnbindingReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 401: + result := NewServiceBindingUnbindingUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBindingUnbindingForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBindingUnbindingNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewServiceBindingUnbindingGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -254,6 +272,210 @@ func (o *ServiceBindingUnbindingBadRequest) readResponse(response runtime.Client return nil } +// NewServiceBindingUnbindingUnauthorized creates a ServiceBindingUnbindingUnauthorized with default headers values +func NewServiceBindingUnbindingUnauthorized() *ServiceBindingUnbindingUnauthorized { + return &ServiceBindingUnbindingUnauthorized{} +} + +/* +ServiceBindingUnbindingUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBindingUnbindingUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding unbinding unauthorized response has a 2xx status code +func (o *ServiceBindingUnbindingUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding unbinding unauthorized response has a 3xx status code +func (o *ServiceBindingUnbindingUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding unbinding unauthorized response has a 4xx status code +func (o *ServiceBindingUnbindingUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding unbinding unauthorized response has a 5xx status code +func (o *ServiceBindingUnbindingUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding unbinding unauthorized response a status code equal to that given +func (o *ServiceBindingUnbindingUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service binding unbinding unauthorized response +func (o *ServiceBindingUnbindingUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBindingUnbindingUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBindingUnbindingUnauthorized) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBindingUnbindingUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingUnbindingUnauthorized) 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 +} + +// NewServiceBindingUnbindingForbidden creates a ServiceBindingUnbindingForbidden with default headers values +func NewServiceBindingUnbindingForbidden() *ServiceBindingUnbindingForbidden { + return &ServiceBindingUnbindingForbidden{} +} + +/* +ServiceBindingUnbindingForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBindingUnbindingForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding unbinding forbidden response has a 2xx status code +func (o *ServiceBindingUnbindingForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding unbinding forbidden response has a 3xx status code +func (o *ServiceBindingUnbindingForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding unbinding forbidden response has a 4xx status code +func (o *ServiceBindingUnbindingForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding unbinding forbidden response has a 5xx status code +func (o *ServiceBindingUnbindingForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding unbinding forbidden response a status code equal to that given +func (o *ServiceBindingUnbindingForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service binding unbinding forbidden response +func (o *ServiceBindingUnbindingForbidden) Code() int { + return 403 +} + +func (o *ServiceBindingUnbindingForbidden) Error() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBindingUnbindingForbidden) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBindingUnbindingForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingUnbindingForbidden) 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 +} + +// NewServiceBindingUnbindingNotFound creates a ServiceBindingUnbindingNotFound with default headers values +func NewServiceBindingUnbindingNotFound() *ServiceBindingUnbindingNotFound { + return &ServiceBindingUnbindingNotFound{} +} + +/* +ServiceBindingUnbindingNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBindingUnbindingNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service binding unbinding not found response has a 2xx status code +func (o *ServiceBindingUnbindingNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding unbinding not found response has a 3xx status code +func (o *ServiceBindingUnbindingNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding unbinding not found response has a 4xx status code +func (o *ServiceBindingUnbindingNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding unbinding not found response has a 5xx status code +func (o *ServiceBindingUnbindingNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding unbinding not found response a status code equal to that given +func (o *ServiceBindingUnbindingNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service binding unbinding not found response +func (o *ServiceBindingUnbindingNotFound) Code() int { + return 404 +} + +func (o *ServiceBindingUnbindingNotFound) Error() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBindingUnbindingNotFound) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBindingUnbindingNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBindingUnbindingNotFound) 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 +} + // NewServiceBindingUnbindingGone creates a ServiceBindingUnbindingGone with default headers values func NewServiceBindingUnbindingGone() *ServiceBindingUnbindingGone { return &ServiceBindingUnbindingGone{} diff --git a/power/client/service_instances/service_instance_deprovision_responses.go b/power/client/service_instances/service_instance_deprovision_responses.go index 63bb9bdd..9c2251ee 100644 --- a/power/client/service_instances/service_instance_deprovision_responses.go +++ b/power/client/service_instances/service_instance_deprovision_responses.go @@ -47,6 +47,18 @@ func (o *ServiceInstanceDeprovisionReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 403: + result := NewServiceInstanceDeprovisionForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceInstanceDeprovisionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewServiceInstanceDeprovisionGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -334,6 +346,142 @@ func (o *ServiceInstanceDeprovisionUnauthorized) readResponse(response runtime.C return nil } +// NewServiceInstanceDeprovisionForbidden creates a ServiceInstanceDeprovisionForbidden with default headers values +func NewServiceInstanceDeprovisionForbidden() *ServiceInstanceDeprovisionForbidden { + return &ServiceInstanceDeprovisionForbidden{} +} + +/* +ServiceInstanceDeprovisionForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceInstanceDeprovisionForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance deprovision forbidden response has a 2xx status code +func (o *ServiceInstanceDeprovisionForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance deprovision forbidden response has a 3xx status code +func (o *ServiceInstanceDeprovisionForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance deprovision forbidden response has a 4xx status code +func (o *ServiceInstanceDeprovisionForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance deprovision forbidden response has a 5xx status code +func (o *ServiceInstanceDeprovisionForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance deprovision forbidden response a status code equal to that given +func (o *ServiceInstanceDeprovisionForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service instance deprovision forbidden response +func (o *ServiceInstanceDeprovisionForbidden) Code() int { + return 403 +} + +func (o *ServiceInstanceDeprovisionForbidden) Error() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceDeprovisionForbidden) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceDeprovisionForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceDeprovisionForbidden) 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 +} + +// NewServiceInstanceDeprovisionNotFound creates a ServiceInstanceDeprovisionNotFound with default headers values +func NewServiceInstanceDeprovisionNotFound() *ServiceInstanceDeprovisionNotFound { + return &ServiceInstanceDeprovisionNotFound{} +} + +/* +ServiceInstanceDeprovisionNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceInstanceDeprovisionNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance deprovision not found response has a 2xx status code +func (o *ServiceInstanceDeprovisionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance deprovision not found response has a 3xx status code +func (o *ServiceInstanceDeprovisionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance deprovision not found response has a 4xx status code +func (o *ServiceInstanceDeprovisionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance deprovision not found response has a 5xx status code +func (o *ServiceInstanceDeprovisionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance deprovision not found response a status code equal to that given +func (o *ServiceInstanceDeprovisionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service instance deprovision not found response +func (o *ServiceInstanceDeprovisionNotFound) Code() int { + return 404 +} + +func (o *ServiceInstanceDeprovisionNotFound) Error() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionNotFound %+v", 404, o.Payload) +} + +func (o *ServiceInstanceDeprovisionNotFound) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionNotFound %+v", 404, o.Payload) +} + +func (o *ServiceInstanceDeprovisionNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceDeprovisionNotFound) 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 +} + // NewServiceInstanceDeprovisionGone creates a ServiceInstanceDeprovisionGone with default headers values func NewServiceInstanceDeprovisionGone() *ServiceInstanceDeprovisionGone { return &ServiceInstanceDeprovisionGone{} diff --git a/power/client/service_instances/service_instance_get_responses.go b/power/client/service_instances/service_instance_get_responses.go index eca0ef38..f80a178f 100644 --- a/power/client/service_instances/service_instance_get_responses.go +++ b/power/client/service_instances/service_instance_get_responses.go @@ -29,6 +29,24 @@ func (o *ServiceInstanceGetReader) ReadResponse(response runtime.ClientResponse, return nil, err } return result, nil + case 400: + result := NewServiceInstanceGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceInstanceGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceInstanceGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewServiceInstanceGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -108,6 +126,210 @@ func (o *ServiceInstanceGetOK) readResponse(response runtime.ClientResponse, con return nil } +// NewServiceInstanceGetBadRequest creates a ServiceInstanceGetBadRequest with default headers values +func NewServiceInstanceGetBadRequest() *ServiceInstanceGetBadRequest { + return &ServiceInstanceGetBadRequest{} +} + +/* +ServiceInstanceGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceInstanceGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance get bad request response has a 2xx status code +func (o *ServiceInstanceGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance get bad request response has a 3xx status code +func (o *ServiceInstanceGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance get bad request response has a 4xx status code +func (o *ServiceInstanceGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance get bad request response has a 5xx status code +func (o *ServiceInstanceGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance get bad request response a status code equal to that given +func (o *ServiceInstanceGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service instance get bad request response +func (o *ServiceInstanceGetBadRequest) Code() int { + return 400 +} + +func (o *ServiceInstanceGetBadRequest) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceInstanceGetBadRequest) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceInstanceGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceGetBadRequest) 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 +} + +// NewServiceInstanceGetUnauthorized creates a ServiceInstanceGetUnauthorized with default headers values +func NewServiceInstanceGetUnauthorized() *ServiceInstanceGetUnauthorized { + return &ServiceInstanceGetUnauthorized{} +} + +/* +ServiceInstanceGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceInstanceGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance get unauthorized response has a 2xx status code +func (o *ServiceInstanceGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance get unauthorized response has a 3xx status code +func (o *ServiceInstanceGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance get unauthorized response has a 4xx status code +func (o *ServiceInstanceGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance get unauthorized response has a 5xx status code +func (o *ServiceInstanceGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance get unauthorized response a status code equal to that given +func (o *ServiceInstanceGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service instance get unauthorized response +func (o *ServiceInstanceGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceInstanceGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceInstanceGetUnauthorized) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceInstanceGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceGetUnauthorized) 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 +} + +// NewServiceInstanceGetForbidden creates a ServiceInstanceGetForbidden with default headers values +func NewServiceInstanceGetForbidden() *ServiceInstanceGetForbidden { + return &ServiceInstanceGetForbidden{} +} + +/* +ServiceInstanceGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceInstanceGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance get forbidden response has a 2xx status code +func (o *ServiceInstanceGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance get forbidden response has a 3xx status code +func (o *ServiceInstanceGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance get forbidden response has a 4xx status code +func (o *ServiceInstanceGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance get forbidden response has a 5xx status code +func (o *ServiceInstanceGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance get forbidden response a status code equal to that given +func (o *ServiceInstanceGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service instance get forbidden response +func (o *ServiceInstanceGetForbidden) Code() int { + return 403 +} + +func (o *ServiceInstanceGetForbidden) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceGetForbidden) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceGetForbidden) 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 +} + // NewServiceInstanceGetNotFound creates a ServiceInstanceGetNotFound with default headers values func NewServiceInstanceGetNotFound() *ServiceInstanceGetNotFound { return &ServiceInstanceGetNotFound{} diff --git a/power/client/service_instances/service_instance_last_operation_get_responses.go b/power/client/service_instances/service_instance_last_operation_get_responses.go index 0b14c226..866c00b5 100644 --- a/power/client/service_instances/service_instance_last_operation_get_responses.go +++ b/power/client/service_instances/service_instance_last_operation_get_responses.go @@ -35,6 +35,24 @@ func (o *ServiceInstanceLastOperationGetReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 401: + result := NewServiceInstanceLastOperationGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceInstanceLastOperationGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceInstanceLastOperationGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewServiceInstanceLastOperationGetGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -182,6 +200,210 @@ func (o *ServiceInstanceLastOperationGetBadRequest) readResponse(response runtim return nil } +// NewServiceInstanceLastOperationGetUnauthorized creates a ServiceInstanceLastOperationGetUnauthorized with default headers values +func NewServiceInstanceLastOperationGetUnauthorized() *ServiceInstanceLastOperationGetUnauthorized { + return &ServiceInstanceLastOperationGetUnauthorized{} +} + +/* +ServiceInstanceLastOperationGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceInstanceLastOperationGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance last operation get unauthorized response has a 2xx status code +func (o *ServiceInstanceLastOperationGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance last operation get unauthorized response has a 3xx status code +func (o *ServiceInstanceLastOperationGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance last operation get unauthorized response has a 4xx status code +func (o *ServiceInstanceLastOperationGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance last operation get unauthorized response has a 5xx status code +func (o *ServiceInstanceLastOperationGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance last operation get unauthorized response a status code equal to that given +func (o *ServiceInstanceLastOperationGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service instance last operation get unauthorized response +func (o *ServiceInstanceLastOperationGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceInstanceLastOperationGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceInstanceLastOperationGetUnauthorized) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceInstanceLastOperationGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceLastOperationGetUnauthorized) 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 +} + +// NewServiceInstanceLastOperationGetForbidden creates a ServiceInstanceLastOperationGetForbidden with default headers values +func NewServiceInstanceLastOperationGetForbidden() *ServiceInstanceLastOperationGetForbidden { + return &ServiceInstanceLastOperationGetForbidden{} +} + +/* +ServiceInstanceLastOperationGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceInstanceLastOperationGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance last operation get forbidden response has a 2xx status code +func (o *ServiceInstanceLastOperationGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance last operation get forbidden response has a 3xx status code +func (o *ServiceInstanceLastOperationGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance last operation get forbidden response has a 4xx status code +func (o *ServiceInstanceLastOperationGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance last operation get forbidden response has a 5xx status code +func (o *ServiceInstanceLastOperationGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance last operation get forbidden response a status code equal to that given +func (o *ServiceInstanceLastOperationGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service instance last operation get forbidden response +func (o *ServiceInstanceLastOperationGetForbidden) Code() int { + return 403 +} + +func (o *ServiceInstanceLastOperationGetForbidden) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceLastOperationGetForbidden) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceLastOperationGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceLastOperationGetForbidden) 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 +} + +// NewServiceInstanceLastOperationGetNotFound creates a ServiceInstanceLastOperationGetNotFound with default headers values +func NewServiceInstanceLastOperationGetNotFound() *ServiceInstanceLastOperationGetNotFound { + return &ServiceInstanceLastOperationGetNotFound{} +} + +/* +ServiceInstanceLastOperationGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceInstanceLastOperationGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance last operation get not found response has a 2xx status code +func (o *ServiceInstanceLastOperationGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance last operation get not found response has a 3xx status code +func (o *ServiceInstanceLastOperationGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance last operation get not found response has a 4xx status code +func (o *ServiceInstanceLastOperationGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance last operation get not found response has a 5xx status code +func (o *ServiceInstanceLastOperationGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance last operation get not found response a status code equal to that given +func (o *ServiceInstanceLastOperationGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service instance last operation get not found response +func (o *ServiceInstanceLastOperationGetNotFound) Code() int { + return 404 +} + +func (o *ServiceInstanceLastOperationGetNotFound) Error() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceInstanceLastOperationGetNotFound) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceInstanceLastOperationGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceLastOperationGetNotFound) 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 +} + // NewServiceInstanceLastOperationGetGone creates a ServiceInstanceLastOperationGetGone with default headers values func NewServiceInstanceLastOperationGetGone() *ServiceInstanceLastOperationGetGone { return &ServiceInstanceLastOperationGetGone{} diff --git a/power/client/service_instances/service_instance_provision_responses.go b/power/client/service_instances/service_instance_provision_responses.go index b7eb2433..89e977ad 100644 --- a/power/client/service_instances/service_instance_provision_responses.go +++ b/power/client/service_instances/service_instance_provision_responses.go @@ -47,6 +47,24 @@ func (o *ServiceInstanceProvisionReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 401: + result := NewServiceInstanceProvisionUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceInstanceProvisionForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceInstanceProvisionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewServiceInstanceProvisionConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -336,6 +354,210 @@ func (o *ServiceInstanceProvisionBadRequest) readResponse(response runtime.Clien return nil } +// NewServiceInstanceProvisionUnauthorized creates a ServiceInstanceProvisionUnauthorized with default headers values +func NewServiceInstanceProvisionUnauthorized() *ServiceInstanceProvisionUnauthorized { + return &ServiceInstanceProvisionUnauthorized{} +} + +/* +ServiceInstanceProvisionUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceInstanceProvisionUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance provision unauthorized response has a 2xx status code +func (o *ServiceInstanceProvisionUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance provision unauthorized response has a 3xx status code +func (o *ServiceInstanceProvisionUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision unauthorized response has a 4xx status code +func (o *ServiceInstanceProvisionUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance provision unauthorized response has a 5xx status code +func (o *ServiceInstanceProvisionUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision unauthorized response a status code equal to that given +func (o *ServiceInstanceProvisionUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service instance provision unauthorized response +func (o *ServiceInstanceProvisionUnauthorized) Code() int { + return 401 +} + +func (o *ServiceInstanceProvisionUnauthorized) Error() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceInstanceProvisionUnauthorized) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceInstanceProvisionUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceProvisionUnauthorized) 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 +} + +// NewServiceInstanceProvisionForbidden creates a ServiceInstanceProvisionForbidden with default headers values +func NewServiceInstanceProvisionForbidden() *ServiceInstanceProvisionForbidden { + return &ServiceInstanceProvisionForbidden{} +} + +/* +ServiceInstanceProvisionForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceInstanceProvisionForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance provision forbidden response has a 2xx status code +func (o *ServiceInstanceProvisionForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance provision forbidden response has a 3xx status code +func (o *ServiceInstanceProvisionForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision forbidden response has a 4xx status code +func (o *ServiceInstanceProvisionForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance provision forbidden response has a 5xx status code +func (o *ServiceInstanceProvisionForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision forbidden response a status code equal to that given +func (o *ServiceInstanceProvisionForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service instance provision forbidden response +func (o *ServiceInstanceProvisionForbidden) Code() int { + return 403 +} + +func (o *ServiceInstanceProvisionForbidden) Error() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceProvisionForbidden) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceProvisionForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceProvisionForbidden) 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 +} + +// NewServiceInstanceProvisionNotFound creates a ServiceInstanceProvisionNotFound with default headers values +func NewServiceInstanceProvisionNotFound() *ServiceInstanceProvisionNotFound { + return &ServiceInstanceProvisionNotFound{} +} + +/* +ServiceInstanceProvisionNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceInstanceProvisionNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance provision not found response has a 2xx status code +func (o *ServiceInstanceProvisionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance provision not found response has a 3xx status code +func (o *ServiceInstanceProvisionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision not found response has a 4xx status code +func (o *ServiceInstanceProvisionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance provision not found response has a 5xx status code +func (o *ServiceInstanceProvisionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision not found response a status code equal to that given +func (o *ServiceInstanceProvisionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service instance provision not found response +func (o *ServiceInstanceProvisionNotFound) Code() int { + return 404 +} + +func (o *ServiceInstanceProvisionNotFound) Error() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionNotFound %+v", 404, o.Payload) +} + +func (o *ServiceInstanceProvisionNotFound) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionNotFound %+v", 404, o.Payload) +} + +func (o *ServiceInstanceProvisionNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceProvisionNotFound) 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 +} + // NewServiceInstanceProvisionConflict creates a ServiceInstanceProvisionConflict with default headers values func NewServiceInstanceProvisionConflict() *ServiceInstanceProvisionConflict { return &ServiceInstanceProvisionConflict{} diff --git a/power/client/service_instances/service_instance_update_responses.go b/power/client/service_instances/service_instance_update_responses.go index 5aafb0bd..eeb9bd7c 100644 --- a/power/client/service_instances/service_instance_update_responses.go +++ b/power/client/service_instances/service_instance_update_responses.go @@ -41,6 +41,24 @@ func (o *ServiceInstanceUpdateReader) ReadResponse(response runtime.ClientRespon return nil, err } return nil, result + case 401: + result := NewServiceInstanceUpdateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceInstanceUpdateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceInstanceUpdateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewServiceInstanceUpdateUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -254,6 +272,210 @@ func (o *ServiceInstanceUpdateBadRequest) readResponse(response runtime.ClientRe return nil } +// NewServiceInstanceUpdateUnauthorized creates a ServiceInstanceUpdateUnauthorized with default headers values +func NewServiceInstanceUpdateUnauthorized() *ServiceInstanceUpdateUnauthorized { + return &ServiceInstanceUpdateUnauthorized{} +} + +/* +ServiceInstanceUpdateUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceInstanceUpdateUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance update unauthorized response has a 2xx status code +func (o *ServiceInstanceUpdateUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance update unauthorized response has a 3xx status code +func (o *ServiceInstanceUpdateUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance update unauthorized response has a 4xx status code +func (o *ServiceInstanceUpdateUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance update unauthorized response has a 5xx status code +func (o *ServiceInstanceUpdateUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance update unauthorized response a status code equal to that given +func (o *ServiceInstanceUpdateUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service instance update unauthorized response +func (o *ServiceInstanceUpdateUnauthorized) Code() int { + return 401 +} + +func (o *ServiceInstanceUpdateUnauthorized) Error() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceInstanceUpdateUnauthorized) String() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceInstanceUpdateUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceUpdateUnauthorized) 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 +} + +// NewServiceInstanceUpdateForbidden creates a ServiceInstanceUpdateForbidden with default headers values +func NewServiceInstanceUpdateForbidden() *ServiceInstanceUpdateForbidden { + return &ServiceInstanceUpdateForbidden{} +} + +/* +ServiceInstanceUpdateForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceInstanceUpdateForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance update forbidden response has a 2xx status code +func (o *ServiceInstanceUpdateForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance update forbidden response has a 3xx status code +func (o *ServiceInstanceUpdateForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance update forbidden response has a 4xx status code +func (o *ServiceInstanceUpdateForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance update forbidden response has a 5xx status code +func (o *ServiceInstanceUpdateForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance update forbidden response a status code equal to that given +func (o *ServiceInstanceUpdateForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service instance update forbidden response +func (o *ServiceInstanceUpdateForbidden) Code() int { + return 403 +} + +func (o *ServiceInstanceUpdateForbidden) Error() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceUpdateForbidden) String() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateForbidden %+v", 403, o.Payload) +} + +func (o *ServiceInstanceUpdateForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceUpdateForbidden) 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 +} + +// NewServiceInstanceUpdateNotFound creates a ServiceInstanceUpdateNotFound with default headers values +func NewServiceInstanceUpdateNotFound() *ServiceInstanceUpdateNotFound { + return &ServiceInstanceUpdateNotFound{} +} + +/* +ServiceInstanceUpdateNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceInstanceUpdateNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service instance update not found response has a 2xx status code +func (o *ServiceInstanceUpdateNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance update not found response has a 3xx status code +func (o *ServiceInstanceUpdateNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance update not found response has a 4xx status code +func (o *ServiceInstanceUpdateNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance update not found response has a 5xx status code +func (o *ServiceInstanceUpdateNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance update not found response a status code equal to that given +func (o *ServiceInstanceUpdateNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service instance update not found response +func (o *ServiceInstanceUpdateNotFound) Code() int { + return 404 +} + +func (o *ServiceInstanceUpdateNotFound) Error() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateNotFound %+v", 404, o.Payload) +} + +func (o *ServiceInstanceUpdateNotFound) String() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateNotFound %+v", 404, o.Payload) +} + +func (o *ServiceInstanceUpdateNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceInstanceUpdateNotFound) 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 +} + // NewServiceInstanceUpdateUnprocessableEntity creates a ServiceInstanceUpdateUnprocessableEntity with default headers values func NewServiceInstanceUpdateUnprocessableEntity() *ServiceInstanceUpdateUnprocessableEntity { return &ServiceInstanceUpdateUnprocessableEntity{} diff --git a/power/client/storage_types/service_broker_storagetypes_get_responses.go b/power/client/storage_types/service_broker_storagetypes_get_responses.go index 479d3aca..e1fb7e6b 100644 --- a/power/client/storage_types/service_broker_storagetypes_get_responses.go +++ b/power/client/storage_types/service_broker_storagetypes_get_responses.go @@ -29,6 +29,30 @@ func (o *ServiceBrokerStoragetypesGetReader) ReadResponse(response runtime.Clien return nil, err } return result, nil + case 400: + result := NewServiceBrokerStoragetypesGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBrokerStoragetypesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerStoragetypesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerStoragetypesGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewServiceBrokerStoragetypesGetUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -112,6 +136,278 @@ func (o *ServiceBrokerStoragetypesGetOK) readResponse(response runtime.ClientRes return nil } +// NewServiceBrokerStoragetypesGetBadRequest creates a ServiceBrokerStoragetypesGetBadRequest with default headers values +func NewServiceBrokerStoragetypesGetBadRequest() *ServiceBrokerStoragetypesGetBadRequest { + return &ServiceBrokerStoragetypesGetBadRequest{} +} + +/* +ServiceBrokerStoragetypesGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerStoragetypesGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker storagetypes get bad request response has a 2xx status code +func (o *ServiceBrokerStoragetypesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker storagetypes get bad request response has a 3xx status code +func (o *ServiceBrokerStoragetypesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker storagetypes get bad request response has a 4xx status code +func (o *ServiceBrokerStoragetypesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker storagetypes get bad request response has a 5xx status code +func (o *ServiceBrokerStoragetypesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker storagetypes get bad request response a status code equal to that given +func (o *ServiceBrokerStoragetypesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker storagetypes get bad request response +func (o *ServiceBrokerStoragetypesGetBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerStoragetypesGetBadRequest) Error() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerStoragetypesGetBadRequest) 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 +} + +// NewServiceBrokerStoragetypesGetUnauthorized creates a ServiceBrokerStoragetypesGetUnauthorized with default headers values +func NewServiceBrokerStoragetypesGetUnauthorized() *ServiceBrokerStoragetypesGetUnauthorized { + return &ServiceBrokerStoragetypesGetUnauthorized{} +} + +/* +ServiceBrokerStoragetypesGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerStoragetypesGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker storagetypes get unauthorized response has a 2xx status code +func (o *ServiceBrokerStoragetypesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker storagetypes get unauthorized response has a 3xx status code +func (o *ServiceBrokerStoragetypesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker storagetypes get unauthorized response has a 4xx status code +func (o *ServiceBrokerStoragetypesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker storagetypes get unauthorized response has a 5xx status code +func (o *ServiceBrokerStoragetypesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker storagetypes get unauthorized response a status code equal to that given +func (o *ServiceBrokerStoragetypesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker storagetypes get unauthorized response +func (o *ServiceBrokerStoragetypesGetUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerStoragetypesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerStoragetypesGetUnauthorized) 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 +} + +// NewServiceBrokerStoragetypesGetForbidden creates a ServiceBrokerStoragetypesGetForbidden with default headers values +func NewServiceBrokerStoragetypesGetForbidden() *ServiceBrokerStoragetypesGetForbidden { + return &ServiceBrokerStoragetypesGetForbidden{} +} + +/* +ServiceBrokerStoragetypesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerStoragetypesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker storagetypes get forbidden response has a 2xx status code +func (o *ServiceBrokerStoragetypesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker storagetypes get forbidden response has a 3xx status code +func (o *ServiceBrokerStoragetypesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker storagetypes get forbidden response has a 4xx status code +func (o *ServiceBrokerStoragetypesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker storagetypes get forbidden response has a 5xx status code +func (o *ServiceBrokerStoragetypesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker storagetypes get forbidden response a status code equal to that given +func (o *ServiceBrokerStoragetypesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker storagetypes get forbidden response +func (o *ServiceBrokerStoragetypesGetForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerStoragetypesGetForbidden) Error() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetForbidden) String() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerStoragetypesGetForbidden) 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 +} + +// NewServiceBrokerStoragetypesGetNotFound creates a ServiceBrokerStoragetypesGetNotFound with default headers values +func NewServiceBrokerStoragetypesGetNotFound() *ServiceBrokerStoragetypesGetNotFound { + return &ServiceBrokerStoragetypesGetNotFound{} +} + +/* +ServiceBrokerStoragetypesGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerStoragetypesGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker storagetypes get not found response has a 2xx status code +func (o *ServiceBrokerStoragetypesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker storagetypes get not found response has a 3xx status code +func (o *ServiceBrokerStoragetypesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker storagetypes get not found response has a 4xx status code +func (o *ServiceBrokerStoragetypesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker storagetypes get not found response has a 5xx status code +func (o *ServiceBrokerStoragetypesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker storagetypes get not found response a status code equal to that given +func (o *ServiceBrokerStoragetypesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker storagetypes get not found response +func (o *ServiceBrokerStoragetypesGetNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerStoragetypesGetNotFound) Error() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerStoragetypesGetNotFound) 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 +} + // NewServiceBrokerStoragetypesGetUnprocessableEntity creates a ServiceBrokerStoragetypesGetUnprocessableEntity with default headers values func NewServiceBrokerStoragetypesGetUnprocessableEntity() *ServiceBrokerStoragetypesGetUnprocessableEntity { return &ServiceBrokerStoragetypesGetUnprocessableEntity{} diff --git a/power/client/swagger_spec/service_broker_swaggerspec_responses.go b/power/client/swagger_spec/service_broker_swaggerspec_responses.go index eb3e7a9c..8e445944 100644 --- a/power/client/swagger_spec/service_broker_swaggerspec_responses.go +++ b/power/client/swagger_spec/service_broker_swaggerspec_responses.go @@ -29,6 +29,30 @@ func (o *ServiceBrokerSwaggerspecReader) ReadResponse(response runtime.ClientRes return nil, err } return result, nil + case 400: + result := NewServiceBrokerSwaggerspecBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewServiceBrokerSwaggerspecUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewServiceBrokerSwaggerspecForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewServiceBrokerSwaggerspecNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[GET /v1/swagger.json] serviceBroker.swaggerspec", response, response.Code()) } @@ -99,3 +123,275 @@ func (o *ServiceBrokerSwaggerspecOK) readResponse(response runtime.ClientRespons return nil } + +// NewServiceBrokerSwaggerspecBadRequest creates a ServiceBrokerSwaggerspecBadRequest with default headers values +func NewServiceBrokerSwaggerspecBadRequest() *ServiceBrokerSwaggerspecBadRequest { + return &ServiceBrokerSwaggerspecBadRequest{} +} + +/* +ServiceBrokerSwaggerspecBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type ServiceBrokerSwaggerspecBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker swaggerspec bad request response has a 2xx status code +func (o *ServiceBrokerSwaggerspecBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker swaggerspec bad request response has a 3xx status code +func (o *ServiceBrokerSwaggerspecBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker swaggerspec bad request response has a 4xx status code +func (o *ServiceBrokerSwaggerspecBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker swaggerspec bad request response has a 5xx status code +func (o *ServiceBrokerSwaggerspecBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker swaggerspec bad request response a status code equal to that given +func (o *ServiceBrokerSwaggerspecBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker swaggerspec bad request response +func (o *ServiceBrokerSwaggerspecBadRequest) Code() int { + return 400 +} + +func (o *ServiceBrokerSwaggerspecBadRequest) Error() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerSwaggerspecBadRequest) String() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecBadRequest %+v", 400, o.Payload) +} + +func (o *ServiceBrokerSwaggerspecBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerSwaggerspecBadRequest) 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 +} + +// NewServiceBrokerSwaggerspecUnauthorized creates a ServiceBrokerSwaggerspecUnauthorized with default headers values +func NewServiceBrokerSwaggerspecUnauthorized() *ServiceBrokerSwaggerspecUnauthorized { + return &ServiceBrokerSwaggerspecUnauthorized{} +} + +/* +ServiceBrokerSwaggerspecUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type ServiceBrokerSwaggerspecUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker swaggerspec unauthorized response has a 2xx status code +func (o *ServiceBrokerSwaggerspecUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker swaggerspec unauthorized response has a 3xx status code +func (o *ServiceBrokerSwaggerspecUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker swaggerspec unauthorized response has a 4xx status code +func (o *ServiceBrokerSwaggerspecUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker swaggerspec unauthorized response has a 5xx status code +func (o *ServiceBrokerSwaggerspecUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker swaggerspec unauthorized response a status code equal to that given +func (o *ServiceBrokerSwaggerspecUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker swaggerspec unauthorized response +func (o *ServiceBrokerSwaggerspecUnauthorized) Code() int { + return 401 +} + +func (o *ServiceBrokerSwaggerspecUnauthorized) Error() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerSwaggerspecUnauthorized) String() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecUnauthorized %+v", 401, o.Payload) +} + +func (o *ServiceBrokerSwaggerspecUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerSwaggerspecUnauthorized) 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 +} + +// NewServiceBrokerSwaggerspecForbidden creates a ServiceBrokerSwaggerspecForbidden with default headers values +func NewServiceBrokerSwaggerspecForbidden() *ServiceBrokerSwaggerspecForbidden { + return &ServiceBrokerSwaggerspecForbidden{} +} + +/* +ServiceBrokerSwaggerspecForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type ServiceBrokerSwaggerspecForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker swaggerspec forbidden response has a 2xx status code +func (o *ServiceBrokerSwaggerspecForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker swaggerspec forbidden response has a 3xx status code +func (o *ServiceBrokerSwaggerspecForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker swaggerspec forbidden response has a 4xx status code +func (o *ServiceBrokerSwaggerspecForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker swaggerspec forbidden response has a 5xx status code +func (o *ServiceBrokerSwaggerspecForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker swaggerspec forbidden response a status code equal to that given +func (o *ServiceBrokerSwaggerspecForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker swaggerspec forbidden response +func (o *ServiceBrokerSwaggerspecForbidden) Code() int { + return 403 +} + +func (o *ServiceBrokerSwaggerspecForbidden) Error() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerSwaggerspecForbidden) String() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecForbidden %+v", 403, o.Payload) +} + +func (o *ServiceBrokerSwaggerspecForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerSwaggerspecForbidden) 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 +} + +// NewServiceBrokerSwaggerspecNotFound creates a ServiceBrokerSwaggerspecNotFound with default headers values +func NewServiceBrokerSwaggerspecNotFound() *ServiceBrokerSwaggerspecNotFound { + return &ServiceBrokerSwaggerspecNotFound{} +} + +/* +ServiceBrokerSwaggerspecNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type ServiceBrokerSwaggerspecNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker swaggerspec not found response has a 2xx status code +func (o *ServiceBrokerSwaggerspecNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker swaggerspec not found response has a 3xx status code +func (o *ServiceBrokerSwaggerspecNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker swaggerspec not found response has a 4xx status code +func (o *ServiceBrokerSwaggerspecNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker swaggerspec not found response has a 5xx status code +func (o *ServiceBrokerSwaggerspecNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker swaggerspec not found response a status code equal to that given +func (o *ServiceBrokerSwaggerspecNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker swaggerspec not found response +func (o *ServiceBrokerSwaggerspecNotFound) Code() int { + return 404 +} + +func (o *ServiceBrokerSwaggerspecNotFound) Error() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerSwaggerspecNotFound) String() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecNotFound %+v", 404, o.Payload) +} + +func (o *ServiceBrokerSwaggerspecNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerSwaggerspecNotFound) 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/workspaces/v1_workspaces_get_parameters.go b/power/client/workspaces/v1_workspaces_get_parameters.go new file mode 100644 index 00000000..9cf5760c --- /dev/null +++ b/power/client/workspaces/v1_workspaces_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package workspaces + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1WorkspacesGetParams creates a new V1WorkspacesGetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewV1WorkspacesGetParams() *V1WorkspacesGetParams { + return &V1WorkspacesGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesGetParamsWithTimeout creates a new V1WorkspacesGetParams object +// with the ability to set a timeout on a request. +func NewV1WorkspacesGetParamsWithTimeout(timeout time.Duration) *V1WorkspacesGetParams { + return &V1WorkspacesGetParams{ + timeout: timeout, + } +} + +// NewV1WorkspacesGetParamsWithContext creates a new V1WorkspacesGetParams object +// with the ability to set a context for a request. +func NewV1WorkspacesGetParamsWithContext(ctx context.Context) *V1WorkspacesGetParams { + return &V1WorkspacesGetParams{ + Context: ctx, + } +} + +// NewV1WorkspacesGetParamsWithHTTPClient creates a new V1WorkspacesGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1WorkspacesGetParamsWithHTTPClient(client *http.Client) *V1WorkspacesGetParams { + return &V1WorkspacesGetParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesGetParams contains all the parameters to send to the API endpoint + + for the v1 workspaces get operation. + + Typically these are written to a http.Request. +*/ +type V1WorkspacesGetParams struct { + + /* WorkspaceID. + + Workspace ID + */ + WorkspaceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 workspaces get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1WorkspacesGetParams) WithDefaults() *V1WorkspacesGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 workspaces get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1WorkspacesGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 workspaces get params +func (o *V1WorkspacesGetParams) WithTimeout(timeout time.Duration) *V1WorkspacesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces get params +func (o *V1WorkspacesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces get params +func (o *V1WorkspacesGetParams) WithContext(ctx context.Context) *V1WorkspacesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces get params +func (o *V1WorkspacesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces get params +func (o *V1WorkspacesGetParams) WithHTTPClient(client *http.Client) *V1WorkspacesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces get params +func (o *V1WorkspacesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithWorkspaceID adds the workspaceID to the v1 workspaces get params +func (o *V1WorkspacesGetParams) WithWorkspaceID(workspaceID string) *V1WorkspacesGetParams { + o.SetWorkspaceID(workspaceID) + return o +} + +// SetWorkspaceID adds the workspaceId to the v1 workspaces get params +func (o *V1WorkspacesGetParams) SetWorkspaceID(workspaceID string) { + o.WorkspaceID = workspaceID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param workspace_id + if err := r.SetPathParam("workspace_id", o.WorkspaceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/power/client/workspaces/v1_workspaces_get_responses.go b/power/client/workspaces/v1_workspaces_get_responses.go new file mode 100644 index 00000000..e04a3ee5 --- /dev/null +++ b/power/client/workspaces/v1_workspaces_get_responses.go @@ -0,0 +1,547 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package workspaces + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// V1WorkspacesGetReader is a Reader for the V1WorkspacesGet structure. +type V1WorkspacesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1WorkspacesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1WorkspacesGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1WorkspacesGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1WorkspacesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewV1WorkspacesGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewV1WorkspacesGetTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1WorkspacesGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/workspaces/{workspace_id}] v1.workspaces.get", response, response.Code()) + } +} + +// NewV1WorkspacesGetOK creates a V1WorkspacesGetOK with default headers values +func NewV1WorkspacesGetOK() *V1WorkspacesGetOK { + return &V1WorkspacesGetOK{} +} + +/* +V1WorkspacesGetOK describes a response with status code 200, with default header values. + +OK +*/ +type V1WorkspacesGetOK struct { + Payload *models.Workspace +} + +// IsSuccess returns true when this v1 workspaces get o k response has a 2xx status code +func (o *V1WorkspacesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 workspaces get o k response has a 3xx status code +func (o *V1WorkspacesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces get o k response has a 4xx status code +func (o *V1WorkspacesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 workspaces get o k response has a 5xx status code +func (o *V1WorkspacesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces get o k response a status code equal to that given +func (o *V1WorkspacesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 workspaces get o k response +func (o *V1WorkspacesGetOK) Code() int { + return 200 +} + +func (o *V1WorkspacesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetOK %+v", 200, o.Payload) +} + +func (o *V1WorkspacesGetOK) String() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetOK %+v", 200, o.Payload) +} + +func (o *V1WorkspacesGetOK) GetPayload() *models.Workspace { + return o.Payload +} + +func (o *V1WorkspacesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Workspace) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1WorkspacesGetBadRequest creates a V1WorkspacesGetBadRequest with default headers values +func NewV1WorkspacesGetBadRequest() *V1WorkspacesGetBadRequest { + return &V1WorkspacesGetBadRequest{} +} + +/* +V1WorkspacesGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1WorkspacesGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces get bad request response has a 2xx status code +func (o *V1WorkspacesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces get bad request response has a 3xx status code +func (o *V1WorkspacesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces get bad request response has a 4xx status code +func (o *V1WorkspacesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 workspaces get bad request response has a 5xx status code +func (o *V1WorkspacesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces get bad request response a status code equal to that given +func (o *V1WorkspacesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 workspaces get bad request response +func (o *V1WorkspacesGetBadRequest) Code() int { + return 400 +} + +func (o *V1WorkspacesGetBadRequest) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetBadRequest %+v", 400, o.Payload) +} + +func (o *V1WorkspacesGetBadRequest) String() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetBadRequest %+v", 400, o.Payload) +} + +func (o *V1WorkspacesGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetBadRequest) 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 +} + +// NewV1WorkspacesGetUnauthorized creates a V1WorkspacesGetUnauthorized with default headers values +func NewV1WorkspacesGetUnauthorized() *V1WorkspacesGetUnauthorized { + return &V1WorkspacesGetUnauthorized{} +} + +/* +V1WorkspacesGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1WorkspacesGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces get unauthorized response has a 2xx status code +func (o *V1WorkspacesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces get unauthorized response has a 3xx status code +func (o *V1WorkspacesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces get unauthorized response has a 4xx status code +func (o *V1WorkspacesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 workspaces get unauthorized response has a 5xx status code +func (o *V1WorkspacesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces get unauthorized response a status code equal to that given +func (o *V1WorkspacesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 workspaces get unauthorized response +func (o *V1WorkspacesGetUnauthorized) Code() int { + return 401 +} + +func (o *V1WorkspacesGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *V1WorkspacesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetUnauthorized %+v", 401, o.Payload) +} + +func (o *V1WorkspacesGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetUnauthorized) 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 +} + +// NewV1WorkspacesGetForbidden creates a V1WorkspacesGetForbidden with default headers values +func NewV1WorkspacesGetForbidden() *V1WorkspacesGetForbidden { + return &V1WorkspacesGetForbidden{} +} + +/* +V1WorkspacesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1WorkspacesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces get forbidden response has a 2xx status code +func (o *V1WorkspacesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces get forbidden response has a 3xx status code +func (o *V1WorkspacesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces get forbidden response has a 4xx status code +func (o *V1WorkspacesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 workspaces get forbidden response has a 5xx status code +func (o *V1WorkspacesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces get forbidden response a status code equal to that given +func (o *V1WorkspacesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 workspaces get forbidden response +func (o *V1WorkspacesGetForbidden) Code() int { + return 403 +} + +func (o *V1WorkspacesGetForbidden) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetForbidden %+v", 403, o.Payload) +} + +func (o *V1WorkspacesGetForbidden) String() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetForbidden %+v", 403, o.Payload) +} + +func (o *V1WorkspacesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetForbidden) 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 +} + +// NewV1WorkspacesGetNotFound creates a V1WorkspacesGetNotFound with default headers values +func NewV1WorkspacesGetNotFound() *V1WorkspacesGetNotFound { + return &V1WorkspacesGetNotFound{} +} + +/* +V1WorkspacesGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type V1WorkspacesGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces get not found response has a 2xx status code +func (o *V1WorkspacesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces get not found response has a 3xx status code +func (o *V1WorkspacesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces get not found response has a 4xx status code +func (o *V1WorkspacesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 workspaces get not found response has a 5xx status code +func (o *V1WorkspacesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces get not found response a status code equal to that given +func (o *V1WorkspacesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the v1 workspaces get not found response +func (o *V1WorkspacesGetNotFound) Code() int { + return 404 +} + +func (o *V1WorkspacesGetNotFound) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetNotFound %+v", 404, o.Payload) +} + +func (o *V1WorkspacesGetNotFound) String() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetNotFound %+v", 404, o.Payload) +} + +func (o *V1WorkspacesGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetNotFound) 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 +} + +// NewV1WorkspacesGetTooManyRequests creates a V1WorkspacesGetTooManyRequests with default headers values +func NewV1WorkspacesGetTooManyRequests() *V1WorkspacesGetTooManyRequests { + return &V1WorkspacesGetTooManyRequests{} +} + +/* +V1WorkspacesGetTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type V1WorkspacesGetTooManyRequests struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces get too many requests response has a 2xx status code +func (o *V1WorkspacesGetTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces get too many requests response has a 3xx status code +func (o *V1WorkspacesGetTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces get too many requests response has a 4xx status code +func (o *V1WorkspacesGetTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 workspaces get too many requests response has a 5xx status code +func (o *V1WorkspacesGetTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces get too many requests response a status code equal to that given +func (o *V1WorkspacesGetTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the v1 workspaces get too many requests response +func (o *V1WorkspacesGetTooManyRequests) Code() int { + return 429 +} + +func (o *V1WorkspacesGetTooManyRequests) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetTooManyRequests %+v", 429, o.Payload) +} + +func (o *V1WorkspacesGetTooManyRequests) String() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetTooManyRequests %+v", 429, o.Payload) +} + +func (o *V1WorkspacesGetTooManyRequests) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetTooManyRequests) 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 +} + +// NewV1WorkspacesGetInternalServerError creates a V1WorkspacesGetInternalServerError with default headers values +func NewV1WorkspacesGetInternalServerError() *V1WorkspacesGetInternalServerError { + return &V1WorkspacesGetInternalServerError{} +} + +/* +V1WorkspacesGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1WorkspacesGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces get internal server error response has a 2xx status code +func (o *V1WorkspacesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces get internal server error response has a 3xx status code +func (o *V1WorkspacesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces get internal server error response has a 4xx status code +func (o *V1WorkspacesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 workspaces get internal server error response has a 5xx status code +func (o *V1WorkspacesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 workspaces get internal server error response a status code equal to that given +func (o *V1WorkspacesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 workspaces get internal server error response +func (o *V1WorkspacesGetInternalServerError) Code() int { + return 500 +} + +func (o *V1WorkspacesGetInternalServerError) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetInternalServerError %+v", 500, o.Payload) +} + +func (o *V1WorkspacesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /v1/workspaces/{workspace_id}][%d] v1WorkspacesGetInternalServerError %+v", 500, o.Payload) +} + +func (o *V1WorkspacesGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetInternalServerError) 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/workspaces/workspaces_client.go b/power/client/workspaces/workspaces_client.go new file mode 100644 index 00000000..0ea4e0aa --- /dev/null +++ b/power/client/workspaces/workspaces_client.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package workspaces + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new workspaces API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for workspaces API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + V1WorkspacesGet(params *V1WorkspacesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1WorkspacesGetOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +V1WorkspacesGet gets a workspace s information and capabilities +*/ +func (a *Client) V1WorkspacesGet(params *V1WorkspacesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1WorkspacesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesGetParams() + } + op := &runtime.ClientOperation{ + ID: "v1.workspaces.get", + Method: "GET", + PathPattern: "/v1/workspaces/{workspace_id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1WorkspacesGetReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1.workspaces.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/power/models/workspace.go b/power/models/workspace.go new file mode 100644 index 00000000..eefac672 --- /dev/null +++ b/power/models/workspace.go @@ -0,0 +1,313 @@ +// 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" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Workspace workspace +// +// swagger:model Workspace +type Workspace struct { + + // Workspace Capabilities + // Required: true + Capabilities map[string]bool `json:"capabilities"` + + // The Workspace information + // Required: true + Details *WorkspaceDetails `json:"details"` + + // Workspace ID + // Required: true + ID *string `json:"id"` + + // The Workspace location + // Required: true + Location *WorkspaceLocation `json:"location"` + + // The Workspace name + // Required: true + Name *string `json:"name"` + + // The Workspace status + // Required: true + // Enum: [ACTIVE FAILED] + Status *string `json:"status"` + + // The Workspace type + // Required: true + // Enum: [Public Cloud Private Cloud] + Type *string `json:"type"` +} + +// Validate validates this workspace +func (m *Workspace) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCapabilities(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDetails(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) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Workspace) validateCapabilities(formats strfmt.Registry) error { + + if err := validate.Required("capabilities", "body", m.Capabilities); err != nil { + return err + } + + return nil +} + +func (m *Workspace) validateDetails(formats strfmt.Registry) error { + + if err := validate.Required("details", "body", m.Details); err != nil { + return err + } + + if m.Details != nil { + if err := m.Details.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details") + } + return err + } + } + + return nil +} + +func (m *Workspace) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *Workspace) validateLocation(formats strfmt.Registry) error { + + if err := validate.Required("location", "body", m.Location); err != nil { + return err + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") + } + return err + } + } + + return nil +} + +func (m *Workspace) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +var workspaceTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["ACTIVE","FAILED"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + workspaceTypeStatusPropEnum = append(workspaceTypeStatusPropEnum, v) + } +} + +const ( + + // WorkspaceStatusACTIVE captures enum value "ACTIVE" + WorkspaceStatusACTIVE string = "ACTIVE" + + // WorkspaceStatusFAILED captures enum value "FAILED" + WorkspaceStatusFAILED string = "FAILED" +) + +// prop value enum +func (m *Workspace) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, workspaceTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Workspace) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + // value enum + if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { + return err + } + + return nil +} + +var workspaceTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Public Cloud","Private Cloud"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + workspaceTypeTypePropEnum = append(workspaceTypeTypePropEnum, v) + } +} + +const ( + + // WorkspaceTypePublicCloud captures enum value "Public Cloud" + WorkspaceTypePublicCloud string = "Public Cloud" + + // WorkspaceTypePrivateCloud captures enum value "Private Cloud" + WorkspaceTypePrivateCloud string = "Private Cloud" +) + +// prop value enum +func (m *Workspace) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, workspaceTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Workspace) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this workspace based on the context it is used +func (m *Workspace) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLocation(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Workspace) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + if m.Details != nil { + + if err := m.Details.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details") + } + return err + } + } + + return nil +} + +func (m *Workspace) contextValidateLocation(ctx context.Context, formats strfmt.Registry) error { + + if m.Location != nil { + + if err := m.Location.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("location") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Workspace) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Workspace) UnmarshalBinary(b []byte) error { + var res Workspace + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/workspace_details.go b/power/models/workspace_details.go new file mode 100644 index 00000000..f9293479 --- /dev/null +++ b/power/models/workspace_details.go @@ -0,0 +1,96 @@ +// 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" +) + +// WorkspaceDetails workspace details +// +// swagger:model WorkspaceDetails +type WorkspaceDetails struct { + + // Workspace creation date + // Required: true + // Format: date-time + CreationDate *strfmt.DateTime `json:"creationDate"` + + // The Workspace crn + // Required: true + Crn *string `json:"crn"` + + // Link to Workspace Resource + Href string `json:"href,omitempty"` +} + +// Validate validates this workspace details +func (m *WorkspaceDetails) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreationDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCrn(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WorkspaceDetails) validateCreationDate(formats strfmt.Registry) error { + + if err := validate.Required("creationDate", "body", m.CreationDate); err != nil { + return err + } + + if err := validate.FormatOf("creationDate", "body", "date-time", m.CreationDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *WorkspaceDetails) validateCrn(formats strfmt.Registry) error { + + if err := validate.Required("crn", "body", m.Crn); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this workspace details based on context it is used +func (m *WorkspaceDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *WorkspaceDetails) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WorkspaceDetails) UnmarshalBinary(b []byte) error { + var res WorkspaceDetails + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/workspace_location.go b/power/models/workspace_location.go new file mode 100644 index 00000000..0a81b980 --- /dev/null +++ b/power/models/workspace_location.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" +) + +// WorkspaceLocation workspace location +// +// swagger:model WorkspaceLocation +type WorkspaceLocation struct { + + // The Workspace location region zone + // Required: true + Region *string `json:"region"` + + // The Workspace location region type + // Required: true + Type *string `json:"type"` + + // The Workspace location region url + // Required: true + URL *string `json:"url"` +} + +// Validate validates this workspace location +func (m *WorkspaceLocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegion(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *WorkspaceLocation) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +func (m *WorkspaceLocation) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +func (m *WorkspaceLocation) validateURL(formats strfmt.Registry) error { + + if err := validate.Required("url", "body", m.URL); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this workspace location based on context it is used +func (m *WorkspaceLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *WorkspaceLocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *WorkspaceLocation) UnmarshalBinary(b []byte) error { + var res WorkspaceLocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/workspaces.go b/power/models/workspaces.go new file mode 100644 index 00000000..41ede8d5 --- /dev/null +++ b/power/models/workspaces.go @@ -0,0 +1,124 @@ +// 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" + "github.com/go-openapi/validate" +) + +// Workspaces workspaces +// +// swagger:model Workspaces +type Workspaces struct { + + // The list of available workspaces + // Required: true + Workspace []*Workspace `json:"workspace"` +} + +// Validate validates this workspaces +func (m *Workspaces) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateWorkspace(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Workspaces) validateWorkspace(formats strfmt.Registry) error { + + if err := validate.Required("workspace", "body", m.Workspace); err != nil { + return err + } + + for i := 0; i < len(m.Workspace); i++ { + if swag.IsZero(m.Workspace[i]) { // not required + continue + } + + if m.Workspace[i] != nil { + if err := m.Workspace[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspace" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("workspace" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this workspaces based on the context it is used +func (m *Workspaces) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateWorkspace(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Workspaces) contextValidateWorkspace(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Workspace); i++ { + + if m.Workspace[i] != nil { + + if swag.IsZero(m.Workspace[i]) { // not required + return nil + } + + if err := m.Workspace[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspace" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("workspace" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Workspaces) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Workspaces) UnmarshalBinary(b []byte) error { + var res Workspaces + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +}