From b5be3da386c1ee4dd66962a668949f9cb420fae8 Mon Sep 17 00:00:00 2001 From: Hiro Miyamoto Date: Wed, 8 Nov 2023 14:07:25 -0500 Subject: [PATCH 1/2] Vendor modules changes to support ValidatePERAvailability Signed-off-by: Hiro Miyamoto --- go.mod | 20 +- go.sum | 85 +- .../clients/instance/ibm-pi-clonevolumes.go | 14 +- .../instance/ibm-pi-cloud-connection.go | 40 +- .../clients/instance/ibm-pi-cloud-instance.go | 4 +- .../clients/instance/ibm-pi-datacenters.go | 54 + .../clients/instance/ibm-pi-dhcp.go | 6 +- .../clients/instance/ibm-pi-dr-location.go | 10 +- .../clients/instance/ibm-pi-image.go | 16 +- .../clients/instance/ibm-pi-instance.go | 40 +- .../clients/instance/ibm-pi-job.go | 4 +- .../clients/instance/ibm-pi-key.go | 6 +- .../clients/instance/ibm-pi-network.go | 22 +- .../instance/ibm-pi-placement-groups.go | 12 +- .../clients/instance/ibm-pi-sap-instance.go | 15 +- .../instance/ibm-pi-shared-processor-pool.go | 112 ++ .../clients/instance/ibm-pi-snapshot.go | 8 +- .../instance/ibm-pi-spp-placement-groups.go | 132 ++ .../instance/ibm-pi-storage-capacity.go | 8 +- .../clients/instance/ibm-pi-system-pools.go | 6 +- .../clients/instance/ibm-pi-tenant.go | 4 +- .../clients/instance/ibm-pi-volume-group.go | 16 +- .../instance/ibm-pi-volume-onboarding.go | 15 +- .../clients/instance/ibm-pi-volume.go | 20 +- .../clients/instance/ibm-pi-vpn-policy.go | 46 +- .../clients/instance/ibm-pi-vpn.go | 55 +- .../clients/instance/ibm-pi-workspaces.go | 56 + .../power-go-client/errors/errors.go | 27 +- .../power-go-client/helpers/constants.go | 82 +- .../IBM-Cloud/power-go-client/helpers/env.go | 2 +- .../power-go-client/ibmpisession/session.go | 5 + .../power-go-client/ibmpisession/utils.go | 26 +- .../authentication/authentication_client.go | 20 +- ...service_broker_auth_callback_parameters.go | 8 +- .../service_broker_auth_callback_responses.go | 338 +++- ...broker_auth_device_code_post_parameters.go | 8 +- ..._broker_auth_device_code_post_responses.go | 340 +++- ...roker_auth_device_token_post_parameters.go | 8 +- ...broker_auth_device_token_post_responses.go | 347 +++- ...rvice_broker_auth_info_token_parameters.go | 8 +- ...ervice_broker_auth_info_token_responses.go | 374 +++- ...ervice_broker_auth_info_user_parameters.go | 8 +- ...service_broker_auth_info_user_responses.go | 374 +++- .../service_broker_auth_login_parameters.go | 8 +- .../service_broker_auth_login_responses.go | 338 +++- .../service_broker_auth_logout_parameters.go | 8 +- .../service_broker_auth_logout_responses.go | 374 +++- ...r_auth_registration_callback_parameters.go | 8 +- ...er_auth_registration_callback_responses.go | 338 +++- ...ice_broker_auth_registration_parameters.go | 8 +- ...vice_broker_auth_registration_responses.go | 338 +++- ...rvice_broker_auth_token_post_parameters.go | 8 +- ...ervice_broker_auth_token_post_responses.go | 344 +++- ...bluemix_service_instance_get_parameters.go | 8 +- .../bluemix_service_instance_get_responses.go | 300 ++- ...bluemix_service_instance_put_parameters.go | 8 +- .../bluemix_service_instance_put_responses.go | 300 ++- .../bluemix_service_instances_client.go | 4 +- .../power/client/catalog/catalog_client.go | 2 +- .../client/catalog/catalog_get_parameters.go | 8 +- .../client/catalog/catalog_get_responses.go | 336 +++- .../client/datacenters/datacenters_client.go | 119 ++ .../v1_datacenters_get_parameters.go | 151 ++ .../v1_datacenters_get_responses.go | 399 ++++ .../v1_datacenters_getall_parameters.go | 128 ++ .../v1_datacenters_getall_responses.go | 399 ++++ .../hardware_platforms_client.go | 2 +- ...broker_hardwareplatforms_get_parameters.go | 8 +- ..._broker_hardwareplatforms_get_responses.go | 374 +++- .../iaas_service_broker_client.go | 8 +- .../service_broker_health_head_parameters.go | 8 +- .../service_broker_health_head_responses.go | 300 ++- .../service_broker_health_parameters.go | 8 +- .../service_broker_health_responses.go | 300 ++- .../service_broker_test_timeout_parameters.go | 8 +- .../service_broker_test_timeout_responses.go | 336 +++- .../service_broker_version_parameters.go | 8 +- .../service_broker_version_responses.go | 300 ++- .../internal_powervs_instances_client.go | 2 +- ...nal_v1_powervs_instances_get_parameters.go | 8 +- ...rnal_v1_powervs_instances_get_responses.go | 116 +- .../internal_powervs_locations_client.go | 2 +- ...locations_transitgateway_get_parameters.go | 8 +- ..._locations_transitgateway_get_responses.go | 116 +- .../internal_storage_regions_client.go | 10 +- ...ge_regions_storage_pools_get_parameters.go | 8 +- ...age_regions_storage_pools_get_responses.go | 228 ++- ...regions_storage_pools_getall_parameters.go | 8 +- ..._regions_storage_pools_getall_responses.go | 228 ++- ...ge_regions_storage_pools_put_parameters.go | 8 +- ...age_regions_storage_pools_put_responses.go | 266 ++- ...orage_regions_thresholds_get_parameters.go | 8 +- ...torage_regions_thresholds_get_responses.go | 228 ++- ...orage_regions_thresholds_put_parameters.go | 8 +- ...torage_regions_thresholds_put_responses.go | 268 ++- .../internal_transit_gateway_client.go | 2 +- ...ternal_v1_transitgateway_get_parameters.go | 8 +- ...nternal_v1_transitgateway_get_responses.go | 78 +- .../client/open_stacks/open_stacks_client.go | 10 +- ...ervice_broker_openstacks_get_parameters.go | 8 +- ...service_broker_openstacks_get_responses.go | 304 ++- ..._broker_openstacks_hosts_get_parameters.go | 8 +- ...e_broker_openstacks_hosts_get_responses.go | 154 +- ...ker_openstacks_openstack_get_parameters.go | 8 +- ...oker_openstacks_openstack_get_responses.go | 302 ++- ...rvice_broker_openstacks_post_parameters.go | 8 +- ...ervice_broker_openstacks_post_responses.go | 452 ++++- ...roker_openstacks_servers_get_parameters.go | 8 +- ...broker_openstacks_servers_get_responses.go | 302 ++- .../p_cloud_cloud_connections_client.go | 16 +- ...loud_cloudconnections_delete_parameters.go | 8 +- ...cloud_cloudconnections_delete_responses.go | 380 +++- .../pcloud_cloudconnections_get_parameters.go | 8 +- .../pcloud_cloudconnections_get_responses.go | 304 ++- ...loud_cloudconnections_getall_parameters.go | 8 +- ...cloud_cloudconnections_getall_responses.go | 340 +++- ...dconnections_networks_delete_parameters.go | 8 +- ...udconnections_networks_delete_responses.go | 380 +++- ...loudconnections_networks_put_parameters.go | 8 +- ...cloudconnections_networks_put_responses.go | 380 +++- ...pcloud_cloudconnections_post_parameters.go | 8 +- .../pcloud_cloudconnections_post_responses.go | 568 +++++- .../pcloud_cloudconnections_put_parameters.go | 8 +- .../pcloud_cloudconnections_put_responses.go | 530 ++++- ..._virtualprivateclouds_getall_parameters.go | 8 +- ...s_virtualprivateclouds_getall_responses.go | 452 ++++- .../p_cloud_disaster_recovery_client.go | 4 +- ...cations_disasterrecovery_get_parameters.go | 8 +- ...ocations_disasterrecovery_get_responses.go | 302 ++- ...ions_disasterrecovery_getall_parameters.go | 8 +- ...tions_disasterrecovery_getall_responses.go | 302 ++- .../p_cloud_events/p_cloud_events_client.go | 4 +- .../pcloud_events_get_parameters.go | 8 +- .../pcloud_events_get_responses.go | 266 ++- .../pcloud_events_getquery_parameters.go | 8 +- .../pcloud_events_getquery_responses.go | 302 ++- .../p_cloud_images/p_cloud_images_client.go | 38 +- ...cloudinstances_images_delete_parameters.go | 8 +- ..._cloudinstances_images_delete_responses.go | 340 +++- ...instances_images_export_post_parameters.go | 8 +- ...dinstances_images_export_post_responses.go | 304 ++- ...ud_cloudinstances_images_get_parameters.go | 8 +- ...oud_cloudinstances_images_get_responses.go | 266 ++- ...cloudinstances_images_getall_parameters.go | 8 +- ..._cloudinstances_images_getall_responses.go | 266 ++- ...d_cloudinstances_images_post_parameters.go | 8 +- ...ud_cloudinstances_images_post_responses.go | 416 +++- ...oudinstances_stockimages_get_parameters.go | 8 +- ...loudinstances_stockimages_get_responses.go | 266 ++- ...instances_stockimages_getall_parameters.go | 8 +- ...dinstances_stockimages_getall_responses.go | 266 ++- .../pcloud_images_get_parameters.go | 8 +- .../pcloud_images_get_responses.go | 266 ++- .../pcloud_images_getall_parameters.go | 8 +- .../pcloud_images_getall_responses.go | 266 ++- ...cloudinstances_cosimages_get_parameters.go | 8 +- ..._cloudinstances_cosimages_get_responses.go | 302 ++- ...loudinstances_cosimages_post_parameters.go | 8 +- ...cloudinstances_cosimages_post_responses.go | 342 +++- .../pcloud_v2_images_export_get_parameters.go | 8 +- .../pcloud_v2_images_export_get_responses.go | 302 ++- ...pcloud_v2_images_export_post_parameters.go | 8 +- .../pcloud_v2_images_export_post_responses.go | 342 +++- .../p_cloud_instances_client.go | 6 +- ...pcloud_cloudinstances_delete_parameters.go | 8 +- .../pcloud_cloudinstances_delete_responses.go | 340 +++- .../pcloud_cloudinstances_get_parameters.go | 8 +- .../pcloud_cloudinstances_get_responses.go | 266 ++- .../pcloud_cloudinstances_put_parameters.go | 8 +- .../pcloud_cloudinstances_put_responses.go | 340 +++- .../p_cloud_jobs/p_cloud_jobs_client.go | 6 +- ...d_cloudinstances_jobs_delete_parameters.go | 8 +- ...ud_cloudinstances_jobs_delete_responses.go | 304 ++- ...loud_cloudinstances_jobs_get_parameters.go | 8 +- ...cloud_cloudinstances_jobs_get_responses.go | 266 ++- ...d_cloudinstances_jobs_getall_parameters.go | 8 +- ...ud_cloudinstances_jobs_getall_responses.go | 266 ++- .../p_cloud_networks_client.go | 20 +- .../pcloud_networks_delete_parameters.go | 8 +- .../pcloud_networks_delete_responses.go | 304 ++- .../pcloud_networks_get_parameters.go | 8 +- .../pcloud_networks_get_responses.go | 266 ++- .../pcloud_networks_getall_parameters.go | 8 +- .../pcloud_networks_getall_responses.go | 302 ++- ...pcloud_networks_ports_delete_parameters.go | 8 +- .../pcloud_networks_ports_delete_responses.go | 340 +++- .../pcloud_networks_ports_get_parameters.go | 8 +- .../pcloud_networks_ports_get_responses.go | 302 ++- ...pcloud_networks_ports_getall_parameters.go | 8 +- .../pcloud_networks_ports_getall_responses.go | 302 ++- .../pcloud_networks_ports_post_parameters.go | 8 +- .../pcloud_networks_ports_post_responses.go | 378 +++- .../pcloud_networks_ports_put_parameters.go | 8 +- .../pcloud_networks_ports_put_responses.go | 340 +++- .../pcloud_networks_post_parameters.go | 8 +- .../pcloud_networks_post_responses.go | 490 ++++- .../pcloud_networks_put_parameters.go | 8 +- .../pcloud_networks_put_responses.go | 304 ++- .../p_cloudp_vm_instances_client.go | 87 +- ...oud_pvminstances_action_post_parameters.go | 8 +- ...loud_pvminstances_action_post_responses.go | 304 ++- ...ud_pvminstances_capture_post_parameters.go | 8 +- ...oud_pvminstances_capture_post_responses.go | 378 +++- ...loud_pvminstances_clone_post_parameters.go | 8 +- ...cloud_pvminstances_clone_post_responses.go | 378 +++- ...oud_pvminstances_console_get_parameters.go | 8 +- ...loud_pvminstances_console_get_responses.go | 302 ++- ...ud_pvminstances_console_post_parameters.go | 8 +- ...oud_pvminstances_console_post_responses.go | 376 +++- ...oud_pvminstances_console_put_parameters.go | 8 +- ...loud_pvminstances_console_put_responses.go | 302 ++- .../pcloud_pvminstances_delete_parameters.go | 8 +- .../pcloud_pvminstances_delete_responses.go | 304 ++- .../pcloud_pvminstances_get_parameters.go | 8 +- .../pcloud_pvminstances_get_responses.go | 266 ++- .../pcloud_pvminstances_getall_parameters.go | 8 +- .../pcloud_pvminstances_getall_responses.go | 376 +++- ...pvminstances_networks_delete_parameters.go | 8 +- ..._pvminstances_networks_delete_responses.go | 304 ++- ...ud_pvminstances_networks_get_parameters.go | 8 +- ...oud_pvminstances_networks_get_responses.go | 302 ++- ...pvminstances_networks_getall_parameters.go | 8 +- ..._pvminstances_networks_getall_responses.go | 302 ++- ...d_pvminstances_networks_post_parameters.go | 8 +- ...ud_pvminstances_networks_post_responses.go | 378 +++- ...pvminstances_operations_post_parameters.go | 8 +- ..._pvminstances_operations_post_responses.go | 304 ++- .../pcloud_pvminstances_post_parameters.go | 8 +- .../pcloud_pvminstances_post_responses.go | 420 +++- .../pcloud_pvminstances_put_parameters.go | 8 +- .../pcloud_pvminstances_put_responses.go | 340 +++- ...vminstances_snapshots_getall_parameters.go | 8 +- ...pvminstances_snapshots_getall_responses.go | 266 ++- ..._pvminstances_snapshots_post_parameters.go | 8 +- ...d_pvminstances_snapshots_post_responses.go | 378 +++- ...ances_snapshots_restore_post_parameters.go | 8 +- ...tances_snapshots_restore_post_responses.go | 340 +++- ..._v2_pvminstances_capture_get_parameters.go | 8 +- ...d_v2_pvminstances_capture_get_responses.go | 302 ++- ...v2_pvminstances_capture_post_parameters.go | 8 +- ..._v2_pvminstances_capture_post_responses.go | 344 +++- ...cloud_v2_pvminstances_getall_parameters.go | 151 ++ ...pcloud_v2_pvminstances_getall_responses.go | 547 ++++++ .../p_cloud_placement_groups_client.go | 12 +- ...cloud_placementgroups_delete_parameters.go | 8 +- ...pcloud_placementgroups_delete_responses.go | 302 ++- .../pcloud_placementgroups_get_parameters.go | 8 +- .../pcloud_placementgroups_get_responses.go | 302 ++- ...cloud_placementgroups_getall_parameters.go | 8 +- ...pcloud_placementgroups_getall_responses.go | 302 ++- ...acementgroups_members_delete_parameters.go | 8 +- ...lacementgroups_members_delete_responses.go | 378 +++- ...placementgroups_members_post_parameters.go | 8 +- ..._placementgroups_members_post_responses.go | 378 +++- .../pcloud_placementgroups_post_parameters.go | 8 +- .../pcloud_placementgroups_post_responses.go | 414 +++- .../p_cloud_pod_capacity_client.go | 80 + .../pcloud_podcapacity_get_parameters.go | 151 ++ .../pcloud_podcapacity_get_responses.go | 473 +++++ .../client/p_cloud_s_a_p/p_cloudsap_client.go | 6 +- .../pcloud_sap_get_parameters.go | 8 +- .../p_cloud_s_a_p/pcloud_sap_get_responses.go | 266 ++- .../pcloud_sap_getall_parameters.go | 8 +- .../pcloud_sap_getall_responses.go | 302 ++- .../pcloud_sap_post_parameters.go | 8 +- .../pcloud_sap_post_responses.go | 454 ++++- .../p_cloudspp_placement_groups_client.go | 12 +- ...ud_sppplacementgroups_delete_parameters.go | 8 +- ...oud_sppplacementgroups_delete_responses.go | 268 ++- ...cloud_sppplacementgroups_get_parameters.go | 8 +- ...pcloud_sppplacementgroups_get_responses.go | 266 ++- ...ud_sppplacementgroups_getall_parameters.go | 8 +- ...oud_sppplacementgroups_getall_responses.go | 230 ++- ...acementgroups_members_delete_parameters.go | 8 +- ...lacementgroups_members_delete_responses.go | 268 ++- ...placementgroups_members_post_parameters.go | 8 +- ...pplacementgroups_members_post_responses.go | 306 ++- ...loud_sppplacementgroups_post_parameters.go | 8 +- ...cloud_sppplacementgroups_post_responses.go | 342 +++- .../p_cloud_servicedhcp_client.go | 8 +- .../pcloud_dhcp_delete_parameters.go | 8 +- .../pcloud_dhcp_delete_responses.go | 192 +- .../pcloud_dhcp_get_parameters.go | 8 +- .../pcloud_dhcp_get_responses.go | 266 ++- .../pcloud_dhcp_getall_parameters.go | 8 +- .../pcloud_dhcp_getall_responses.go | 338 +++- .../pcloud_dhcp_post_parameters.go | 8 +- .../pcloud_dhcp_post_responses.go | 302 ++- .../p_cloud_shared_processor_pools_client.go | 10 +- ..._sharedprocessorpools_delete_parameters.go | 8 +- ...d_sharedprocessorpools_delete_responses.go | 268 ++- ...oud_sharedprocessorpools_get_parameters.go | 8 +- ...loud_sharedprocessorpools_get_responses.go | 266 ++- ..._sharedprocessorpools_getall_parameters.go | 8 +- ...d_sharedprocessorpools_getall_responses.go | 230 ++- ...ud_sharedprocessorpools_post_parameters.go | 8 +- ...oud_sharedprocessorpools_post_responses.go | 342 +++- ...oud_sharedprocessorpools_put_parameters.go | 8 +- ...loud_sharedprocessorpools_put_responses.go | 230 ++- .../p_cloud_snapshots_client.go | 8 +- ...udinstances_snapshots_delete_parameters.go | 8 +- ...oudinstances_snapshots_delete_responses.go | 304 ++- ...cloudinstances_snapshots_get_parameters.go | 8 +- ..._cloudinstances_snapshots_get_responses.go | 266 ++- ...udinstances_snapshots_getall_parameters.go | 8 +- ...oudinstances_snapshots_getall_responses.go | 302 ++- ...cloudinstances_snapshots_put_parameters.go | 8 +- ..._cloudinstances_snapshots_put_responses.go | 266 ++- .../p_cloud_storage_capacity_client.go | 8 +- ...ud_storagecapacity_pools_get_parameters.go | 8 +- ...oud_storagecapacity_pools_get_responses.go | 302 ++- ...storagecapacity_pools_getall_parameters.go | 8 +- ..._storagecapacity_pools_getall_responses.go | 338 +++- ...ud_storagecapacity_types_get_parameters.go | 8 +- ...oud_storagecapacity_types_get_responses.go | 302 ++- ...storagecapacity_types_getall_parameters.go | 8 +- ..._storagecapacity_types_getall_responses.go | 338 +++- .../p_cloud_storage_tiers_client.go | 80 + ...nstances_storagetiers_getall_parameters.go | 151 ++ ...instances_storagetiers_getall_responses.go | 471 +++++ .../p_cloud_system_pools_client.go | 2 +- .../pcloud_systempools_get_parameters.go | 8 +- .../pcloud_systempools_get_responses.go | 338 +++- .../p_cloud_tasks/p_cloud_tasks_client.go | 4 +- .../pcloud_tasks_delete_parameters.go | 8 +- .../pcloud_tasks_delete_responses.go | 304 ++- .../pcloud_tasks_get_parameters.go | 8 +- .../pcloud_tasks_get_responses.go | 266 ++- .../p_cloud_tenants/p_cloud_tenants_client.go | 4 +- .../pcloud_tenants_get_parameters.go | 8 +- .../pcloud_tenants_get_responses.go | 230 ++- .../pcloud_tenants_put_parameters.go | 8 +- .../pcloud_tenants_put_responses.go | 340 +++- .../p_cloud_tenants_ssh_keys_client.go | 10 +- ...cloud_tenants_sshkeys_delete_parameters.go | 8 +- ...pcloud_tenants_sshkeys_delete_responses.go | 340 +++- .../pcloud_tenants_sshkeys_get_parameters.go | 8 +- .../pcloud_tenants_sshkeys_get_responses.go | 266 ++- ...cloud_tenants_sshkeys_getall_parameters.go | 8 +- ...pcloud_tenants_sshkeys_getall_responses.go | 266 ++- .../pcloud_tenants_sshkeys_post_parameters.go | 8 +- .../pcloud_tenants_sshkeys_post_responses.go | 416 +++- .../pcloud_tenants_sshkeys_put_parameters.go | 8 +- .../pcloud_tenants_sshkeys_put_responses.go | 340 +++- .../p_cloudvpn_connections_client.go | 44 +- ...pcloud_vpnconnections_delete_parameters.go | 8 +- .../pcloud_vpnconnections_delete_responses.go | 230 ++- .../pcloud_vpnconnections_get_parameters.go | 8 +- .../pcloud_vpnconnections_get_responses.go | 268 ++- ...pcloud_vpnconnections_getall_parameters.go | 8 +- .../pcloud_vpnconnections_getall_responses.go | 230 ++- ...nconnections_networks_delete_parameters.go | 8 +- ...pnconnections_networks_delete_responses.go | 268 ++- ..._vpnconnections_networks_get_parameters.go | 8 +- ...d_vpnconnections_networks_get_responses.go | 230 ++- ..._vpnconnections_networks_put_parameters.go | 8 +- ...d_vpnconnections_networks_put_responses.go | 268 ++- ...nnections_peersubnets_delete_parameters.go | 8 +- ...onnections_peersubnets_delete_responses.go | 304 ++- ...nconnections_peersubnets_get_parameters.go | 8 +- ...pnconnections_peersubnets_get_responses.go | 230 ++- ...nconnections_peersubnets_put_parameters.go | 8 +- ...pnconnections_peersubnets_put_responses.go | 304 ++- .../pcloud_vpnconnections_post_parameters.go | 8 +- .../pcloud_vpnconnections_post_responses.go | 342 +++- .../pcloud_vpnconnections_put_parameters.go | 8 +- .../pcloud_vpnconnections_put_responses.go | 268 ++- .../p_cloudvpn_policies_client.go | 40 +- .../pcloud_ikepolicies_delete_parameters.go | 8 +- .../pcloud_ikepolicies_delete_responses.go | 230 ++- .../pcloud_ikepolicies_get_parameters.go | 8 +- .../pcloud_ikepolicies_get_responses.go | 268 ++- .../pcloud_ikepolicies_getall_parameters.go | 8 +- .../pcloud_ikepolicies_getall_responses.go | 230 ++- .../pcloud_ikepolicies_post_parameters.go | 8 +- .../pcloud_ikepolicies_post_responses.go | 268 ++- .../pcloud_ikepolicies_put_parameters.go | 8 +- .../pcloud_ikepolicies_put_responses.go | 304 ++- .../pcloud_ipsecpolicies_delete_parameters.go | 8 +- .../pcloud_ipsecpolicies_delete_responses.go | 230 ++- .../pcloud_ipsecpolicies_get_parameters.go | 8 +- .../pcloud_ipsecpolicies_get_responses.go | 268 ++- .../pcloud_ipsecpolicies_getall_parameters.go | 8 +- .../pcloud_ipsecpolicies_getall_responses.go | 230 ++- .../pcloud_ipsecpolicies_post_parameters.go | 8 +- .../pcloud_ipsecpolicies_post_responses.go | 342 +++- .../pcloud_ipsecpolicies_put_parameters.go | 8 +- .../pcloud_ipsecpolicies_put_responses.go | 342 +++- .../p_cloud_volume_groups_client.go | 20 +- ...oud_volumegroups_action_post_parameters.go | 8 +- ...loud_volumegroups_action_post_responses.go | 340 +++- .../pcloud_volumegroups_delete_parameters.go | 8 +- .../pcloud_volumegroups_delete_responses.go | 266 ++- ...oud_volumegroups_get_details_parameters.go | 8 +- ...loud_volumegroups_get_details_responses.go | 302 ++- .../pcloud_volumegroups_get_parameters.go | 8 +- .../pcloud_volumegroups_get_responses.go | 302 ++- ..._volumegroups_getall_details_parameters.go | 8 +- ...d_volumegroups_getall_details_responses.go | 302 ++- .../pcloud_volumegroups_getall_parameters.go | 8 +- .../pcloud_volumegroups_getall_responses.go | 302 ++- .../pcloud_volumegroups_post_parameters.go | 8 +- .../pcloud_volumegroups_post_responses.go | 454 ++++- .../pcloud_volumegroups_put_parameters.go | 8 +- .../pcloud_volumegroups_put_responses.go | 342 +++- ...emote_copy_relationships_get_parameters.go | 8 +- ...remote_copy_relationships_get_responses.go | 304 ++- ...megroups_storage_details_get_parameters.go | 8 +- ...umegroups_storage_details_get_responses.go | 304 ++- .../p_cloud_volume_onboarding_client.go | 6 +- ...pcloud_volume_onboarding_get_parameters.go | 8 +- .../pcloud_volume_onboarding_get_responses.go | 266 ++- ...oud_volume_onboarding_getall_parameters.go | 8 +- ...loud_volume_onboarding_getall_responses.go | 266 ++- ...cloud_volume_onboarding_post_parameters.go | 8 +- ...pcloud_volume_onboarding_post_responses.go | 304 ++- .../p_cloud_volumes/p_cloud_volumes_client.go | 56 +- ...nstances_volumes_action_post_parameters.go | 8 +- ...instances_volumes_action_post_responses.go | 268 ++- ...loudinstances_volumes_delete_parameters.go | 8 +- ...cloudinstances_volumes_delete_responses.go | 304 ++- ...umes_flash_copy_mappings_get_parameters.go | 8 +- ...lumes_flash_copy_mappings_get_responses.go | 268 ++- ...d_cloudinstances_volumes_get_parameters.go | 8 +- ...ud_cloudinstances_volumes_get_responses.go | 266 ++- ...loudinstances_volumes_getall_parameters.go | 8 +- ...cloudinstances_volumes_getall_responses.go | 266 ++- ..._cloudinstances_volumes_post_parameters.go | 8 +- ...d_cloudinstances_volumes_post_responses.go | 342 +++- ...d_cloudinstances_volumes_put_parameters.go | 8 +- ...ud_cloudinstances_volumes_put_responses.go | 378 +++- ...remote_copy_relationship_get_parameters.go | 8 +- ..._remote_copy_relationship_get_responses.go | 268 ++- ..._pvminstances_volumes_delete_parameters.go | 8 +- ...d_pvminstances_volumes_delete_responses.go | 268 ++- ...oud_pvminstances_volumes_get_parameters.go | 8 +- ...loud_pvminstances_volumes_get_responses.go | 266 ++- ..._pvminstances_volumes_getall_parameters.go | 8 +- ...d_pvminstances_volumes_getall_responses.go | 266 ++- ...ud_pvminstances_volumes_post_parameters.go | 8 +- ...oud_pvminstances_volumes_post_responses.go | 268 ++- ...oud_pvminstances_volumes_put_parameters.go | 8 +- ...loud_pvminstances_volumes_put_responses.go | 338 +++- ...nstances_volumes_setboot_put_parameters.go | 8 +- ...instances_volumes_setboot_put_responses.go | 266 ++- ...v2_pvminstances_volumes_post_parameters.go | 8 +- ..._v2_pvminstances_volumes_post_responses.go | 304 ++- ...pcloud_v2_volumes_clone_post_parameters.go | 8 +- .../pcloud_v2_volumes_clone_post_responses.go | 230 ++- ...ud_v2_volumes_clonetasks_get_parameters.go | 8 +- ...oud_v2_volumes_clonetasks_get_responses.go | 304 ++- .../pcloud_v2_volumes_post_parameters.go | 8 +- .../pcloud_v2_volumes_post_responses.go | 342 +++- ..._v2_volumesclone_cancel_post_parameters.go | 8 +- ...d_v2_volumesclone_cancel_post_responses.go | 266 ++- ...cloud_v2_volumesclone_delete_parameters.go | 8 +- ...pcloud_v2_volumesclone_delete_responses.go | 230 ++- ...v2_volumesclone_execute_post_parameters.go | 8 +- ..._v2_volumesclone_execute_post_responses.go | 230 ++- .../pcloud_v2_volumesclone_get_parameters.go | 8 +- .../pcloud_v2_volumesclone_get_responses.go | 266 ++- ...cloud_v2_volumesclone_getall_parameters.go | 8 +- ...pcloud_v2_volumesclone_getall_responses.go | 266 ++- .../pcloud_v2_volumesclone_post_parameters.go | 8 +- .../pcloud_v2_volumesclone_post_responses.go | 230 ++- ...d_v2_volumesclone_start_post_parameters.go | 8 +- ...ud_v2_volumesclone_start_post_responses.go | 266 ++- .../pcloud_volumes_clone_post_parameters.go | 8 +- .../pcloud_volumes_clone_post_responses.go | 304 ++- .../power/client/power_iaas_api_client.go | 20 + .../service_binding_binding_parameters.go | 8 +- .../service_binding_binding_responses.go | 452 ++++- .../service_binding_get_parameters.go | 8 +- .../service_binding_get_responses.go | 300 ++- ...e_binding_last_operation_get_parameters.go | 8 +- ...ce_binding_last_operation_get_responses.go | 338 +++- .../service_binding_unbinding_parameters.go | 8 +- .../service_binding_unbinding_responses.go | 376 +++- .../service_bindings_client.go | 8 +- ...service_instance_deprovision_parameters.go | 8 +- .../service_instance_deprovision_responses.go | 378 +++- .../service_instance_get_parameters.go | 8 +- .../service_instance_get_responses.go | 300 ++- ..._instance_last_operation_get_parameters.go | 8 +- ...e_instance_last_operation_get_responses.go | 338 +++- .../service_instance_provision_parameters.go | 8 +- .../service_instance_provision_responses.go | 452 ++++- .../service_instance_update_parameters.go | 8 +- .../service_instance_update_responses.go | 376 +++- .../service_instances_client.go | 10 +- ...vice_broker_storagetypes_get_parameters.go | 8 +- ...rvice_broker_storagetypes_get_responses.go | 448 ++++- .../storage_types/storage_types_client.go | 6 +- .../service_broker_swaggerspec_parameters.go | 8 +- .../service_broker_swaggerspec_responses.go | 336 +++- .../swagger_spec/swagger_spec_client.go | 2 +- .../v1_workspaces_get_parameters.go | 151 ++ .../workspaces/v1_workspaces_get_responses.go | 547 ++++++ .../v1_workspaces_getall_parameters.go | 128 ++ .../v1_workspaces_getall_responses.go | 399 ++++ .../client/workspaces/workspaces_client.go | 121 ++ .../power/models/access_config.go | 92 + .../power/models/access_role.go | 1 + .../auxiliary_volumes_for_onboarding.go | 5 + .../power-go-client/power/models/catalog.go | 5 + .../power/models/clone_task_status.go | 5 + .../power/models/cloned_volume_detail.go | 2 + .../power/models/cloud_connection.go | 15 + .../power/models/cloud_connection_create.go | 10 + .../cloud_connection_create_response.go | 5 + .../cloud_connection_endpoint_classic.go | 5 + ...loud_connection_endpoint_classic_update.go | 5 + .../models/cloud_connection_endpoint_v_p_c.go | 5 + .../power/models/cloud_connection_update.go | 10 + ...cloud_connection_virtual_private_clouds.go | 5 + .../power/models/cloud_connections.go | 5 + .../power/models/cloud_initialization.go | 102 + .../power/models/cloud_instance.go | 7 + .../power/models/cloud_instance_reference.go | 1 + .../power/models/console_languages.go | 5 + .../models/create_cos_image_import_job.go | 7 +- .../power/models/create_image.go | 7 + .../power/models/d_h_c_p_server.go | 1 + .../power/models/d_h_c_p_server_detail.go | 6 + .../power/models/d_h_c_p_servers.go | 5 + .../power/models/datacenter.go | 236 +++ .../power/models/datacenter_location.go | 105 + .../power/models/datacenters.go | 124 ++ .../models/disaster_recovery_locations.go | 5 + .../power-go-client/power/models/event.go | 5 + .../power-go-client/power/models/events.go | 5 + .../power/models/flash_copy_mappings.go | 5 + .../power/models/hardware_platform.go | 5 + .../power-go-client/power/models/host_info.go | 7 + .../power/models/host_p_vm_instance.go | 1 + .../power/models/i_k_e_policies.go | 5 + .../power/models/i_k_e_policy.go | 2 + .../power/models/i_k_e_policy_create.go | 5 + .../power/models/i_k_e_policy_template.go | 1 + .../power/models/i_k_e_policy_update.go | 8 + .../power-go-client/power/models/image.go | 15 + .../power/models/image_reference.go | 1 + .../power-go-client/power/models/images.go | 5 + .../power/models/ip_sec_policies.go | 5 + .../power/models/ip_sec_policy.go | 2 + .../power/models/ip_sec_policy_create.go | 5 + .../power/models/ip_sec_policy_template.go | 1 + .../power/models/ip_sec_policy_update.go | 8 + .../power-go-client/power/models/job.go | 2 + .../power-go-client/power/models/jobs.go | 5 + .../power-go-client/power/models/network.go | 94 +- .../power/models/network_create.go | 105 +- .../power/models/network_port.go | 5 + .../power/models/network_ports.go | 5 + .../power/models/network_reference.go | 85 +- .../power/models/network_update.go | 23 + .../power-go-client/power/models/networks.go | 5 + .../power/models/open_stack_info.go | 5 + .../power/models/open_stacks.go | 5 + .../power-go-client/power/models/options.go | 1 + .../power/models/owner_info.go | 5 + .../power/models/p_vm_instance.go | 47 +- .../power/models/p_vm_instance_clone.go | 10 + .../models/p_vm_instance_configuration.go | 285 +++ .../power/models/p_vm_instance_cores.go | 77 + .../power/models/p_vm_instance_create.go | 26 +- .../power/models/p_vm_instance_list.go | 5 + .../power/models/p_vm_instance_memory.go | 77 + .../power/models/p_vm_instance_networks.go | 5 + .../models/p_vm_instance_operating_system.go | 74 + .../power/models/p_vm_instance_operation.go | 1 + .../power/models/p_vm_instance_reference.go | 45 + .../models/p_vm_instance_reference_v2.go | 663 +++++++ .../power/models/p_vm_instance_update.go | 65 + .../models/p_vm_instance_update_response.go | 4 + .../power/models/p_vm_instance_v2_health.go | 71 + .../models/p_vm_instance_v2_network_port.go | 164 ++ .../models/p_vm_instance_virtual_cores.go | 82 + .../power/models/p_vm_instances.go | 5 + .../power/models/p_vm_instances_v2.go | 124 ++ .../power/models/placement_groups.go | 5 + .../power-go-client/power/models/plan.go | 5 + .../power/models/pod_capacity.go | 205 ++ .../power-go-client/power/models/pod_data.go | 173 ++ .../power/models/power_v_s_instances.go | 5 + .../power/models/pvm_instance_deployment.go | 119 ++ .../power/models/pvm_instance_host.go | 50 + .../models/pvm_instance_placement_group.go | 71 + .../power/models/region_storage_tiers.go | 78 + .../power/models/region_storage_types.go | 5 + .../power/models/replication_sites.go | 5 + .../power/models/s_a_p_create.go | 22 +- .../power/models/s_a_p_profiles.go | 5 + .../power/models/s_p_p_placement_groups.go | 5 + .../power/models/schemas_object.go | 10 + .../power-go-client/power/models/service.go | 10 + .../models/service_authentication_info.go | 5 + .../power/models/service_binding.go | 5 + .../power/models/service_binding_request.go | 5 + .../power/models/service_binding_resource.go | 5 + .../models/service_binding_schema_object.go | 5 + .../models/service_binding_volume_mount.go | 1 + .../models/service_instance_schema_object.go | 10 + .../models/service_instance_update_request.go | 5 + .../power/models/shared_processor_pool.go | 5 + .../models/shared_processor_pool_detail.go | 6 + .../power/models/shared_processor_pools.go | 5 + .../power-go-client/power/models/snapshots.go | 5 + .../power-go-client/power/models/ssh_keys.go | 5 + .../power/models/status_description.go | 5 + .../power/models/stock_images.go | 5 + .../power/models/storage_controller.go | 185 ++ .../power/models/storage_controllers.go | 67 + .../power/models/storage_pool.go | 5 + .../power/models/storage_pool_capacity.go | 9 + .../power/models/storage_pool_combined.go | 105 + .../power/models/storage_pools.go | 5 + .../power/models/storage_pools_capacity.go | 10 + .../power/models/storage_tier.go | 111 ++ .../power/models/storage_tiers.go | 69 + .../power/models/storage_type_capacity.go | 10 + .../power/models/storage_types_capacity.go | 10 + .../power-go-client/power/models/system.go | 42 +- .../power/models/system_pool.go | 30 + .../power/models/system_pool_capacity.go | 190 ++ .../power/models/system_pools_capacity.go | 67 + .../power/models/target_object.go | 88 + .../power-go-client/power/models/tenant.go | 15 + .../power/models/tenant_update.go | 5 + .../power/models/thresholds.go | 25 + .../power/models/token_extra.go | 1 + .../power/models/transit_connection_error.go | 77 - .../models/transit_connection_error_item.go | 144 ++ .../power/models/transit_gateway_instance.go | 67 +- .../power/models/transit_gateway_locations.go | 5 + .../power/models/update_storage_pool.go | 5 + .../power/models/user_authentication_info.go | 9 + .../power/models/v_p_n_connection.go | 4 + .../power/models/v_p_n_connection_create.go | 1 + .../v_p_n_connection_create_response.go | 5 + .../power/models/v_p_n_connection_update.go | 4 + .../power/models/v_p_n_connections.go | 5 + .../power/models/v_p_naa_s_options.go | 5 + .../power-go-client/power/models/volume.go | 8 +- .../power/models/volume_action.go | 26 +- .../power/models/volume_group.go | 5 + .../power/models/volume_group_action.go | 15 + .../power/models/volume_group_details.go | 5 + .../volume_group_remote_copy_relationships.go | 5 + .../power/models/volume_groups.go | 5 + .../power/models/volume_groups_details.go | 5 + .../power/models/volume_onboarding.go | 10 + .../power/models/volume_onboarding_create.go | 5 + .../power/models/volume_onboardings.go | 5 + .../power/models/volume_reference.go | 8 +- .../power-go-client/power/models/volumes.go | 5 + .../models/volumes_clone_async_request.go | 9 + .../power/models/volumes_clone_detail.go | 5 + .../power/models/volumes_clone_execute.go | 9 + .../power/models/volumes_clones.go | 5 + .../power-go-client/power/models/workspace.go | 316 +++ .../power/models/workspace_details.go | 96 + .../power/models/workspace_location.go | 77 + .../power/models/workspaces.go | 124 ++ .../IBM/go-sdk-core/v5/core/constants.go | 2 +- .../v5/core/container_authenticator.go | 42 +- .../IBM/go-sdk-core/v5/core/utils.go | 80 +- .../IBM/go-sdk-core/v5/core/version.go | 2 +- .../go-openapi/analysis/.golangci.yml | 3 + vendor/github.com/go-openapi/errors/api.go | 2 +- .../go-openapi/runtime/client/auth_info.go | 4 +- .../go-openapi/runtime/client/keepalive.go | 3 +- .../runtime/client/opentelemetry.go | 207 ++ .../go-openapi/runtime/client/request.go | 27 +- .../go-openapi/runtime/client/response.go | 2 + .../go-openapi/runtime/client/runtime.go | 74 +- .../go-openapi/runtime/client_request.go | 3 +- .../go-openapi/runtime/client_response.go | 18 +- .../go-openapi/runtime/constants.go | 2 + vendor/github.com/go-openapi/runtime/file.go | 18 +- .../go-openapi/runtime/middleware/context.go | 15 +- .../runtime/middleware/parameter.go | 6 +- .../runtime/middleware/swaggerui.go | 10 +- .../runtime/middleware/swaggerui_oauth2.go | 122 ++ .../runtime/security/authenticator.go | 4 +- vendor/github.com/go-openapi/strfmt/bson.go | 2 +- vendor/github.com/go-openapi/strfmt/time.go | 14 +- vendor/github.com/go-openapi/swag/util.go | 16 +- .../github.com/go-openapi/validate/values.go | 8 +- .../otel/semconv/internal/http.go | 338 ++++ .../otel/semconv/v1.12.0/doc.go | 20 + .../otel/semconv/v1.12.0/exception.go | 20 + .../otel/semconv/v1.12.0/http.go | 114 ++ .../otel/semconv/v1.12.0/resource.go | 1042 ++++++++++ .../otel/semconv/v1.12.0/schema.go | 20 + .../otel/semconv/v1.12.0/trace.go | 1704 +++++++++++++++++ vendor/modules.txt | 34 +- 697 files changed, 78612 insertions(+), 2624 deletions(-) create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-datacenters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-shared-processor-pool.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-spp-placement-groups.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-workspaces.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/datacenters_client.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_parameters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_responses.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/workspaces_client.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/access_config.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_initialization.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter_location.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenters.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_configuration.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_cores.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_memory.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operating_system.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference_v2.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_health.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_network_port.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_virtual_cores.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances_v2.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_capacity.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_data.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_deployment.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_host.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_placement_group.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_tiers.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controller.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controllers.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool_combined.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tier.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tiers.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool_capacity.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools_capacity.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/target_object.go delete mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error_item.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_details.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_location.go create mode 100644 vendor/github.com/IBM-Cloud/power-go-client/power/models/workspaces.go create mode 100644 vendor/github.com/go-openapi/runtime/client/opentelemetry.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/internal/http.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.12.0/doc.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.12.0/exception.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.12.0/http.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.12.0/resource.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.12.0/schema.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.12.0/trace.go diff --git a/go.mod b/go.mod index 362d7ed0a75..3e025d3ddc5 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,8 @@ require ( github.com/Azure/go-autorest/autorest v0.11.29 github.com/Azure/go-autorest/autorest/to v0.4.0 github.com/IBM-Cloud/bluemix-go v0.0.0-20211102075456-ffc4e11dfb16 - github.com/IBM-Cloud/power-go-client v1.2.0 - github.com/IBM/go-sdk-core/v5 v5.13.2 + github.com/IBM-Cloud/power-go-client v1.5.3 + github.com/IBM/go-sdk-core/v5 v5.14.1 github.com/IBM/networking-go-sdk v0.42.2 github.com/IBM/platform-services-go-sdk v0.42.0 github.com/IBM/vpc-go-sdk v0.20.0 @@ -32,9 +32,9 @@ require ( github.com/daixiang0/gci v0.9.0 github.com/diskfs/go-diskfs v1.4.0 github.com/form3tech-oss/jwt-go v3.2.3+incompatible - github.com/go-openapi/errors v0.20.3 - github.com/go-openapi/strfmt v0.21.5 - github.com/go-openapi/swag v0.22.3 + github.com/go-openapi/errors v0.20.4 + github.com/go-openapi/strfmt v0.21.7 + github.com/go-openapi/swag v0.22.4 github.com/go-playground/validator/v10 v10.13.0 github.com/golang-jwt/jwt v3.2.2+incompatible github.com/golang/mock v1.7.0-rc.1 @@ -151,13 +151,13 @@ require ( github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.2.4 // indirect - github.com/go-openapi/analysis v0.21.2 // indirect + github.com/go-openapi/analysis v0.21.4 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/loads v0.21.1 // indirect - github.com/go-openapi/runtime v0.23.0 // indirect - github.com/go-openapi/spec v0.20.7 // indirect - github.com/go-openapi/validate v0.22.0 // indirect + github.com/go-openapi/loads v0.21.2 // indirect + github.com/go-openapi/runtime v0.26.0 // indirect + github.com/go-openapi/spec v0.20.8 // indirect + github.com/go-openapi/validate v0.22.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/gobuffalo/flect v1.0.2 // indirect diff --git a/go.sum b/go.sum index 9cd0db35c37..23d20556511 100644 --- a/go.sum +++ b/go.sum @@ -67,11 +67,11 @@ github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/IBM-Cloud/bluemix-go v0.0.0-20211102075456-ffc4e11dfb16 h1:kSfKKawp3hYDcjV+d+qcadWfFsCNHDCgklOUnVMle+I= github.com/IBM-Cloud/bluemix-go v0.0.0-20211102075456-ffc4e11dfb16/go.mod h1:q0fXFSbum/16D8Mgn1ROSfSyX4BmvBCm/hHdcXz0wCU= -github.com/IBM-Cloud/power-go-client v1.2.0 h1:0A3sSOC0d/P4IUAj4YGthA0g4liMaJpWvyBx50Z6/Ck= -github.com/IBM-Cloud/power-go-client v1.2.0/go.mod h1:Qfx0fNi+9hms+xu9Z6Euhu9088ByW6C/TCMLECTRWNE= +github.com/IBM-Cloud/power-go-client v1.5.3 h1:qfI15aH+WMm0np5YZBId7i6yUOaPhMwcXu6xzfNAL/Y= +github.com/IBM-Cloud/power-go-client v1.5.3/go.mod h1:Vd8aSxWA30soUhE2U+tmzaYDUVNOmQE3/npny7BsN6Y= github.com/IBM/go-sdk-core/v5 v5.9.5/go.mod h1:YlOwV9LeuclmT/qi/LAK2AsobbAP42veV0j68/rlZsE= -github.com/IBM/go-sdk-core/v5 v5.13.2 h1:C/JWnEadKzonoHFZdMX8DaSxGVqKRFhcpDXFS5bPDiA= -github.com/IBM/go-sdk-core/v5 v5.13.2/go.mod h1:gKRSB+YyKsGlRQW7v5frlLbue5afulSvrRa4O26o4MM= +github.com/IBM/go-sdk-core/v5 v5.14.1 h1:WR1r0zz+gDW++xzZjF41r9ueY4JyjS2vgZjiYs8lO3c= +github.com/IBM/go-sdk-core/v5 v5.14.1/go.mod h1:MUvIr/1mgGh198ZXL+ByKz9Qs1JoEh80v/96x8jPXNY= github.com/IBM/networking-go-sdk v0.42.2 h1:caqjx4jyFHi10Vlf3skHvlL6K3YJRVstsmCBmvdyqkA= github.com/IBM/networking-go-sdk v0.42.2/go.mod h1:lTUZwtUkMANMnrLHFIgRhHrkBfwASY/Iho1fabaPHxo= github.com/IBM/platform-services-go-sdk v0.42.0 h1:2it30wdvjDRqN8Yc/vqUJpJPVIeTNXpkIOSjwG+P/xc= @@ -146,8 +146,6 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= @@ -396,26 +394,18 @@ github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70t github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= -github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= -github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= -github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= -github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= +github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= +github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= -github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= +github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= +github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= @@ -439,77 +429,50 @@ github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= -github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= -github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= -github.com/go-openapi/loads v0.21.0/go.mod h1:rHYve9nZrQ4CJhyeIIFJINGCg1tQpx2yJrrNo8sf1ws= -github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= +github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= +github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= -github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= -github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= -github.com/go-openapi/runtime v0.23.0 h1:HX6ET2sHCIvaKeDDQoU01CtO1ekg5EkekHSkLTtWXH0= -github.com/go-openapi/runtime v0.23.0/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs= +github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= +github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= -github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI= -github.com/go-openapi/spec v0.20.7/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= +github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.2/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.5 h1:Z/algjpXIZpbvdN+6KbVTkpO75RuedMrqpn1GN529h4= -github.com/go-openapi/strfmt v0.21.5/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= +github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= +github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= +github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= -github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= -github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= -github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= -github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= -github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4= -github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= -github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= +github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -820,7 +783,6 @@ github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -874,9 +836,7 @@ github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzO github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -1273,6 +1233,7 @@ go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-clonevolumes.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-clonevolumes.go index 04968bcd25d..1f683699678 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-clonevolumes.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-clonevolumes.go @@ -31,7 +31,7 @@ func (f *IBMPICloneVolumeClient) Create(body *models.VolumesCloneAsyncRequest) ( WithCloudInstanceID(f.cloudInstanceID).WithBody(body) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesClonePost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateCloneOperationFailed, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateCloneOperationFailed, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform the create clone operation") @@ -46,7 +46,7 @@ func (f *IBMPICloneVolumeClient) Get(cloneTaskID string) (*models.CloneTaskStatu WithCloudInstanceID(f.cloudInstanceID).WithCloneTaskID(cloneTaskID) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesClonetasksGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get the clone task %s status for the cloud instance %s with error %w", cloneTaskID, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get the clone task %s status for the cloud instance %s with error %w", cloneTaskID, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get the clone task %s status for the cloud instance %s", cloneTaskID, f.cloudInstanceID) @@ -61,7 +61,7 @@ func (f *IBMPICloneVolumeClient) CreateV2Clone(body *models.VolumesCloneCreate) WithCloudInstanceID(f.cloudInstanceID).WithBody(body) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesclonePost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.PrepareCloneOperationFailed, *body.Name, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.PrepareCloneOperationFailed, *body.Name, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to prepare the clone operation") @@ -76,7 +76,7 @@ func (f *IBMPICloneVolumeClient) GetV2Clones(queryFilter string) (*models.Volume WithCloudInstanceID(f.cloudInstanceID).WithFilter(&queryFilter) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get the volumes-clones for the cloud instance %s with error %w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get the volumes-clones for the cloud instance %s with error %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get the volumes-clones for the cloud instance %s", f.cloudInstanceID) @@ -103,7 +103,7 @@ func (f *IBMPICloneVolumeClient) StartClone(volumesCloneID string) (*models.Volu WithCloudInstanceID(f.cloudInstanceID).WithVolumesCloneID(volumesCloneID) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneStartPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.StartCloneOperationFailed, volumesCloneID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.StartCloneOperationFailed, volumesCloneID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to start the clone operation for volume-clone %s", volumesCloneID) @@ -118,7 +118,7 @@ func (f *IBMPICloneVolumeClient) PrepareClone(volumesCloneID string) (*models.Vo WithCloudInstanceID(f.cloudInstanceID).WithVolumesCloneID(volumesCloneID) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneExecutePost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.PrepareCloneOperationFailed, volumesCloneID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.PrepareCloneOperationFailed, volumesCloneID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to prepare the clone operation for %s", volumesCloneID) @@ -133,7 +133,7 @@ func (f *IBMPICloneVolumeClient) GetV2CloneStatus(cloneName string) (*models.Vol WithCloudInstanceID(f.cloudInstanceID).WithVolumesCloneID(cloneName) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumescloneGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetCloneOperationFailed, cloneName, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetCloneOperationFailed, cloneName, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get the volumes-clone %s for the cloud instance %s", cloneName, f.cloudInstanceID) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-connection.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-connection.go index 884ae371118..3db782420d5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-connection.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-connection.go @@ -26,12 +26,15 @@ func NewIBMPICloudConnectionClient(ctx context.Context, sess *ibmpisession.IBMPI // Create a Cloud Connection func (f *IBMPICloudConnectionClient) Create(body *models.CloudConnectionCreate) (*models.CloudConnection, *models.CloudConnectionCreateResponse, error) { + if f.session.IsOnPrem() { + return nil, nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_cloud_connections.NewPcloudCloudconnectionsPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postok, postcreated, postaccepted, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, nil, fmt.Errorf(errors.CreateCloudConnectionOperationFailed, f.cloudInstanceID, err) + return nil, nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateCloudConnectionOperationFailed, f.cloudInstanceID, err)) } if postok != nil && postok.Payload != nil { return postok.Payload, nil, nil @@ -47,12 +50,15 @@ func (f *IBMPICloudConnectionClient) Create(body *models.CloudConnectionCreate) // Get a Cloud Connection func (f *IBMPICloudConnectionClient) Get(id string) (*models.CloudConnection, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_cloud_connections.NewPcloudCloudconnectionsGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithCloudConnectionID(id) resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetCloudConnectionOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetCloudConnectionOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform Get Cloud Connections Operation for cloudconnectionid %s", id) @@ -62,12 +68,15 @@ func (f *IBMPICloudConnectionClient) Get(id string) (*models.CloudConnection, er // Get All Cloud Connections func (f *IBMPICloudConnectionClient) GetAll() (*models.CloudConnections, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_cloud_connections.NewPcloudCloudconnectionsGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all Cloud Connections: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Cloud Connections: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all Cloud Connections") @@ -77,13 +86,16 @@ func (f *IBMPICloudConnectionClient) GetAll() (*models.CloudConnections, error) // Update a Cloud Connection func (f *IBMPICloudConnectionClient) Update(id string, body *models.CloudConnectionUpdate) (*models.CloudConnection, *models.JobReference, error) { + if f.session.IsOnPrem() { + return nil, nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_cloud_connections.NewPcloudCloudconnectionsPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithCloudConnectionID(id). WithBody(body) putok, putaccepted, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, nil, fmt.Errorf(errors.UpdateCloudConnectionOperationFailed, id, err) + return nil, nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.UpdateCloudConnectionOperationFailed, id, err)) } if putok != nil && putok.Payload != nil { return putok.Payload, nil, nil @@ -96,12 +108,15 @@ func (f *IBMPICloudConnectionClient) Update(id string, body *models.CloudConnect // Delete a Cloud Connection func (f *IBMPICloudConnectionClient) Delete(id string) (*models.JobReference, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_cloud_connections.NewPcloudCloudconnectionsDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithCloudConnectionID(id) _, delaccepted, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsDelete(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.DeleteCloudConnectionOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.DeleteCloudConnectionOperationFailed, id, err)) } if delaccepted != nil && delaccepted.Payload != nil { return delaccepted.Payload, nil @@ -111,13 +126,16 @@ func (f *IBMPICloudConnectionClient) Delete(id string) (*models.JobReference, er // Add a Network to a Cloud Connection func (f *IBMPICloudConnectionClient) AddNetwork(id, networkID string) (models.Object, *models.JobReference, error) { + if f.session.IsOnPrem() { + return nil, nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_cloud_connections.NewPcloudCloudconnectionsNetworksPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithCloudConnectionID(id). WithNetworkID(networkID) respok, respAccepted, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsNetworksPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, nil, fmt.Errorf("failed to Add Network %s to Cloud Connection %s: %w", networkID, id, err) + return nil, nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Add Network %s to Cloud Connection %s: %w", networkID, id, err)) } if respok != nil && respok.Payload != nil { return respok.Payload, nil, nil @@ -130,13 +148,16 @@ func (f *IBMPICloudConnectionClient) AddNetwork(id, networkID string) (models.Ob // Delete a Network from a Cloud Connection func (f *IBMPICloudConnectionClient) DeleteNetwork(id, networkID string) (models.Object, *models.JobReference, error) { + if f.session.IsOnPrem() { + return nil, nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_cloud_connections.NewPcloudCloudconnectionsNetworksDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithCloudConnectionID(id). WithNetworkID(networkID) respok, respAccepted, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsNetworksDelete(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, nil, fmt.Errorf("failed to Delete Network %s from Cloud Connection %s: %w", networkID, id, err) + return nil, nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Delete Network %s from Cloud Connection %s: %w", networkID, id, err)) } if respok != nil && respok.Payload != nil { return respok.Payload, nil, nil @@ -149,13 +170,16 @@ func (f *IBMPICloudConnectionClient) DeleteNetwork(id, networkID string) (models // Get all VPCs for a Cloud Instance func (f *IBMPICloudConnectionClient) GetVPC() (*models.CloudConnectionVirtualPrivateClouds, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_cloud_connections.NewPcloudCloudconnectionsVirtualprivatecloudsGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudCloudConnections.PcloudCloudconnectionsVirtualprivatecloudsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to perform the get vpc operation: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to perform the get vpc operation: %w", err)) } if resp.Payload == nil { return nil, fmt.Errorf("failed to perform the get vpc operation") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-instance.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-instance.go index f6692225a62..81674b4d21b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-cloud-instance.go @@ -31,7 +31,7 @@ func (f *IBMPICloudInstanceClient) Get(id string) (*models.CloudInstance, error) WithCloudInstanceID(id) resp, err := f.session.Power.PCloudInstances.PcloudCloudinstancesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetCloudInstanceOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetCloudInstanceOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Cloud Instance %s", id) @@ -46,7 +46,7 @@ func (f *IBMPICloudInstanceClient) Update(id string, body *models.CloudInstanceU WithCloudInstanceID(id).WithBody(body) resp, err := f.session.Power.PCloudInstances.PcloudCloudinstancesPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.UpdateCloudInstanceOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.UpdateCloudInstanceOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to update the Cloud instance %s", id) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-datacenters.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-datacenters.go new file mode 100644 index 00000000000..c1d31367644 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-datacenters.go @@ -0,0 +1,54 @@ +package instance + +import ( + "context" + "fmt" + + "github.com/IBM-Cloud/power-go-client/errors" + "github.com/IBM-Cloud/power-go-client/helpers" + "github.com/IBM-Cloud/power-go-client/ibmpisession" + "github.com/IBM-Cloud/power-go-client/power/client/datacenters" + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// IBMPIDatacentersClient +type IBMPIDatacentersClient struct { + IBMPIClient +} + +// NewIBMPIDatacenterClient +func NewIBMPIDatacenterClient(ctx context.Context, sess *ibmpisession.IBMPISession, cloudInstanceID string) *IBMPIDatacentersClient { + return &IBMPIDatacentersClient{ + *NewIBMPIClient(ctx, sess, cloudInstanceID), + } +} +func (f *IBMPIDatacentersClient) Get(datacenterRegion string) (*models.Datacenter, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := datacenters.NewV1DatacentersGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithDatacenterRegion(datacenterRegion) + resp, err := f.session.Power.Datacenters.V1DatacentersGet(params) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetDatacenterOperationFailed, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get Datacenter %s", datacenterRegion) + } + return resp.Payload, nil +} + +func (f *IBMPIDatacentersClient) GetAll() (*models.Datacenters, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := datacenters.NewV1DatacentersGetallParams().WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut) + resp, err := f.session.Power.Datacenters.V1DatacentersGetall(params) + + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Datacenters: %w", err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get all Datacenters") + } + return resp.Payload, nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-dhcp.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-dhcp.go index 4855f6fbb73..14a2333f2f6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-dhcp.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-dhcp.go @@ -31,7 +31,7 @@ func (f *IBMPIDhcpClient) Create(body *models.DHCPServerCreate) (*models.DHCPSer WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postaccepted, err := f.session.Power.PCloudServicedhcp.PcloudDhcpPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateDchpOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateDchpOperationFailed, f.cloudInstanceID, err)) } if postaccepted != nil && postaccepted.Payload != nil { return postaccepted.Payload, nil @@ -46,7 +46,7 @@ func (f *IBMPIDhcpClient) Get(id string) (*models.DHCPServerDetail, error) { WithCloudInstanceID(f.cloudInstanceID).WithDhcpID(id) resp, err := f.session.Power.PCloudServicedhcp.PcloudDhcpGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetDhcpOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetDhcpOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get DHCP %s", id) @@ -61,7 +61,7 @@ func (f *IBMPIDhcpClient) GetAll() (models.DHCPServers, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudServicedhcp.PcloudDhcpGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all DHCP servers: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all DHCP servers: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all DHCP servers") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-dr-location.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-dr-location.go index cc9fcfb3d85..8c7b0d410e5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-dr-location.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-dr-location.go @@ -25,12 +25,15 @@ func NewIBMPIDisasterRecoveryLocationClient(ctx context.Context, sess *ibmpisess // Get the disaster recovery site details for the current location func (f *IBMPIDisasterRecoveryLocationClient) Get() (*models.DisasterRecoveryLocation, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_disaster_recovery.NewPcloudLocationsDisasterrecoveryGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudDisasterRecovery.PcloudLocationsDisasterrecoveryGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetDisasterRecoveryLocationOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetDisasterRecoveryLocationOperationFailed, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform the Get Disaster Recovery Location for the cloud instance %s", f.cloudInstanceID) @@ -40,11 +43,14 @@ func (f *IBMPIDisasterRecoveryLocationClient) Get() (*models.DisasterRecoveryLoc // Get all disaster recovery locations supported by Power Virtual Server func (f *IBMPIDisasterRecoveryLocationClient) GetAll() (*models.DisasterRecoveryLocations, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_disaster_recovery.NewPcloudLocationsDisasterrecoveryGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut) resp, err := f.session.Power.PCloudDisasterRecovery.PcloudLocationsDisasterrecoveryGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetAllDisasterRecoveryLocationOperationFailed, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetAllDisasterRecoveryLocationOperationFailed, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get All Disaster Recovery Location of Power Virtual Server") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-image.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-image.go index 113494a58b7..b93be950457 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-image.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-image.go @@ -14,7 +14,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/models" ) -//IBMPIImageClient +// IBMPIImageClient type IBMPIImageClient struct { IBMPIClient } @@ -33,7 +33,7 @@ func (f *IBMPIImageClient) Get(id string) (*models.Image, error) { WithCloudInstanceID(f.cloudInstanceID).WithImageID(id) resp, err := f.session.Power.PCloudImages.PcloudCloudinstancesImagesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetImageOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetImageOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform Get Image Operation for image %s", id) @@ -48,7 +48,7 @@ func (f *IBMPIImageClient) GetAll() (*models.Images, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudImages.PcloudCloudinstancesImagesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all PI Images of the PVM instance %s : %w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all PI Images of the PVM instance %s : %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all PI Images of the PVM instance %s", f.cloudInstanceID) @@ -66,7 +66,7 @@ func (f *IBMPIImageClient) Create(body *models.CreateImage) (*models.Image, erro WithCloudInstanceID(f.cloudInstanceID).WithBody(body) respok, respcreated, err := f.session.Power.PCloudImages.PcloudCloudinstancesImagesPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateImageOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateImageOperationFailed, f.cloudInstanceID, err)) } if respok != nil && respok.Payload != nil { return respok.Payload, nil @@ -84,7 +84,7 @@ func (f *IBMPIImageClient) CreateCosImage(body *models.CreateCosImageImportJob) WithCloudInstanceID(f.cloudInstanceID).WithBody(body) resp, err := f.session.Power.PCloudImages.PcloudV1CloudinstancesCosimagesPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to perform Create COS Image Operation for cloud instance %s with error %w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to perform Create COS Image Operation for cloud instance %s with error %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform Create COS Image Operation for cloud instance %s", f.cloudInstanceID) @@ -99,7 +99,7 @@ func (f *IBMPIImageClient) ExportImage(id string, body *models.ExportImage) (*mo WithCloudInstanceID(f.cloudInstanceID).WithImageID(id).WithBody(body) resp, err := f.session.Power.PCloudImages.PcloudV2ImagesExportPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Export COS Image for image id %s with error %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Export COS Image for image id %s with error %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Export COS Image for image id %s", id) @@ -126,7 +126,7 @@ func (f *IBMPIImageClient) GetStockImage(id string) (*models.Image, error) { WithCloudInstanceID(f.cloudInstanceID).WithImageID(id) resp, err := f.session.Power.PCloudImages.PcloudCloudinstancesStockimagesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get PI Stock Image %s for cloud instance %s: %w", id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get PI Stock Image %s for cloud instance %s: %w", id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get PI Stock Image %s for cloud instance %s", id, f.cloudInstanceID) @@ -143,7 +143,7 @@ func (f *IBMPIImageClient) GetAllStockImages(includeSAP bool, includeVTl bool) ( WithVtl(&includeVTl) resp, err := f.session.Power.PCloudImages.PcloudCloudinstancesStockimagesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get Stock Images with (SAP=%t, VTL=%t) for cloud instance %s: %w", includeSAP, includeVTl, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get Stock Images with (SAP=%t, VTL=%t) for cloud instance %s: %w", includeSAP, includeVTl, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get Stock Images with (SAP=%t, VTL=%t) for cloud instance %s", includeSAP, includeVTl, f.cloudInstanceID) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance.go index 8c53f185bd2..9eea9685470 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-instance.go @@ -29,7 +29,7 @@ func (f *IBMPIInstanceClient) Get(id string) (*models.PVMInstance, error) { WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(id) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get PVM Instance %s :%w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get PVM Instance %s :%w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get PVM Instance %s", id) @@ -44,7 +44,7 @@ func (f *IBMPIInstanceClient) GetAll() (*models.PVMInstances, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all PVM Instances of Power Instance %s :%w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all PVM Instances of Power Instance %s :%w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all PVM Instances of Power Instance %s", f.cloudInstanceID) @@ -54,12 +54,16 @@ func (f *IBMPIInstanceClient) GetAll() (*models.PVMInstances, error) { // Create an Instance func (f *IBMPIInstanceClient) Create(body *models.PVMInstanceCreate) (*models.PVMInstanceList, error) { + // Check for satellite differences in this endpoint + if f.session.IsOnPrem() && (body.SoftwareLicenses != nil || body.SharedProcessorPool != "") { + return nil, fmt.Errorf("software licenses and shared processor pool parameters are not supported in satellite location, check documentation") + } params := p_cloud_p_vm_instances.NewPcloudPvminstancesPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postok, postcreated, postAccepted, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Create PVM Instance :%w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Create PVM Instance :%w", err)) } if postok != nil && len(postok.Payload) > 0 { return &postok.Payload, nil @@ -87,12 +91,16 @@ func (f *IBMPIInstanceClient) Delete(id string) error { // Update an Instance func (f *IBMPIInstanceClient) Update(id string, body *models.PVMInstanceUpdate) (*models.PVMInstanceUpdateResponse, error) { + // Check for satellite differences in this endpoint + if f.session.IsOnPrem() && body.SapProfileID != "" { + return nil, fmt.Errorf("sap profile id parameter is not supported in satellite location, check documentation") + } params := p_cloud_p_vm_instances.NewPcloudPvminstancesPutParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(id).WithBody(body) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Update PVM Instance %s :%w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Update PVM Instance %s :%w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Update PVM Instance %s", id) @@ -121,7 +129,7 @@ func (f *IBMPIInstanceClient) PostConsoleURL(id string) (*models.PVMInstanceCons WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(id) postok, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesConsolePost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Generate the Console URL PVM Instance %s :%w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Generate the Console URL PVM Instance %s :%w", id, err)) } if postok == nil || postok.Payload == nil { return nil, fmt.Errorf("failed to Generate the Console URL PVM Instance %s", id) @@ -131,12 +139,15 @@ func (f *IBMPIInstanceClient) PostConsoleURL(id string) (*models.PVMInstanceCons // List the available Console Languages for an Instance func (f *IBMPIInstanceClient) GetConsoleLanguages(id string) (*models.ConsoleLanguages, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_p_vm_instances.NewPcloudPvminstancesConsoleGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(id) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesConsoleGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get Console Languages for PVM Instance %s :%w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get Console Languages for PVM Instance %s :%w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Console Languages for PVM Instance %s", id) @@ -146,13 +157,16 @@ func (f *IBMPIInstanceClient) GetConsoleLanguages(id string) (*models.ConsoleLan // Update the available Console Languages for an Instance func (f *IBMPIInstanceClient) UpdateConsoleLanguage(id string, body *models.ConsoleLanguage) (*models.ConsoleLanguage, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_p_vm_instances.NewPcloudPvminstancesConsolePutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(id). WithBody(body) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesConsolePut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Update Console Language for PVM Instance %s :%w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Update Console Language for PVM Instance %s :%w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Update Console Language for PVM Instance %s", id) @@ -182,7 +196,7 @@ func (f *IBMPIInstanceClient) CaptureInstanceToImageCatalogV2(id string, body *m WithBody(body) resp, err := f.session.Power.PCloudpVMInstances.PcloudV2PvminstancesCapturePost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Capture the PVM Instance %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Capture the PVM Instance %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Capture the PVM Instance %s", id) @@ -198,7 +212,7 @@ func (f *IBMPIInstanceClient) CreatePvmSnapShot(id string, body *models.Snapshot WithBody(body) snapshotpostaccepted, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesSnapshotsPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Create the snapshot for the pvminstance %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Create the snapshot for the pvminstance %s: %w", id, err)) } if snapshotpostaccepted == nil || snapshotpostaccepted.Payload == nil { return nil, fmt.Errorf("failed to Create the snapshot for the pvminstance %s", id) @@ -214,7 +228,7 @@ func (f *IBMPIInstanceClient) CreateClone(id string, body *models.PVMInstanceClo WithBody(body) clonePost, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesClonePost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to create the clone of the pvm instance %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to create the clone of the pvm instance %s: %w", id, err)) } if clonePost == nil || clonePost.Payload == nil { return nil, fmt.Errorf("failed to create the clone of the pvm instance %s", id) @@ -229,7 +243,7 @@ func (f *IBMPIInstanceClient) GetSnapShotVM(id string) (*models.Snapshots, error WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(id) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesSnapshotsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get the snapshot for the pvminstance %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get the snapshot for the pvminstance %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get the snapshot for the pvminstance %s", id) @@ -247,7 +261,7 @@ func (f *IBMPIInstanceClient) RestoreSnapShotVM(id, snapshotid, restoreAction st WithBody(body) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesSnapshotsRestorePost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to restrore the snapshot for the pvminstance %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to restrore the snapshot for the pvminstance %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to restrore the snapshot for the pvminstance %s", id) @@ -263,7 +277,7 @@ func (f *IBMPIInstanceClient) AddNetwork(id string, body *models.PVMInstanceAddN WithBody(body) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesNetworksPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to attach the network to the pvminstanceid %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to attach the network to the pvminstanceid %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to attach the network to the pvminstanceid %s", id) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-job.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-job.go index 52cac228ce0..f718a03caf4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-job.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-job.go @@ -31,7 +31,7 @@ func (f *IBMPIJobClient) Get(id string) (*models.Job, error) { WithCloudInstanceID(f.cloudInstanceID).WithJobID(id) resp, err := f.session.Power.PCloudJobs.PcloudCloudinstancesJobsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetJobOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetJobOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform get Job operation for job id %s", id) @@ -46,7 +46,7 @@ func (f *IBMPIJobClient) GetAll() (*models.Jobs, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudJobs.PcloudCloudinstancesJobsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetAllJobsOperationFailed, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetAllJobsOperationFailed, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform get all jobs") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-key.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-key.go index a7484acf10a..b63ff978a21 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-key.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-key.go @@ -32,7 +32,7 @@ func (f *IBMPIKeyClient) Get(id string) (*models.SSHKey, error) { WithTenantID(tenantid).WithSshkeyName(id) resp, err := f.session.Power.PCloudTenantsSSHKeys.PcloudTenantsSshkeysGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetPIKeyOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetPIKeyOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get PI Key %s", id) @@ -48,7 +48,7 @@ func (f *IBMPIKeyClient) GetAll() (*models.SSHKeys, error) { WithTenantID(tenantid) resp, err := f.session.Power.PCloudTenantsSSHKeys.PcloudTenantsSshkeysGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all PI Keys: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all PI Keys: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all PI Keys") @@ -64,7 +64,7 @@ func (f *IBMPIKeyClient) Create(body *models.SSHKey) (*models.SSHKey, error) { WithTenantID(tenantid).WithBody(body) postok, postcreated, err := f.session.Power.PCloudTenantsSSHKeys.PcloudTenantsSshkeysPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreatePIKeyOperationFailed, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreatePIKeyOperationFailed, err)) } if postok != nil && postok.Payload != nil { return postok.Payload, nil diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network.go index 3df19c0333b..1b823234970 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-network.go @@ -31,7 +31,7 @@ func (f *IBMPINetworkClient) Get(id string) (*models.Network, error) { WithCloudInstanceID(f.cloudInstanceID).WithNetworkID(id) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetNetworkOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetNetworkOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Network %s", id) @@ -46,7 +46,7 @@ func (f *IBMPINetworkClient) GetAll() (*models.Networks, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get Network for cloud instance %s with error %w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get Network for cloud instance %s with error %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Network for cloud instance %s", f.cloudInstanceID) @@ -56,12 +56,16 @@ func (f *IBMPINetworkClient) GetAll() (*models.Networks, error) { // Create a Network func (f *IBMPINetworkClient) Create(body *models.NetworkCreate) (*models.Network, error) { + // Check for satellite differences in this endpoint + if f.session.IsOnPrem() && body.Jumbo { + return nil, fmt.Errorf("jumbo parameter is not supported in satellite location, use mtu instead") + } params := p_cloud_networks.NewPcloudNetworksPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postok, postcreated, err := f.session.Power.PCloudNetworks.PcloudNetworksPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateNetworkOperationFailed, body.Name, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateNetworkOperationFailed, body.Name, err)) } if postok != nil && postok.Payload != nil { return postok.Payload, nil @@ -80,7 +84,7 @@ func (f *IBMPINetworkClient) Update(id string, body *models.NetworkUpdate) (*mod WithBody(body) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to perform Update Network Operation for Network %s with error %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to perform Update Network Operation for Network %s with error %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform Update Network Operation for Network %s", id) @@ -96,7 +100,7 @@ func (f *IBMPINetworkClient) GetAllPublic() (*models.Networks, error) { WithCloudInstanceID(f.cloudInstanceID).WithFilter(&filterQuery) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all Public Networks for cloud instance %s: %w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Public Networks for cloud instance %s: %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all Public Networks for cloud instance %s", f.cloudInstanceID) @@ -123,7 +127,7 @@ func (f *IBMPINetworkClient) GetAllPorts(id string) (*models.NetworkPorts, error WithCloudInstanceID(f.cloudInstanceID).WithNetworkID(id) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksPortsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all Network Ports for Network %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Network Ports for Network %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all Network Ports for Network %s", id) @@ -140,7 +144,7 @@ func (f *IBMPINetworkClient) GetPort(id string, networkPortID string) (*models.N resp, err := f.session.Power.PCloudNetworks.PcloudNetworksPortsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get PI Network Port %s for Network %s: %w", networkPortID, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get PI Network Port %s for Network %s: %w", networkPortID, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get PI Network Port %s for Network %s", networkPortID, id) @@ -156,7 +160,7 @@ func (f *IBMPINetworkClient) CreatePort(id string, body *models.NetworkPortCreat WithBody(body) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksPortsPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateNetworkPortOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateNetworkPortOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform Create Network Port Operation for Network %s", id) @@ -185,7 +189,7 @@ func (f *IBMPINetworkClient) UpdatePort(id, networkPortID string, body *models.N WithPortID(networkPortID).WithBody(body) resp, err := f.session.Power.PCloudNetworks.PcloudNetworksPortsPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to update the port %s and Network %s with error %w", networkPortID, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to update the port %s and Network %s with error %w", networkPortID, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to update the port %s and Network %s", networkPortID, id) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-placement-groups.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-placement-groups.go index 4ca3e09803b..dd215fda3de 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-placement-groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-placement-groups.go @@ -12,7 +12,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/models" ) -//IBMPIPlacementGroupClient +// IBMPIPlacementGroupClient type IBMPIPlacementGroupClient struct { IBMPIClient } @@ -31,7 +31,7 @@ func (f *IBMPIPlacementGroupClient) Get(id string) (*models.PlacementGroup, erro WithCloudInstanceID(f.cloudInstanceID).WithPlacementGroupID(id) resp, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetPlacementGroupOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetPlacementGroupOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Placement Group %s", id) @@ -46,7 +46,7 @@ func (f *IBMPIPlacementGroupClient) GetAll() (*models.PlacementGroups, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get All Placement Groups: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get All Placement Groups: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all Placement Groups") @@ -61,7 +61,7 @@ func (f *IBMPIPlacementGroupClient) Create(body *models.PlacementGroupCreate) (* WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postok, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreatePlacementGroupOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreatePlacementGroupOperationFailed, f.cloudInstanceID, err)) } if postok == nil || postok.Payload == nil { return nil, fmt.Errorf("failed to Create Placement Group") @@ -89,7 +89,7 @@ func (f *IBMPIPlacementGroupClient) AddMember(id string, body *models.PlacementG WithBody(body) postok, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsMembersPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.AddMemberPlacementGroupOperationFailed, *body.ID, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.AddMemberPlacementGroupOperationFailed, *body.ID, id, err)) } if postok == nil || postok.Payload == nil { return nil, fmt.Errorf("failed to Add Member for instance %s and placement group %s", *body.ID, id) @@ -105,7 +105,7 @@ func (f *IBMPIPlacementGroupClient) DeleteMember(id string, body *models.Placeme WithBody(body) delok, err := f.session.Power.PCloudPlacementGroups.PcloudPlacementgroupsMembersDelete(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.DeleteMemberPlacementGroupOperationFailed, *body.ID, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.DeleteMemberPlacementGroupOperationFailed, *body.ID, id, err)) } if delok == nil || delok.Payload == nil { return nil, fmt.Errorf("failed to Delete Member for instance %s and placement group %s", *body.ID, id) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-sap-instance.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-sap-instance.go index b8504d80348..ffc403bbcb0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-sap-instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-sap-instance.go @@ -24,12 +24,15 @@ func NewIBMPISAPInstanceClient(ctx context.Context, sess *ibmpisession.IBMPISess // Create a SAP Instance func (f *IBMPISAPInstanceClient) Create(body *models.SAPCreate) (*models.PVMInstanceList, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_s_a_p.NewPcloudSapPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postok, postcreated, postAccepted, err := f.session.Power.PCloudsap.PcloudSapPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Create SAP Instance: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Create SAP Instance: %w", err)) } if postok != nil && len(postok.Payload) > 0 { return &postok.Payload, nil @@ -45,12 +48,15 @@ func (f *IBMPISAPInstanceClient) Create(body *models.SAPCreate) (*models.PVMInst // Get a SAP Profile func (f *IBMPISAPInstanceClient) GetSAPProfile(id string) (*models.SAPProfile, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_s_a_p.NewPcloudSapGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithSapProfileID(id) resp, err := f.session.Power.PCloudsap.PcloudSapGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get sap profile %s : %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get sap profile %s : %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get sap profile %s", id) @@ -60,12 +66,15 @@ func (f *IBMPISAPInstanceClient) GetSAPProfile(id string) (*models.SAPProfile, e // Get All SAP Profiles func (f *IBMPISAPInstanceClient) GetAllSAPProfiles(cloudInstanceID string) (*models.SAPProfiles, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_s_a_p.NewPcloudSapGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudsap.PcloudSapGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get all sap profiles for power instance %s: %w", cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get all sap profiles for power instance %s: %w", cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get all sap profiles for power instance %s", cloudInstanceID) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-shared-processor-pool.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-shared-processor-pool.go new file mode 100644 index 00000000000..1722f9ac58d --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-shared-processor-pool.go @@ -0,0 +1,112 @@ +package instance + +import ( + "context" + "fmt" + + "github.com/IBM-Cloud/power-go-client/errors" + "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools" + + "github.com/IBM-Cloud/power-go-client/helpers" + "github.com/IBM-Cloud/power-go-client/ibmpisession" + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// IBMPISharedProcessorPoolClient +type IBMPISharedProcessorPoolClient struct { + IBMPIClient +} + +// NewIBMPISharedProcessorPoolClient +func NewIBMPISharedProcessorPoolClient(ctx context.Context, sess *ibmpisession.IBMPISession, cloudInstanceID string) *IBMPISharedProcessorPoolClient { + return &IBMPISharedProcessorPoolClient{ + *NewIBMPIClient(ctx, sess, cloudInstanceID), + } +} + +// Get a PI Shared Processor Pool +func (f *IBMPISharedProcessorPoolClient) Get(id string) (*models.SharedProcessorPoolDetail, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsGetParams(). + WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithSharedProcessorPoolID(id) + resp, err := f.session.Power.PCloudSharedProcessorPools.PcloudSharedprocessorpoolsGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetSharedProcessorPoolOperationFailed, id, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get Shared Processor Pool %s", id) + } + return resp.Payload, nil +} + +// Get All Shared Processor Pools +func (f *IBMPISharedProcessorPoolClient) GetAll() (*models.SharedProcessorPools, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsGetallParams(). + WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). + WithCloudInstanceID(f.cloudInstanceID) + resp, err := f.session.Power.PCloudSharedProcessorPools.PcloudSharedprocessorpoolsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get All Shared Processor Pools: %w", err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get all Shared Processor Pools") + } + return resp.Payload, nil +} + +// Create a Shared Processor Pool +func (f *IBMPISharedProcessorPoolClient) Create(body *models.SharedProcessorPoolCreate) (*models.SharedProcessorPool, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsPostParams(). + WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithBody(body) + postok, err := f.session.Power.PCloudSharedProcessorPools.PcloudSharedprocessorpoolsPost(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateSharedProcessorPoolOperationFailed, f.cloudInstanceID, err)) + } + if postok == nil || postok.Payload == nil { + return nil, fmt.Errorf("failed to Create a Shared Processor Pool") + } + return postok.Payload, nil +} + +// Delete a Shared Processor Pool +func (f *IBMPISharedProcessorPoolClient) Delete(id string) error { + if f.session.IsOnPrem() { + return fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsDeleteParams(). + WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithSharedProcessorPoolID(id) + _, err := f.session.Power.PCloudSharedProcessorPools.PcloudSharedprocessorpoolsDelete(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return fmt.Errorf(errors.DeleteSharedProcessorPoolOperationFailed, id, err) + } + return nil +} + +// Update a PI Shared Processor Pool +func (f *IBMPISharedProcessorPoolClient) Update(id string, body *models.SharedProcessorPoolUpdate) (*models.SharedProcessorPool, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_shared_processor_pools.NewPcloudSharedprocessorpoolsPutParams(). + WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithBody(body).WithSharedProcessorPoolID(id) + resp, err := f.session.Power.PCloudSharedProcessorPools.PcloudSharedprocessorpoolsPut(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.UpdateSharedProcessorPoolOperationFailed, id, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Update Shared Processor Pool %s", id) + } + return resp.Payload, nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-snapshot.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-snapshot.go index f43549e52bb..676c964708c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-snapshot.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-snapshot.go @@ -30,7 +30,7 @@ func (f *IBMPISnapshotClient) Get(id string) (*models.Snapshot, error) { WithCloudInstanceID(f.cloudInstanceID).WithSnapshotID(id) resp, err := f.session.Power.PCloudSnapshots.PcloudCloudinstancesSnapshotsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get PI Snapshot %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get PI Snapshot %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get PI Snapshot %s", id) @@ -58,7 +58,7 @@ func (f *IBMPISnapshotClient) Update(id string, body *models.SnapshotUpdate) (mo WithBody(body) resp, err := f.session.Power.PCloudSnapshots.PcloudCloudinstancesSnapshotsPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Update PI Snapshot %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Update PI Snapshot %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Update PI Snapshot %s", id) @@ -73,7 +73,7 @@ func (f *IBMPISnapshotClient) GetAll() (*models.Snapshots, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudSnapshots.PcloudCloudinstancesSnapshotsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all PI Snapshots: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all PI Snapshots: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all PI Snapshots") @@ -89,7 +89,7 @@ func (f *IBMPISnapshotClient) Create(instanceID, snapshotID, restoreFailAction s WithSnapshotID(snapshotID).WithRestoreFailAction(&restoreFailAction) resp, err := f.session.Power.PCloudpVMInstances.PcloudPvminstancesSnapshotsRestorePost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to restore PI Snapshot %s of the instance %s: %w", snapshotID, instanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to restore PI Snapshot %s of the instance %s: %w", snapshotID, instanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to restore PI Snapshot %s of the instance %s", snapshotID, instanceID) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-spp-placement-groups.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-spp-placement-groups.go new file mode 100644 index 00000000000..a628bca6e2a --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-spp-placement-groups.go @@ -0,0 +1,132 @@ +package instance + +import ( + "context" + "fmt" + + "github.com/IBM-Cloud/power-go-client/errors" + "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups" + + "github.com/IBM-Cloud/power-go-client/helpers" + "github.com/IBM-Cloud/power-go-client/ibmpisession" + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// IBMPISPPPlacementGroupClient +type IBMPISPPPlacementGroupClient struct { + IBMPIClient +} + +// NewIBMPISPPPlacementGroupClient +func NewIBMPISPPPlacementGroupClient(ctx context.Context, sess *ibmpisession.IBMPISession, cloudInstanceID string) *IBMPISPPPlacementGroupClient { + return &IBMPISPPPlacementGroupClient{ + *NewIBMPIClient(ctx, sess, cloudInstanceID), + } +} + +// Get a PI SPP Placement Group +func (f *IBMPISPPPlacementGroupClient) Get(id string) (*models.SPPPlacementGroup, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsGetParams(). + WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithSppPlacementGroupID(id) + resp, err := f.session.Power.PCloudsppPlacementGroups.PcloudSppplacementgroupsGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetSPPPlacementGroupOperationFailed, id, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get Shared Processor Pool Placement Group %s", id) + } + return resp.Payload, nil +} + +// Get All SPP Placement Groups +func (f *IBMPISPPPlacementGroupClient) GetAll() (*models.SPPPlacementGroups, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsGetallParams(). + WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). + WithCloudInstanceID(f.cloudInstanceID) + resp, err := f.session.Power.PCloudsppPlacementGroups.PcloudSppplacementgroupsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get All Shared Processor Pool Placement Groups: %w", err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get all Shared Processor Pool Placement Groups") + } + return resp.Payload, nil +} + +// Create a SPP Placement Group +func (f *IBMPISPPPlacementGroupClient) Create(body *models.SPPPlacementGroupCreate) (*models.SPPPlacementGroup, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsPostParams(). + WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithBody(body) + postok, err := f.session.Power.PCloudsppPlacementGroups.PcloudSppplacementgroupsPost(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateSPPPlacementGroupOperationFailed, f.cloudInstanceID, err)) + } + if postok == nil || postok.Payload == nil { + return nil, fmt.Errorf("failed to Create Shared Processor Pool Placement Group") + } + return postok.Payload, nil +} + +// Delete a SPP Placement Group +func (f *IBMPISPPPlacementGroupClient) Delete(id string) error { + if f.session.IsOnPrem() { + return fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsDeleteParams(). + WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithSppPlacementGroupID(id) + _, err := f.session.Power.PCloudsppPlacementGroups.PcloudSppplacementgroupsDelete(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return fmt.Errorf(errors.DeleteSPPPlacementGroupOperationFailed, id, err) + } + return nil +} + +// Add an Instance to a SPP Placement Group +func (f *IBMPISPPPlacementGroupClient) AddMember(id string, sppID string) (*models.SPPPlacementGroup, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsMembersPostParams(). + WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithSppPlacementGroupID(id). + WithSharedProcessorPoolID(sppID) + postok, err := f.session.Power.PCloudsppPlacementGroups.PcloudSppplacementgroupsMembersPost(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.AddMemberSPPPlacementGroupOperationFailed, sppID, id, err)) + } + if postok == nil || postok.Payload == nil { + return nil, fmt.Errorf("failed to Add Member for pool %s and shared processor pool placement group %s", sppID, id) + } + return postok.Payload, nil +} + +// Remove an Instance to a SPP Placement Group +func (f *IBMPISPPPlacementGroupClient) DeleteMember(id string, sppID string) (*models.SPPPlacementGroup, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := p_cloud_s_p_p_placement_groups.NewPcloudSppplacementgroupsMembersDeleteParams(). + WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). + WithCloudInstanceID(f.cloudInstanceID).WithSppPlacementGroupID(id). + WithSharedProcessorPoolID(sppID) + delok, err := f.session.Power.PCloudsppPlacementGroups.PcloudSppplacementgroupsMembersDelete(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.DeleteMemberSPPPlacementGroupOperationFailed, sppID, id, err)) + } + if delok == nil || delok.Payload == nil { + return nil, fmt.Errorf("failed to Delete Member for pool %s and shared processor pool placement group %s", sppID, id) + } + return delok.Payload, nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-storage-capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-storage-capacity.go index 8c12c98b1fe..d7c52707e47 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-storage-capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-storage-capacity.go @@ -29,7 +29,7 @@ func (f *IBMPIStorageCapacityClient) GetAllStoragePoolsCapacity() (*models.Stora WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudStorageCapacity.PcloudStoragecapacityPoolsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get the capacity for all storage pools: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get the capacity for all storage pools: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get the capacity for all storage pools") @@ -44,7 +44,7 @@ func (f *IBMPIStorageCapacityClient) GetStoragePoolCapacity(storagePool string) WithCloudInstanceID(f.cloudInstanceID).WithStoragePoolName(storagePool) resp, err := f.session.Power.PCloudStorageCapacity.PcloudStoragecapacityPoolsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get the capacity for storage pool %s: %w", storagePool, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get the capacity for storage pool %s: %w", storagePool, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get the capacity for storage pool %s", storagePool) @@ -59,7 +59,7 @@ func (f *IBMPIStorageCapacityClient) GetStorageTypeCapacity(storageType string) WithCloudInstanceID(f.cloudInstanceID).WithStorageTypeName(storageType) resp, err := f.session.Power.PCloudStorageCapacity.PcloudStoragecapacityTypesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get the capacity for storage type %s: %w", storageType, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get the capacity for storage type %s: %w", storageType, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get the capacity for storage type %s", storageType) @@ -74,7 +74,7 @@ func (f *IBMPIStorageCapacityClient) GetAllStorageTypesCapacity() (*models.Stora WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudStorageCapacity.PcloudStoragecapacityTypesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get the capacity for all storage types %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get the capacity for all storage types %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get the capacity for all storage types") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-system-pools.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-system-pools.go index a6051d416ce..d6349d92e14 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-system-pools.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-system-pools.go @@ -24,7 +24,7 @@ func NewIBMPISystemPoolClient(ctx context.Context, sess *ibmpisession.IBMPISessi } } -//Get the System Pools +// Get the System Pools // Deprecated: Use GetSystemPools() func (f *IBMPISystemPoolClient) Get(id string) (models.SystemPools, error) { params := p_cloud_system_pools.NewPcloudSystempoolsGetParams(). @@ -32,7 +32,7 @@ func (f *IBMPISystemPoolClient) Get(id string) (models.SystemPools, error) { WithCloudInstanceID(id) resp, err := f.session.Power.PCloudSystemPools.PcloudSystempoolsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetSystemPoolsOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetSystemPoolsOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform Get System Pools Operation for cloud instance id %s", id) @@ -47,7 +47,7 @@ func (f *IBMPISystemPoolClient) GetSystemPools() (models.SystemPools, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudSystemPools.PcloudSystempoolsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetSystemPoolsOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetSystemPoolsOperationFailed, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform Get System Pools Operation for cloud instance id %s", f.cloudInstanceID) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-tenant.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-tenant.go index e4304d82b47..0ab407f16c4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-tenant.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-tenant.go @@ -29,7 +29,7 @@ func (f *IBMPITenantClient) Get(tenantid string) (*models.Tenant, error) { WithTenantID(tenantid) resp, err := f.session.Power.PCloudTenants.PcloudTenantsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get tenant %s with error %w", tenantid, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get tenant %s with error %w", tenantid, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get tenant %s", tenantid) @@ -44,7 +44,7 @@ func (f *IBMPITenantClient) GetSelfTenant() (*models.Tenant, error) { WithTenantID(f.session.Options.UserAccount) resp, err := f.session.Power.PCloudTenants.PcloudTenantsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get self tenant with error %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get self tenant with error %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get self tenant") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume-group.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume-group.go index 164b3ff6462..0714ee910d8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume-group.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume-group.go @@ -30,7 +30,7 @@ func (f *IBMPIVolumeGroupClient) Get(id string) (*models.VolumeGroup, error) { WithCloudInstanceID(f.cloudInstanceID).WithVolumeGroupID(id) resp, err := f.session.Power.PCloudVolumeGroups.PcloudVolumegroupsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVolumeGroupOperationFailed, id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVolumeGroupOperationFailed, id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get volume-group %s", id) @@ -45,7 +45,7 @@ func (f *IBMPIVolumeGroupClient) GetAll() (*models.VolumeGroups, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudVolumeGroups.PcloudVolumegroupsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all volume-groups for Cloud Instance %s: %w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all volume-groups for Cloud Instance %s: %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all volume-groups for Cloud Instance %s", f.cloudInstanceID) @@ -60,7 +60,7 @@ func (f *IBMPIVolumeGroupClient) GetDetails(id string) (*models.VolumeGroupDetai WithCloudInstanceID(f.cloudInstanceID).WithVolumeGroupID(id) resp, err := f.session.Power.PCloudVolumeGroups.PcloudVolumegroupsGetDetails(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVolumeGroupDetailsOperationFailed, id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVolumeGroupDetailsOperationFailed, id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get volume-group %s details", id) @@ -75,7 +75,7 @@ func (f *IBMPIVolumeGroupClient) GetAllDetails() (*models.VolumeGroupsDetails, e WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudVolumeGroups.PcloudVolumegroupsGetallDetails(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all volume-groups details for Cloud Instance %s: %w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all volume-groups details for Cloud Instance %s: %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all volume-groups details for Cloud Instance %s", f.cloudInstanceID) @@ -90,7 +90,7 @@ func (f *IBMPIVolumeGroupClient) CreateVolumeGroup(body *models.VolumeGroupCreat WithCloudInstanceID(f.cloudInstanceID).WithBody(body) respOk, respPartial, err := f.session.Power.PCloudVolumeGroups.PcloudVolumegroupsPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateVolumeGroupOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateVolumeGroupOperationFailed, f.cloudInstanceID, err)) } if respOk != nil && respOk.Payload != nil { return respOk.Payload, nil @@ -135,7 +135,7 @@ func (f *IBMPIVolumeGroupClient) GetVolumeGroupLiveDetails(id string) (*models.V WithCloudInstanceID(f.cloudInstanceID).WithVolumeGroupID(id) resp, err := f.session.Power.PCloudVolumeGroups.PcloudVolumegroupsStorageDetailsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetLiveVolumeGroupDetailsOperationFailed, id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetLiveVolumeGroupDetailsOperationFailed, id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get live details of volume-group %s", id) @@ -150,7 +150,7 @@ func (f *IBMPIVolumeGroupClient) VolumeGroupAction(id string, body *models.Volum WithCloudInstanceID(f.cloudInstanceID).WithVolumeGroupID(id).WithBody(body) resp, err := f.session.Power.PCloudVolumeGroups.PcloudVolumegroupsActionPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.VolumeGroupActionOperationFailed, id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.VolumeGroupActionOperationFailed, id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to perform action on volume-group %s", id) @@ -165,7 +165,7 @@ func (f *IBMPIVolumeGroupClient) GetVolumeGroupRemoteCopyRelationships(id string WithCloudInstanceID(f.cloudInstanceID).WithVolumeGroupID(id) resp, err := f.session.Power.PCloudVolumeGroups.PcloudVolumegroupsRemoteCopyRelationshipsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVolumeGroupRemoteCopyRelationshipsOperationFailed, id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVolumeGroupRemoteCopyRelationshipsOperationFailed, id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get remote copy relationships of the volumes belonging to volume group %s", id) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume-onboarding.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume-onboarding.go index 4c735704281..b41dde16201 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume-onboarding.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume-onboarding.go @@ -25,12 +25,15 @@ func NewIBMPIVolumeOnboardingClient(ctx context.Context, sess *ibmpisession.IBMP // Get the information of volume onboarding operation func (f *IBMPIVolumeOnboardingClient) Get(id string) (*models.VolumeOnboarding, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_volume_onboarding.NewPcloudVolumeOnboardingGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVolumeOnboardingID(id) resp, err := f.session.Power.PCloudVolumeOnboarding.PcloudVolumeOnboardingGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVolumeOnboardingOperationFailed, id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVolumeOnboardingOperationFailed, id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Volume Onboarding for volume-onboarding ID:%s", id) @@ -40,12 +43,15 @@ func (f *IBMPIVolumeOnboardingClient) Get(id string) (*models.VolumeOnboarding, // Get All volume onboardings for this cloud instance func (f *IBMPIVolumeOnboardingClient) GetAll() (*models.VolumeOnboardings, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_volume_onboarding.NewPcloudVolumeOnboardingGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudVolumeOnboarding.PcloudVolumeOnboardingGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetAllVolumeOnboardingsOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetAllVolumeOnboardingsOperationFailed, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get All Volume Onboardings for the cloud instance %s", f.cloudInstanceID) @@ -55,12 +61,15 @@ func (f *IBMPIVolumeOnboardingClient) GetAll() (*models.VolumeOnboardings, error // Onboard auxiliary volumes to target site func (f *IBMPIVolumeOnboardingClient) CreateVolumeOnboarding(body *models.VolumeOnboardingCreate) (*models.VolumeOnboardingCreateResponse, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_volume_onboarding.NewPcloudVolumeOnboardingPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) resp, err := f.session.Power.PCloudVolumeOnboarding.PcloudVolumeOnboardingPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateVolumeOnboardingsOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateVolumeOnboardingsOperationFailed, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Create Volume Onboarding") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume.go index 73f900ba172..8fc5b6319fd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-volume.go @@ -31,7 +31,7 @@ func (f *IBMPIVolumeClient) Get(id string) (*models.Volume, error) { WithCloudInstanceID(f.cloudInstanceID).WithVolumeID(id) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVolumeOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVolumeOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Volume %s", id) @@ -46,7 +46,7 @@ func (f *IBMPIVolumeClient) GetAll() (*models.Volumes, error) { WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all Volumes for Cloud Instance %s: %w", f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Volumes for Cloud Instance %s: %w", f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all Volumes for Cloud Instance %s", f.cloudInstanceID) @@ -61,7 +61,7 @@ func (f *IBMPIVolumeClient) GetAllAffinityVolumes(affinity string) (*models.Volu WithCloudInstanceID(f.cloudInstanceID).WithAffinity(&affinity) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all Volumes with affinity %s for Cloud Instance %s: %w", affinity, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Volumes with affinity %s for Cloud Instance %s: %w", affinity, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all Volumes with affinity %s for Cloud Instance %s", affinity, f.cloudInstanceID) @@ -76,7 +76,7 @@ func (f *IBMPIVolumeClient) CreateVolumeV2(body *models.MultiVolumesCreate) (*mo WithCloudInstanceID(f.cloudInstanceID).WithBody(body) resp, err := f.session.Power.PCloudVolumes.PcloudV2VolumesPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateVolumeV2OperationFailed, *body.Name, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateVolumeV2OperationFailed, *body.Name, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Create Volume v2") @@ -91,7 +91,7 @@ func (f *IBMPIVolumeClient) CreateVolume(body *models.CreateDataVolume) (*models WithCloudInstanceID(f.cloudInstanceID).WithBody(body) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateVolumeOperationFailed, *body.Name, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateVolumeOperationFailed, *body.Name, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Create Volume") @@ -107,7 +107,7 @@ func (f *IBMPIVolumeClient) UpdateVolume(id string, body *models.UpdateVolume) ( WithBody(body) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.UpdateVolumeOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.UpdateVolumeOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Update Volume %s", id) @@ -160,7 +160,7 @@ func (f *IBMPIVolumeClient) GetAllInstanceVolumes(id string) (*models.Volumes, e WithCloudInstanceID(f.cloudInstanceID).WithPvmInstanceID(id) resp, err := f.session.Power.PCloudVolumes.PcloudPvminstancesVolumesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all Volumes for PI Instance %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Volumes for PI Instance %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all Volumes for PI Instance %s", id) @@ -189,7 +189,7 @@ func (f *IBMPIVolumeClient) CheckVolumeAttach(id, volumeID string) (*models.Volu WithVolumeID(volumeID) resp, err := f.session.Power.PCloudVolumes.PcloudPvminstancesVolumesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to validate that the volume %s is attached to the pvminstance %s: %w", volumeID, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to validate that the volume %s is attached to the pvminstance %s: %w", volumeID, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to validate that the volume %s is attached to the pvminstance %s", volumeID, id) @@ -232,7 +232,7 @@ func (f *IBMPIVolumeClient) GetVolumeRemoteCopyRelationships(id string) (*models WithCloudInstanceID(f.cloudInstanceID).WithVolumeID(id) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesRemoteCopyRelationshipGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVolumeRemoteCopyRelationshipsOperationFailed, id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVolumeRemoteCopyRelationshipsOperationFailed, id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get remote copy relationships of a volume %s", id) @@ -247,7 +247,7 @@ func (f *IBMPIVolumeClient) GetVolumeFlashCopyMappings(id string) (models.FlashC WithCloudInstanceID(f.cloudInstanceID).WithVolumeID(id) resp, err := f.session.Power.PCloudVolumes.PcloudCloudinstancesVolumesFlashCopyMappingsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVolumeFlashCopyMappingOperationFailed, id, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVolumeFlashCopyMappingOperationFailed, id, f.cloudInstanceID, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get flash copy mapping of a volume %s", id) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpn-policy.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpn-policy.go index d2dd65249ab..3b78915604c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpn-policy.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpn-policy.go @@ -27,12 +27,15 @@ func NewIBMPIVpnPolicyClient(ctx context.Context, sess *ibmpisession.IBMPISessio // IKE Policies // Get an IKE Policy func (f *IBMPIVpnPolicyClient) GetIKEPolicy(id string) (*models.IKEPolicy, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIkepoliciesGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithIkePolicyID(id) resp, err := f.session.Power.PCloudvpnPolicies.PcloudIkepoliciesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVPNPolicyOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVPNPolicyOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get ike policy for policy id %s", id) @@ -42,12 +45,15 @@ func (f *IBMPIVpnPolicyClient) GetIKEPolicy(id string) (*models.IKEPolicy, error // Create an IKE Policy func (f *IBMPIVpnPolicyClient) CreateIKEPolicy(body *models.IKEPolicyCreate) (*models.IKEPolicy, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIkepoliciesPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postok, err := f.session.Power.PCloudvpnPolicies.PcloudIkepoliciesPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateVPNPolicyOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateVPNPolicyOperationFailed, f.cloudInstanceID, err)) } if postok != nil && postok.Payload != nil { return postok.Payload, nil @@ -57,13 +63,16 @@ func (f *IBMPIVpnPolicyClient) CreateIKEPolicy(body *models.IKEPolicyCreate) (*m // Update an IKE Policy func (f *IBMPIVpnPolicyClient) UpdateIKEPolicy(id string, body *models.IKEPolicyUpdate) (*models.IKEPolicy, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIkepoliciesPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithIkePolicyID(id). WithBody(body) putok, err := f.session.Power.PCloudvpnPolicies.PcloudIkepoliciesPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.UpdateVPNPolicyOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.UpdateVPNPolicyOperationFailed, id, err)) } if putok != nil && putok.Payload != nil { return putok.Payload, nil @@ -73,12 +82,15 @@ func (f *IBMPIVpnPolicyClient) UpdateIKEPolicy(id string, body *models.IKEPolicy // Get All IKE Policies func (f *IBMPIVpnPolicyClient) GetAllIKEPolicies() (*models.IKEPolicies, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIkepoliciesGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudvpnPolicies.PcloudIkepoliciesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get all ike policies: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get all ike policies: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get all ike policies") @@ -88,6 +100,9 @@ func (f *IBMPIVpnPolicyClient) GetAllIKEPolicies() (*models.IKEPolicies, error) // Delete an IKE Policy func (f *IBMPIVpnPolicyClient) DeleteIKEPolicy(id string) error { + if f.session.IsOnPrem() { + return fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIkepoliciesDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithIkePolicyID(id) @@ -101,12 +116,15 @@ func (f *IBMPIVpnPolicyClient) DeleteIKEPolicy(id string) error { // IPSec Policies // Get an IPSec Policy func (f *IBMPIVpnPolicyClient) GetIPSecPolicy(id string) (*models.IPSecPolicy, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIpsecpoliciesGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithIpsecPolicyID(id) resp, err := f.session.Power.PCloudvpnPolicies.PcloudIpsecpoliciesGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVPNPolicyOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVPNPolicyOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get ipsec policy for policy id %s", id) @@ -116,12 +134,15 @@ func (f *IBMPIVpnPolicyClient) GetIPSecPolicy(id string) (*models.IPSecPolicy, e // Create an IPSec Policy func (f *IBMPIVpnPolicyClient) CreateIPSecPolicy(body *models.IPSecPolicyCreate) (*models.IPSecPolicy, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIpsecpoliciesPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postok, err := f.session.Power.PCloudvpnPolicies.PcloudIpsecpoliciesPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateVPNPolicyOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateVPNPolicyOperationFailed, f.cloudInstanceID, err)) } if postok != nil && postok.Payload != nil { return postok.Payload, nil @@ -131,13 +152,16 @@ func (f *IBMPIVpnPolicyClient) CreateIPSecPolicy(body *models.IPSecPolicyCreate) // Update an IPSec Policy func (f *IBMPIVpnPolicyClient) UpdateIPSecPolicy(id string, body *models.IPSecPolicyUpdate) (*models.IPSecPolicy, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIpsecpoliciesPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithIpsecPolicyID(id). WithBody(body) putok, err := f.session.Power.PCloudvpnPolicies.PcloudIpsecpoliciesPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.UpdateVPNPolicyOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.UpdateVPNPolicyOperationFailed, id, err)) } if putok != nil && putok.Payload != nil { return putok.Payload, nil @@ -147,12 +171,15 @@ func (f *IBMPIVpnPolicyClient) UpdateIPSecPolicy(id string, body *models.IPSecPo // Get All IPSec Policies func (f *IBMPIVpnPolicyClient) GetAllIPSecPolicies() (*models.IPSecPolicies, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIpsecpoliciesGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudvpnPolicies.PcloudIpsecpoliciesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to get all ipsec policies: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to get all ipsec policies: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to get all ipsec policies") @@ -162,6 +189,9 @@ func (f *IBMPIVpnPolicyClient) GetAllIPSecPolicies() (*models.IPSecPolicies, err // Delete an IPSec Policy func (f *IBMPIVpnPolicyClient) DeleteIPSecPolicy(id string) error { + if f.session.IsOnPrem() { + return fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_policies.NewPcloudIpsecpoliciesDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithIpsecPolicyID(id) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpn.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpn.go index c3fdd84b685..a886242861e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpn.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-vpn.go @@ -26,12 +26,15 @@ func NewIBMPIVpnConnectionClient(ctx context.Context, sess *ibmpisession.IBMPISe // Get a VPN Connection func (f *IBMPIVpnConnectionClient) Get(id string) (*models.VPNConnection, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id) resp, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.GetVPNConnectionOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetVPNConnectionOperationFailed, id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get VPN Connection %s", id) @@ -41,12 +44,15 @@ func (f *IBMPIVpnConnectionClient) Get(id string) (*models.VPNConnection, error) // Create a VPN Connection func (f *IBMPIVpnConnectionClient) Create(body *models.VPNConnectionCreate) (*models.VPNConnectionCreateResponse, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsPostParams(). WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithBody(body) postaccepted, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsPost(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.CreateVPNConnectionOperationFailed, f.cloudInstanceID, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.CreateVPNConnectionOperationFailed, f.cloudInstanceID, err)) } if postaccepted != nil && postaccepted.Payload != nil { return postaccepted.Payload, nil @@ -56,13 +62,16 @@ func (f *IBMPIVpnConnectionClient) Create(body *models.VPNConnectionCreate) (*mo // Update a VPN Connection func (f *IBMPIVpnConnectionClient) Update(id string, body *models.VPNConnectionUpdate) (*models.VPNConnection, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id). WithBody(body) putok, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.UpdateVPNConnectionOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.UpdateVPNConnectionOperationFailed, id, err)) } if putok != nil && putok.Payload != nil { return putok.Payload, nil @@ -72,12 +81,15 @@ func (f *IBMPIVpnConnectionClient) Update(id string, body *models.VPNConnectionU // Get All VPN Connections func (f *IBMPIVpnConnectionClient) GetAll() (*models.VPNConnections, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsGetallParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID) resp, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsGetall(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get all VPN Connections: %w", err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all VPN Connections: %w", err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get all VPN Connections") @@ -87,12 +99,15 @@ func (f *IBMPIVpnConnectionClient) GetAll() (*models.VPNConnections, error) { // Delete a VPN Connection func (f *IBMPIVpnConnectionClient) Delete(id string) (*models.JobReference, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id) delaccepted, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsDelete(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf(errors.DeleteVPNConnectionOperationFailed, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.DeleteVPNConnectionOperationFailed, id, err)) } if delaccepted != nil && delaccepted.Payload != nil { return delaccepted.Payload, nil @@ -102,12 +117,15 @@ func (f *IBMPIVpnConnectionClient) Delete(id string) (*models.JobReference, erro // Get a VPN Connection's Network func (f *IBMPIVpnConnectionClient) GetNetwork(id string) (*models.NetworkIDs, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsNetworksGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id) resp, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsNetworksGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get Networks for VPN Connection %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get Networks for VPN Connection %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Networks for VPN Connection %s", id) @@ -117,13 +135,16 @@ func (f *IBMPIVpnConnectionClient) GetNetwork(id string) (*models.NetworkIDs, er // Attach a Network to a VPN Connection func (f *IBMPIVpnConnectionClient) AddNetwork(id, networkID string) (*models.JobReference, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsNetworksPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id). WithBody(&models.NetworkID{NetworkID: &networkID}) resp, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsNetworksPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Add Network %s to VPN Connection %s: %w", networkID, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Add Network %s to VPN Connection %s: %w", networkID, id, err)) } if resp != nil && resp.Payload != nil { return resp.Payload, nil @@ -133,13 +154,16 @@ func (f *IBMPIVpnConnectionClient) AddNetwork(id, networkID string) (*models.Job // Detach a Network from a VPN Connection func (f *IBMPIVpnConnectionClient) DeleteNetwork(id, networkID string) (*models.JobReference, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsNetworksDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id). WithBody(&models.NetworkID{NetworkID: &networkID}) resp, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsNetworksDelete(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Delete Network %s from VPN Connection %s: %w", networkID, id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Delete Network %s from VPN Connection %s: %w", networkID, id, err)) } if resp != nil && resp.Payload != nil { return resp.Payload, nil @@ -149,12 +173,15 @@ func (f *IBMPIVpnConnectionClient) DeleteNetwork(id, networkID string) (*models. // Get a VPN Connection's Subnet func (f *IBMPIVpnConnectionClient) GetSubnet(id string) (*models.PeerSubnets, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsPeersubnetsGetParams(). WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id) resp, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsPeersubnetsGet(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Get Subnets from VPN Connection %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get Subnets from VPN Connection %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Get Subnets from VPN Connection %s", id) @@ -164,13 +191,16 @@ func (f *IBMPIVpnConnectionClient) GetSubnet(id string) (*models.PeerSubnets, er // Attach a Subnet to a VPN Connection func (f *IBMPIVpnConnectionClient) AddSubnet(id, subnet string) (*models.PeerSubnets, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsPeersubnetsPutParams(). WithContext(f.ctx).WithTimeout(helpers.PIUpdateTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id). WithBody(&models.PeerSubnetUpdate{Cidr: &subnet}) resp, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsPeersubnetsPut(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Add Subnets to VPN Connection %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Add Subnets to VPN Connection %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Add Subnets to VPN Connection %s", id) @@ -180,13 +210,16 @@ func (f *IBMPIVpnConnectionClient) AddSubnet(id, subnet string) (*models.PeerSub // Detach a Subnet from a VPN Connection func (f *IBMPIVpnConnectionClient) DeleteSubnet(id, subnet string) (*models.PeerSubnets, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } params := p_cloud_v_p_n_connections.NewPcloudVpnconnectionsPeersubnetsDeleteParams(). WithContext(f.ctx).WithTimeout(helpers.PIDeleteTimeOut). WithCloudInstanceID(f.cloudInstanceID).WithVpnConnectionID(id). WithBody(&models.PeerSubnetUpdate{Cidr: &subnet}) resp, err := f.session.Power.PCloudvpnConnections.PcloudVpnconnectionsPeersubnetsDelete(params, f.session.AuthInfo(f.cloudInstanceID)) if err != nil { - return nil, fmt.Errorf("failed to Delete Subnet from VPN Connection %s: %w", id, err) + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Delete Subnet from VPN Connection %s: %w", id, err)) } if resp == nil || resp.Payload == nil { return nil, fmt.Errorf("failed to Delete Subnet from VPN Connection %s", id) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-workspaces.go b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-workspaces.go new file mode 100644 index 00000000000..2630e4a910a --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/clients/instance/ibm-pi-workspaces.go @@ -0,0 +1,56 @@ +package instance + +import ( + "context" + "fmt" + + "github.com/IBM-Cloud/power-go-client/errors" + "github.com/IBM-Cloud/power-go-client/helpers" + "github.com/IBM-Cloud/power-go-client/ibmpisession" + "github.com/IBM-Cloud/power-go-client/power/client/workspaces" + "github.com/IBM-Cloud/power-go-client/power/models" +) + +// IBMPIWorkspacesClient +type IBMPIWorkspacesClient struct { + IBMPIClient +} + +// NewIBMPIWorkspacesClient +func NewIBMPIWorkspacesClient(ctx context.Context, sess *ibmpisession.IBMPISession, cloudInstanceID string) *IBMPIWorkspacesClient { + return &IBMPIWorkspacesClient{ + *NewIBMPIClient(ctx, sess, cloudInstanceID), + } +} + +// Get a workspace +func (f *IBMPIWorkspacesClient) Get(cloudInstanceID string) (*models.Workspace, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := workspaces.NewV1WorkspacesGetParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut).WithWorkspaceID(cloudInstanceID) + resp, err := f.session.Power.Workspaces.V1WorkspacesGet(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf(errors.GetWorkspaceOperationFailed, f.cloudInstanceID, err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get Workspace %s", f.cloudInstanceID) + } + return resp.Payload, nil +} + +// Get all workspaces +func (f *IBMPIWorkspacesClient) GetAll() (*models.Workspaces, error) { + if f.session.IsOnPrem() { + return nil, fmt.Errorf("operation not supported in satellite location, check documentation") + } + params := workspaces.NewV1WorkspacesGetallParams().WithContext(f.ctx).WithTimeout(helpers.PIGetTimeOut) + resp, err := f.session.Power.Workspaces.V1WorkspacesGetall(params, f.session.AuthInfo(f.cloudInstanceID)) + if err != nil { + return nil, ibmpisession.SDKFailWithAPIError(err, fmt.Errorf("failed to Get all Workspaces: %w", err)) + } + if resp == nil || resp.Payload == nil { + return nil, fmt.Errorf("failed to Get all Workspaces") + } + return resp.Payload, nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/errors/errors.go b/vendor/github.com/IBM-Cloud/power-go-client/errors/errors.go index 43b45d56233..502e2dcd439 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/errors/errors.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/errors/errors.go @@ -27,15 +27,15 @@ const DeleteCloudConnectionOperationFailed = "failed to perform Delete Cloud Con const GetVPNConnectionOperationFailed = "failed to perform Get VPN Connection Operation for id %s with error %w" const CreateVPNConnectionOperationFailed = "failed to perform Create VPN Connection Operation for cloud instance %s with error %w" -const UpdateVPNConnectionOperationFailed = "failed to perform Update VPN Connection Operation for id %s with error %w" -const DeleteVPNConnectionOperationFailed = "failed to perform Delete VPN Connection Operation for id %s with error %w" +const UpdateVPNConnectionOperationFailed = "failed to perform Update VPN Connection Operation for id %s with error %w" +const DeleteVPNConnectionOperationFailed = "failed to perform Delete VPN Connection Operation for id %s with error %w" // start of VPN Policy Messages const GetVPNPolicyOperationFailed = "failed to perform Get VPN Policy Operation for Policy id %s with error %w" const CreateVPNPolicyOperationFailed = "failed to perform Create VPN Policy Operation for cloud instance %s with error %w" -const UpdateVPNPolicyOperationFailed = "failed to perform Update VPN Policy Operation for Policy id %s with error %w" -const DeleteVPNPolicyOperationFailed = "failed to perform Delete VPN Policy Operation for Policy id %s with error %w" +const UpdateVPNPolicyOperationFailed = "failed to perform Update VPN Policy Operation for Policy id %s with error %w" +const DeleteVPNPolicyOperationFailed = "failed to perform Delete VPN Policy Operation for Policy id %s with error %w" // start of Job Messages const GetJobOperationFailed = "failed to perform get Job operation for job id %s with error %w" @@ -106,6 +106,25 @@ const GetLiveVolumeGroupDetailsOperationFailed = "failed to Get live details of const VolumeGroupActionOperationFailed = "failed to perform action on volume-group %s for the cloud instance %s with error %w" const GetVolumeGroupRemoteCopyRelationshipsOperationFailed = "failed to Get remote copy relationships of the volumes belonging to volume group %s for the cloud instance %s with error %w" +// start of Shared processor pool Messages +const GetSharedProcessorPoolOperationFailed = "failed to perform Get Shared Processor Pool Operation for pool %s with error %w" +const CreateSharedProcessorPoolOperationFailed = "failed to perform Create Shared Processor Pool Operation for cloud instance %s with error %w" +const DeleteSharedProcessorPoolOperationFailed = "failed to perform Delete Shared Processor Pool Operation for pool %s with error %w" +const UpdateSharedProcessorPoolOperationFailed = "failed to perform Update Shared Processor Pool Operation for pool %s with error %w" + +// start of Shared processor pool placement group Messages +const GetSPPPlacementGroupOperationFailed = "failed to perform Get Shared Processor Pool Placement Group Operation for placement group %s with error %w" +const CreateSPPPlacementGroupOperationFailed = "failed to perform Create Shared Processor Pool Placement Group Operation for cloud instance %s with error %w" +const DeleteSPPPlacementGroupOperationFailed = "failed to perform Delete Shared Processor Pool Placement Group Operation for placement group %s with error %w" +const AddMemberSPPPlacementGroupOperationFailed = "failed to perform Add Member Operation for pool %s and shared processor pool placement group %s with error %w" +const DeleteMemberSPPPlacementGroupOperationFailed = "failed to perform Delete Member Operation for pool %s and shared processor pool placement group %s with error %w" + +// start of workspaces +const GetWorkspaceOperationFailed = "failed to perform Get Workspace Operation for id %s with error %w" + +// Datacenter +const GetDatacenterOperationFailed = "failed to perform Get Datacenter Operation for id %s with error %w" + // ErrorTarget ... type ErrorTarget struct { Name string diff --git a/vendor/github.com/IBM-Cloud/power-go-client/helpers/constants.go b/vendor/github.com/IBM-Cloud/power-go-client/helpers/constants.go index 5438c30fb92..dd8ce6ef2b1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/helpers/constants.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/helpers/constants.go @@ -4,7 +4,6 @@ import "time" const ( // IBM PI Instance - PIInstanceName = "pi_instance_name" PIInstanceDate = "pi_creation_date" PIInstanceSSHKeyName = "pi_key_pair_name" @@ -37,14 +36,13 @@ const ( PIInstanceStoragePool = "pi_instance_storage_pool" PIInstanceStorageAffinityPool = "pi_instance_storage_affinity_pool" PIInstanceLicenseRepositoryCapacity = "pi_license_repository_capacity" - - PIInstanceHealthStatus = "pi_health_status" - PIInstanceReplicants = "pi_replicants" - PIInstanceReplicationPolicy = "pi_replication_policy" - PIInstanceReplicationScheme = "pi_replication_scheme" - PIInstanceProgress = "pi_progress" - PIInstanceUserData = "pi_user_data" - PIInstancePinPolicy = "pi_pin_policy" + PIInstanceHealthStatus = "pi_health_status" + PIInstanceReplicants = "pi_replicants" + PIInstanceReplicationPolicy = "pi_replication_policy" + PIInstanceReplicationScheme = "pi_replication_scheme" + PIInstanceProgress = "pi_progress" + PIInstanceUserData = "pi_user_data" + PIInstancePinPolicy = "pi_pin_policy" // IBM PI Volume PIVolumeName = "pi_volume_name" @@ -67,7 +65,6 @@ const ( PIReplicationEnabled = "pi_replication_enabled" // IBM PI Snapshots - PISnapshot = "pi_snap_shot_id" PISnapshotName = "pi_snap_shot_name" PISnapshotStatus = "pi_snap_shot_status" @@ -75,10 +72,10 @@ const ( PISnapshotComplete = "pi_snap_shot_complete" // IBM PI SAP Profile - - PISAPProfileID = "pi_sap_profile_id" - PISAPProfile = "pi_sap_profile" - PISAPProfileMemory = "pi_sap_profile_memory" + PISAPProfileID = "pi_sap_profile_id" + PISAPProfile = "pi_sap_profile" + PISAPProfileMemory = "pi_sap_profile_memory" + //#nosec G101 PISAPProfileCertified = "pi_sap_profile_certified" PISAPProfileType = "pi_sap_profile_type" PISAPProfileCores = "pi_sap_profile_cores" @@ -89,7 +86,6 @@ const ( PIVolumeCloneFailure = "pi_volume_clone_failure" // IBM PI Image - PIImageName = "pi_image_name" PIImageId = "pi_image_id" PIImageAccessKey = "pi_image_access_key" @@ -107,25 +103,26 @@ const ( PIImageOsType = "pi_image_os_type" // IBM PI Key - PIKeyName = "pi_key_name" PIKey = "pi_ssh_key" PIKeyDate = "pi_creation_date" PIKeyId = "pi_key_id" // IBM PI Network - - PINetworkReady = "ready" - PINetworkID = "pi_networkid" - PINetworkName = "pi_network_name" - PINetworkCidr = "pi_cidr" - PINetworkDNS = "pi_dns" - PINetworkType = "pi_network_type" - PINetworkGateway = "pi_gateway" - PINetworkIPAddressRange = "pi_ipaddress_range" - PINetworkVlanId = "pi_vlan_id" - PINetworkProvisioning = "build" - PINetworkJumbo = "pi_network_jumbo" + PINetworkReady = "ready" + PINetworkID = "pi_networkid" + PINetworkName = "pi_network_name" + PINetworkCidr = "pi_cidr" + PINetworkDNS = "pi_dns" + PINetworkType = "pi_network_type" + PINetworkGateway = "pi_gateway" + PINetworkIPAddressRange = "pi_ipaddress_range" + PINetworkVlanId = "pi_vlan_id" + PINetworkProvisioning = "build" + PINetworkJumbo = "pi_network_jumbo" + PINetworkMtu = "pi_network_mtu" + //#nosec G101 + PINetworkAccessConfig = "pi_network_access_config" PINetworkPortDescription = "pi_network_port_description" PINetworkPortIPAddress = "pi_network_port_ipaddress" PINetworkPortMacAddress = "pi_network_port_macaddress" @@ -156,7 +153,6 @@ const ( PIInstanceCaptureCloudStorageSecretKey = "pi_capture_cloud_storage_secret_key" // IBM PI Cloud Connections - PICloudConnectionName = "pi_cloud_connection_name" PICloudConnectionStatus = "pi_cloud_connection_status" PICloudConnectionMetered = "pi_cloud_connection_metered" @@ -178,16 +174,16 @@ const ( PICloudConnectionVPCName = "pi_cloud_connection_vpc_name" // IBM PI VPN Connections - - PIVPNConnectionName = "pi_vpn_connection_name" - PIVPNConnectionId = "pi_vpn_connection_id" - PIVPNIKEPolicyId = "pi_ike_policy_id" - PIVPNIPSecPolicyId = "pi_ipsec_policy_id" - PIVPNConnectionLocalGatewayAddress = "pi_local_gateway_address" - PIVPNConnectionMode = "pi_vpn_connection_mode" - PIVPNConnectionNetworks = "pi_networks" - PIVPNConnectionPeerGatewayAddress = "pi_peer_gateway_address" - PIVPNConnectionPeerSubnets = "pi_peer_subnets" + PIVPNConnectionName = "pi_vpn_connection_name" + PIVPNConnectionId = "pi_vpn_connection_id" + PIVPNIKEPolicyId = "pi_ike_policy_id" + PIVPNIPSecPolicyId = "pi_ipsec_policy_id" + PIVPNConnectionLocalGatewayAddress = "pi_local_gateway_address" + PIVPNConnectionMode = "pi_vpn_connection_mode" + PIVPNConnectionNetworks = "pi_networks" + PIVPNConnectionPeerGatewayAddress = "pi_peer_gateway_address" + PIVPNConnectionPeerSubnets = "pi_peer_subnets" + //#nosec G101 PIVPNConnectionStatus = "pi_vpn_connection_status" PIVPNConnectionVpnGatewayAddress = "pi_gateway_address" PIVPNConnectionDeadPeerDetection = "pi_dead_peer_detections" @@ -223,13 +219,11 @@ const ( PIDhcpInstanceMac = "pi_dhcp_instance_mac" // IBM PI Placement Groups - PIPlacementGroupName = "pi_placement_group_name" PIPlacementGroupPolicy = "pi_placement_group_policy" PIPlacementGroupID = "pi_placement_group_id" // Status For all the resources - PIVolumeDeleting = "deleting" PIVolumeDeleted = "done" PIVolumeProvisioning = "creating" @@ -243,10 +237,12 @@ const ( PIImageQueStatus = "queued" PIImageActiveStatus = "active" - //Timeout values for Power VS - - + // Timeout values for Power VS - PICreateTimeOut = 5 * time.Minute PIUpdateTimeOut = 5 * time.Minute PIDeleteTimeOut = 3 * time.Minute PIGetTimeOut = 2 * time.Minute + + // Stratos region prefix + PIStratosRegionPrefix = "satloc" ) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/helpers/env.go b/vendor/github.com/IBM-Cloud/power-go-client/helpers/env.go index ede87cc0c7f..fee94e8b045 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/helpers/env.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/helpers/env.go @@ -2,7 +2,7 @@ package helpers import "os" -//EnvFallBack ... +// EnvFallBack ... func EnvFallBack(envs []string, defaultValue string) string { for _, k := range envs { if v := os.Getenv(k); v != "" { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/session.go b/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/session.go index f62f09e1cb7..5389d38bf42 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/session.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/session.go @@ -124,3 +124,8 @@ func (s *IBMPISession) AuthInfo(cloudInstanceID string) runtime.ClientAuthInfoWr return r.SetHeaderParam("CRN", fmt.Sprintf(s.CRNFormat, cloudInstanceID)) }) } + +// IsOnPrem returns true if the operation is being done on premise (at a satellite region) +func (s *IBMPISession) IsOnPrem() bool { + return strings.Contains(s.Options.Zone, helpers.PIStratosRegionPrefix) +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/utils.go b/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/utils.go index 2382b698962..2c081f271f4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/utils.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/ibmpisession/utils.go @@ -37,14 +37,19 @@ func fetchAuthorizationData(a core.Authenticator) (string, error) { // Usage: // `crn := fmt.Sprintf(crnBuilder(useraccount, regionZone, host), )` func crnBuilder(useraccount, zone, host string) string { + // TODO: after combined services, review this code to remove ppc-aas references var service string - if strings.Contains(host, ".power-iaas.cloud.ibm.com") { + if strings.Contains(host, ".power-iaas.cloud.ibm.com") || strings.Contains(host, ".ppc-aas.cloud.ibm.com") { service = "bluemix" } else { service = "staging" } - crn := fmt.Sprintf("crn:v1:%s:public:power-iaas:%s:a/%s:", service, zone, useraccount) - return crn + "%s::" + + // Return crn + if strings.Contains(host, "ppc-aas") { + return fmt.Sprintf("crn:v1:%s:public:ppc-aas:%s:a/%s:", service, zone, useraccount) + "%s::" + } + return fmt.Sprintf("crn:v1:%s:public:power-iaas:%s:a/%s:", service, zone, useraccount) + "%s::" } func powerJSONConsumer() runtime.Consumer { @@ -63,7 +68,10 @@ func powerJSONConsumer() runtime.Consumer { // getPIClient generates a PowerIaas client func getPIClient(debug bool, host string, scheme string) *client.PowerIaasAPI { - http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: false} + http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{ + InsecureSkipVerify: false, + MinVersion: tls.VersionTLS12, + } if scheme == "" { scheme = SCHEME_HTTPS } @@ -88,3 +96,13 @@ func costructRegionFromZone(zone string) string { reg, _ := regexp.Compile(regex) return reg.ReplaceAllString(zone, "") } + +// SDKFailWithAPIError returns a custom error message if a HTTP error response 500 or greater is found +func SDKFailWithAPIError(err error, origErr error) error { + if apierr, ok := err.(*runtime.APIError); ok { + if apierr.Code >= 500 { + return fmt.Errorf("error: %w The server has encountered an unexpected error and is unable to fulfill the request", err) + } + } + return origErr +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/authentication_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/authentication_client.go index 2e9c3f96bf2..33f0e02856e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/authentication_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/authentication_client.go @@ -54,7 +54,7 @@ type ClientService interface { } /* - ServiceBrokerAuthCallback returns an access token and set cookie +ServiceBrokerAuthCallback returns an access token and set cookie */ func (a *Client) ServiceBrokerAuthCallback(params *ServiceBrokerAuthCallbackParams, opts ...ClientOption) (*ServiceBrokerAuthCallbackOK, error) { // TODO: Validate the params before sending @@ -92,7 +92,7 @@ func (a *Client) ServiceBrokerAuthCallback(params *ServiceBrokerAuthCallbackPara } /* - ServiceBrokerAuthDeviceCodePost requests a authorization device code +ServiceBrokerAuthDeviceCodePost requests a authorization device code */ func (a *Client) ServiceBrokerAuthDeviceCodePost(params *ServiceBrokerAuthDeviceCodePostParams, opts ...ClientOption) (*ServiceBrokerAuthDeviceCodePostOK, error) { // TODO: Validate the params before sending @@ -130,7 +130,7 @@ func (a *Client) ServiceBrokerAuthDeviceCodePost(params *ServiceBrokerAuthDevice } /* - ServiceBrokerAuthDeviceTokenPost polls for authorization device token +ServiceBrokerAuthDeviceTokenPost polls for authorization device token */ func (a *Client) ServiceBrokerAuthDeviceTokenPost(params *ServiceBrokerAuthDeviceTokenPostParams, opts ...ClientOption) (*ServiceBrokerAuthDeviceTokenPostOK, error) { // TODO: Validate the params before sending @@ -168,7 +168,7 @@ func (a *Client) ServiceBrokerAuthDeviceTokenPost(params *ServiceBrokerAuthDevic } /* - ServiceBrokerAuthInfoToken information about current access token +ServiceBrokerAuthInfoToken information about current access token */ func (a *Client) ServiceBrokerAuthInfoToken(params *ServiceBrokerAuthInfoTokenParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerAuthInfoTokenOK, error) { // TODO: Validate the params before sending @@ -207,7 +207,7 @@ func (a *Client) ServiceBrokerAuthInfoToken(params *ServiceBrokerAuthInfoTokenPa } /* - ServiceBrokerAuthInfoUser information about current user +ServiceBrokerAuthInfoUser information about current user */ func (a *Client) ServiceBrokerAuthInfoUser(params *ServiceBrokerAuthInfoUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerAuthInfoUserOK, error) { // TODO: Validate the params before sending @@ -246,7 +246,7 @@ func (a *Client) ServiceBrokerAuthInfoUser(params *ServiceBrokerAuthInfoUserPara } /* - ServiceBrokerAuthLogin logins +ServiceBrokerAuthLogin logins */ func (a *Client) ServiceBrokerAuthLogin(params *ServiceBrokerAuthLoginParams, opts ...ClientOption) (*ServiceBrokerAuthLoginOK, error) { // TODO: Validate the params before sending @@ -284,7 +284,7 @@ func (a *Client) ServiceBrokerAuthLogin(params *ServiceBrokerAuthLoginParams, op } /* - ServiceBrokerAuthLogout logouts +ServiceBrokerAuthLogout logouts */ func (a *Client) ServiceBrokerAuthLogout(params *ServiceBrokerAuthLogoutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerAuthLogoutOK, error) { // TODO: Validate the params before sending @@ -323,7 +323,7 @@ func (a *Client) ServiceBrokerAuthLogout(params *ServiceBrokerAuthLogoutParams, } /* - ServiceBrokerAuthRegistration registrations of a new tenant and login +ServiceBrokerAuthRegistration registrations of a new tenant and login */ func (a *Client) ServiceBrokerAuthRegistration(params *ServiceBrokerAuthRegistrationParams, opts ...ClientOption) (*ServiceBrokerAuthRegistrationOK, error) { // TODO: Validate the params before sending @@ -361,7 +361,7 @@ func (a *Client) ServiceBrokerAuthRegistration(params *ServiceBrokerAuthRegistra } /* - ServiceBrokerAuthRegistrationCallback associates the user with a tenant and returns an access token +ServiceBrokerAuthRegistrationCallback associates the user with a tenant and returns an access token */ func (a *Client) ServiceBrokerAuthRegistrationCallback(params *ServiceBrokerAuthRegistrationCallbackParams, opts ...ClientOption) (*ServiceBrokerAuthRegistrationCallbackOK, error) { // TODO: Validate the params before sending @@ -399,7 +399,7 @@ func (a *Client) ServiceBrokerAuthRegistrationCallback(params *ServiceBrokerAuth } /* - ServiceBrokerAuthTokenPost requests a new token from a refresh token +ServiceBrokerAuthTokenPost requests a new token from a refresh token */ func (a *Client) ServiceBrokerAuthTokenPost(params *ServiceBrokerAuthTokenPostParams, opts ...ClientOption) (*ServiceBrokerAuthTokenPostOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_parameters.go index 7c2aaa3c94a..3e884e286c5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerAuthCallbackParamsWithHTTPClient(client *http.Client) *Serv } } -/* ServiceBrokerAuthCallbackParams contains all the parameters to send to the API endpoint - for the service broker auth callback operation. +/* +ServiceBrokerAuthCallbackParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth callback operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthCallbackParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_responses.go index b48acc24a3e..94ed66f14bd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_callback_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -42,7 +60,7 @@ func (o *ServiceBrokerAuthCallbackReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /auth/v1/callback] serviceBroker.auth.callback", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewServiceBrokerAuthCallbackOK() *ServiceBrokerAuthCallbackOK { return &ServiceBrokerAuthCallbackOK{} } -/* ServiceBrokerAuthCallbackOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthCallbackOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type ServiceBrokerAuthCallbackOK struct { Payload *models.AccessToken } +// IsSuccess returns true when this service broker auth callback o k response has a 2xx status code +func (o *ServiceBrokerAuthCallbackOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth callback o k response has a 3xx status code +func (o *ServiceBrokerAuthCallbackOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth callback o k response has a 4xx status code +func (o *ServiceBrokerAuthCallbackOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth callback o k response has a 5xx status code +func (o *ServiceBrokerAuthCallbackOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth callback o k response a status code equal to that given +func (o *ServiceBrokerAuthCallbackOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth callback o k response +func (o *ServiceBrokerAuthCallbackOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthCallbackOK) Error() string { return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthCallbackOK) String() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthCallbackOK) GetPayload() *models.AccessToken { return o.Payload } @@ -78,12 +132,81 @@ 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{} } -/* ServiceBrokerAuthCallbackUnauthorized describes a response with status code 401, with default header values. +/* +ServiceBrokerAuthCallbackUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -91,9 +214,44 @@ type ServiceBrokerAuthCallbackUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth callback unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthCallbackUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth callback unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthCallbackUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth callback unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthCallbackUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth callback unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthCallbackUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth callback unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthCallbackUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth callback unauthorized response +func (o *ServiceBrokerAuthCallbackUnauthorized) Code() int { + return 401 +} + func (o *ServiceBrokerAuthCallbackUnauthorized) Error() string { return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackUnauthorized %+v", 401, o.Payload) } + +func (o *ServiceBrokerAuthCallbackUnauthorized) String() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackUnauthorized %+v", 401, o.Payload) +} + func (o *ServiceBrokerAuthCallbackUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -110,12 +268,149 @@ 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{} } -/* ServiceBrokerAuthCallbackInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthCallbackInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +418,44 @@ type ServiceBrokerAuthCallbackInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth callback internal server error response has a 2xx status code +func (o *ServiceBrokerAuthCallbackInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth callback internal server error response has a 3xx status code +func (o *ServiceBrokerAuthCallbackInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth callback internal server error response has a 4xx status code +func (o *ServiceBrokerAuthCallbackInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth callback internal server error response has a 5xx status code +func (o *ServiceBrokerAuthCallbackInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth callback internal server error response a status code equal to that given +func (o *ServiceBrokerAuthCallbackInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth callback internal server error response +func (o *ServiceBrokerAuthCallbackInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthCallbackInternalServerError) Error() string { return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthCallbackInternalServerError) String() string { + return fmt.Sprintf("[GET /auth/v1/callback][%d] serviceBrokerAuthCallbackInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthCallbackInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_parameters.go index ad621b60a2e..a6046d34c7b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerAuthDeviceCodePostParamsWithHTTPClient(client *http.Client) } } -/* ServiceBrokerAuthDeviceCodePostParams contains all the parameters to send to the API endpoint - for the service broker auth device code post operation. +/* +ServiceBrokerAuthDeviceCodePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth device code post operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthDeviceCodePostParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_responses.go index b0d31f0b39c..6834f289b71 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_code_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -42,7 +60,7 @@ func (o *ServiceBrokerAuthDeviceCodePostReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /auth/v1/device/code] serviceBroker.auth.device.code.post", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewServiceBrokerAuthDeviceCodePostOK() *ServiceBrokerAuthDeviceCodePostOK { return &ServiceBrokerAuthDeviceCodePostOK{} } -/* ServiceBrokerAuthDeviceCodePostOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthDeviceCodePostOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type ServiceBrokerAuthDeviceCodePostOK struct { Payload *models.DeviceCode } +// IsSuccess returns true when this service broker auth device code post o k response has a 2xx status code +func (o *ServiceBrokerAuthDeviceCodePostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth device code post o k response has a 3xx status code +func (o *ServiceBrokerAuthDeviceCodePostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device code post o k response has a 4xx status code +func (o *ServiceBrokerAuthDeviceCodePostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth device code post o k response has a 5xx status code +func (o *ServiceBrokerAuthDeviceCodePostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device code post o k response a status code equal to that given +func (o *ServiceBrokerAuthDeviceCodePostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth device code post o k response +func (o *ServiceBrokerAuthDeviceCodePostOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthDeviceCodePostOK) Error() string { return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthDeviceCodePostOK) String() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthDeviceCodePostOK) GetPayload() *models.DeviceCode { return o.Payload } @@ -78,22 +132,194 @@ 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{} } -/* ServiceBrokerAuthDeviceCodePostForbidden describes a response with status code 403, with default header values. +/* +ServiceBrokerAuthDeviceCodePostForbidden describes a response with status code 403, with default header values. -Quota exceeded +Forbidden */ type ServiceBrokerAuthDeviceCodePostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth device code post forbidden response has a 2xx status code +func (o *ServiceBrokerAuthDeviceCodePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device code post forbidden response has a 3xx status code +func (o *ServiceBrokerAuthDeviceCodePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device code post forbidden response has a 4xx status code +func (o *ServiceBrokerAuthDeviceCodePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device code post forbidden response has a 5xx status code +func (o *ServiceBrokerAuthDeviceCodePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device code post forbidden response a status code equal to that given +func (o *ServiceBrokerAuthDeviceCodePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth device code post forbidden response +func (o *ServiceBrokerAuthDeviceCodePostForbidden) Code() int { + return 403 +} + func (o *ServiceBrokerAuthDeviceCodePostForbidden) Error() string { return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostForbidden %+v", 403, o.Payload) } + +func (o *ServiceBrokerAuthDeviceCodePostForbidden) String() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostForbidden %+v", 403, o.Payload) +} + func (o *ServiceBrokerAuthDeviceCodePostForbidden) GetPayload() *models.Error { return o.Payload } @@ -110,12 +336,81 @@ 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{} } -/* ServiceBrokerAuthDeviceCodePostInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthDeviceCodePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +418,44 @@ type ServiceBrokerAuthDeviceCodePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth device code post internal server error response has a 2xx status code +func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device code post internal server error response has a 3xx status code +func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device code post internal server error response has a 4xx status code +func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth device code post internal server error response has a 5xx status code +func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth device code post internal server error response a status code equal to that given +func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth device code post internal server error response +func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) Error() string { return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) String() string { + return fmt.Sprintf("[POST /auth/v1/device/code][%d] serviceBrokerAuthDeviceCodePostInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthDeviceCodePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_parameters.go index ab928c9a224..0d9bc3eac4b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerAuthDeviceTokenPostParamsWithHTTPClient(client *http.Client } } -/* ServiceBrokerAuthDeviceTokenPostParams contains all the parameters to send to the API endpoint - for the service broker auth device token post operation. +/* +ServiceBrokerAuthDeviceTokenPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth device token post operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthDeviceTokenPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_responses.go index f9579f5c6c4..1fe6d724f3f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_device_token_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -56,7 +68,7 @@ func (o *ServiceBrokerAuthDeviceTokenPostReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /auth/v1/device/token] serviceBroker.auth.device.token.post", response, response.Code()) } } @@ -65,7 +77,8 @@ func NewServiceBrokerAuthDeviceTokenPostOK() *ServiceBrokerAuthDeviceTokenPostOK return &ServiceBrokerAuthDeviceTokenPostOK{} } -/* ServiceBrokerAuthDeviceTokenPostOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthDeviceTokenPostOK describes a response with status code 200, with default header values. OK */ @@ -73,9 +86,44 @@ type ServiceBrokerAuthDeviceTokenPostOK struct { Payload *models.Token } +// IsSuccess returns true when this service broker auth device token post o k response has a 2xx status code +func (o *ServiceBrokerAuthDeviceTokenPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth device token post o k response has a 3xx status code +func (o *ServiceBrokerAuthDeviceTokenPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device token post o k response has a 4xx status code +func (o *ServiceBrokerAuthDeviceTokenPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth device token post o k response has a 5xx status code +func (o *ServiceBrokerAuthDeviceTokenPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device token post o k response a status code equal to that given +func (o *ServiceBrokerAuthDeviceTokenPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth device token post o k response +func (o *ServiceBrokerAuthDeviceTokenPostOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthDeviceTokenPostOK) Error() string { return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthDeviceTokenPostOK) String() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthDeviceTokenPostOK) GetPayload() *models.Token { return o.Payload } @@ -97,17 +145,53 @@ func NewServiceBrokerAuthDeviceTokenPostBadRequest() *ServiceBrokerAuthDeviceTok return &ServiceBrokerAuthDeviceTokenPostBadRequest{} } -/* ServiceBrokerAuthDeviceTokenPostBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerAuthDeviceTokenPostBadRequest describes a response with status code 400, with default header values. -Authorization pending +Bad Request */ type ServiceBrokerAuthDeviceTokenPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth device token post bad request response has a 2xx status code +func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device token post bad request response has a 3xx status code +func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device token post bad request response has a 4xx status code +func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device token post bad request response has a 5xx status code +func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device token post bad request response a status code equal to that given +func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth device token post bad request response +func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) Error() string { return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) String() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerAuthDeviceTokenPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -124,22 +208,126 @@ 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{} } -/* ServiceBrokerAuthDeviceTokenPostForbidden describes a response with status code 403, with default header values. +/* +ServiceBrokerAuthDeviceTokenPostForbidden describes a response with status code 403, with default header values. -User refused grant +Forbidden */ type ServiceBrokerAuthDeviceTokenPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth device token post forbidden response has a 2xx status code +func (o *ServiceBrokerAuthDeviceTokenPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device token post forbidden response has a 3xx status code +func (o *ServiceBrokerAuthDeviceTokenPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device token post forbidden response has a 4xx status code +func (o *ServiceBrokerAuthDeviceTokenPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device token post forbidden response has a 5xx status code +func (o *ServiceBrokerAuthDeviceTokenPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device token post forbidden response a status code equal to that given +func (o *ServiceBrokerAuthDeviceTokenPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth device token post forbidden response +func (o *ServiceBrokerAuthDeviceTokenPostForbidden) Code() int { + return 403 +} + func (o *ServiceBrokerAuthDeviceTokenPostForbidden) Error() string { return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostForbidden %+v", 403, o.Payload) } + +func (o *ServiceBrokerAuthDeviceTokenPostForbidden) String() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostForbidden %+v", 403, o.Payload) +} + func (o *ServiceBrokerAuthDeviceTokenPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -156,12 +344,81 @@ 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{} } -/* ServiceBrokerAuthDeviceTokenPostTooManyRequests describes a response with status code 429, with default header values. +/* +ServiceBrokerAuthDeviceTokenPostTooManyRequests describes a response with status code 429, with default header values. Polling too frequently */ @@ -169,9 +426,44 @@ type ServiceBrokerAuthDeviceTokenPostTooManyRequests struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth device token post too many requests response has a 2xx status code +func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device token post too many requests response has a 3xx status code +func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device token post too many requests response has a 4xx status code +func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth device token post too many requests response has a 5xx status code +func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth device token post too many requests response a status code equal to that given +func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the service broker auth device token post too many requests response +func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) Code() int { + return 429 +} + func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) Error() string { return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostTooManyRequests %+v", 429, o.Payload) } + +func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) String() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostTooManyRequests %+v", 429, o.Payload) +} + func (o *ServiceBrokerAuthDeviceTokenPostTooManyRequests) GetPayload() *models.Error { return o.Payload } @@ -193,7 +485,8 @@ func NewServiceBrokerAuthDeviceTokenPostInternalServerError() *ServiceBrokerAuth return &ServiceBrokerAuthDeviceTokenPostInternalServerError{} } -/* ServiceBrokerAuthDeviceTokenPostInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthDeviceTokenPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -201,9 +494,44 @@ type ServiceBrokerAuthDeviceTokenPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth device token post internal server error response has a 2xx status code +func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth device token post internal server error response has a 3xx status code +func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth device token post internal server error response has a 4xx status code +func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth device token post internal server error response has a 5xx status code +func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth device token post internal server error response a status code equal to that given +func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth device token post internal server error response +func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) Error() string { return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) String() string { + return fmt.Sprintf("[POST /auth/v1/device/token][%d] serviceBrokerAuthDeviceTokenPostInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) GetPayload() *models.Error { return o.Payload } @@ -220,7 +548,8 @@ func (o *ServiceBrokerAuthDeviceTokenPostInternalServerError) readResponse(respo return nil } -/*ServiceBrokerAuthDeviceTokenPostBody service broker auth device token post body +/* +ServiceBrokerAuthDeviceTokenPostBody service broker auth device token post body swagger:model ServiceBrokerAuthDeviceTokenPostBody */ type ServiceBrokerAuthDeviceTokenPostBody struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_parameters.go index 8bd091b80af..33c025cead8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerAuthInfoTokenParamsWithHTTPClient(client *http.Client) *Ser } } -/* ServiceBrokerAuthInfoTokenParams contains all the parameters to send to the API endpoint - for the service broker auth info token operation. +/* +ServiceBrokerAuthInfoTokenParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth info token operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthInfoTokenParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_responses.go index 5c38010ddb9..36886cd2912 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_token_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -36,7 +60,7 @@ func (o *ServiceBrokerAuthInfoTokenReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /auth/v1/info/token] serviceBroker.auth.info.token", response, response.Code()) } } @@ -45,7 +69,8 @@ func NewServiceBrokerAuthInfoTokenOK() *ServiceBrokerAuthInfoTokenOK { return &ServiceBrokerAuthInfoTokenOK{} } -/* ServiceBrokerAuthInfoTokenOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthInfoTokenOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +78,44 @@ type ServiceBrokerAuthInfoTokenOK struct { Payload *models.TokenExtra } +// IsSuccess returns true when this service broker auth info token o k response has a 2xx status code +func (o *ServiceBrokerAuthInfoTokenOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth info token o k response has a 3xx status code +func (o *ServiceBrokerAuthInfoTokenOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info token o k response has a 4xx status code +func (o *ServiceBrokerAuthInfoTokenOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth info token o k response has a 5xx status code +func (o *ServiceBrokerAuthInfoTokenOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info token o k response a status code equal to that given +func (o *ServiceBrokerAuthInfoTokenOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth info token o k response +func (o *ServiceBrokerAuthInfoTokenOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthInfoTokenOK) Error() string { return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthInfoTokenOK) String() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthInfoTokenOK) GetPayload() *models.TokenExtra { return o.Payload } @@ -72,12 +132,285 @@ 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{} } -/* ServiceBrokerAuthInfoTokenInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthInfoTokenInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -85,9 +418,44 @@ type ServiceBrokerAuthInfoTokenInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth info token internal server error response has a 2xx status code +func (o *ServiceBrokerAuthInfoTokenInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info token internal server error response has a 3xx status code +func (o *ServiceBrokerAuthInfoTokenInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info token internal server error response has a 4xx status code +func (o *ServiceBrokerAuthInfoTokenInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth info token internal server error response has a 5xx status code +func (o *ServiceBrokerAuthInfoTokenInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth info token internal server error response a status code equal to that given +func (o *ServiceBrokerAuthInfoTokenInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth info token internal server error response +func (o *ServiceBrokerAuthInfoTokenInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthInfoTokenInternalServerError) Error() string { return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthInfoTokenInternalServerError) String() string { + return fmt.Sprintf("[GET /auth/v1/info/token][%d] serviceBrokerAuthInfoTokenInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthInfoTokenInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_parameters.go index 400cfced998..ce2d0697ddd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerAuthInfoUserParamsWithHTTPClient(client *http.Client) *Serv } } -/* ServiceBrokerAuthInfoUserParams contains all the parameters to send to the API endpoint - for the service broker auth info user operation. +/* +ServiceBrokerAuthInfoUserParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth info user operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthInfoUserParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_responses.go index c8a412dff77..5fffd210421 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_info_user_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -36,7 +60,7 @@ func (o *ServiceBrokerAuthInfoUserReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /auth/v1/info/user] serviceBroker.auth.info.user", response, response.Code()) } } @@ -45,7 +69,8 @@ func NewServiceBrokerAuthInfoUserOK() *ServiceBrokerAuthInfoUserOK { return &ServiceBrokerAuthInfoUserOK{} } -/* ServiceBrokerAuthInfoUserOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthInfoUserOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +78,44 @@ type ServiceBrokerAuthInfoUserOK struct { Payload *models.UserInfo } +// IsSuccess returns true when this service broker auth info user o k response has a 2xx status code +func (o *ServiceBrokerAuthInfoUserOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth info user o k response has a 3xx status code +func (o *ServiceBrokerAuthInfoUserOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info user o k response has a 4xx status code +func (o *ServiceBrokerAuthInfoUserOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth info user o k response has a 5xx status code +func (o *ServiceBrokerAuthInfoUserOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth info user o k response a status code equal to that given +func (o *ServiceBrokerAuthInfoUserOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth info user o k response +func (o *ServiceBrokerAuthInfoUserOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthInfoUserOK) Error() string { return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthInfoUserOK) String() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthInfoUserOK) GetPayload() *models.UserInfo { return o.Payload } @@ -72,12 +132,285 @@ 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{} } -/* ServiceBrokerAuthInfoUserInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthInfoUserInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -85,9 +418,44 @@ type ServiceBrokerAuthInfoUserInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth info user internal server error response has a 2xx status code +func (o *ServiceBrokerAuthInfoUserInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth info user internal server error response has a 3xx status code +func (o *ServiceBrokerAuthInfoUserInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth info user internal server error response has a 4xx status code +func (o *ServiceBrokerAuthInfoUserInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth info user internal server error response has a 5xx status code +func (o *ServiceBrokerAuthInfoUserInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth info user internal server error response a status code equal to that given +func (o *ServiceBrokerAuthInfoUserInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth info user internal server error response +func (o *ServiceBrokerAuthInfoUserInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthInfoUserInternalServerError) Error() string { return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthInfoUserInternalServerError) String() string { + return fmt.Sprintf("[GET /auth/v1/info/user][%d] serviceBrokerAuthInfoUserInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthInfoUserInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_parameters.go index 821c5a04197..9d582be1c15 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerAuthLoginParamsWithHTTPClient(client *http.Client) *Service } } -/* ServiceBrokerAuthLoginParams contains all the parameters to send to the API endpoint - for the service broker auth login operation. +/* +ServiceBrokerAuthLoginParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth login operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthLoginParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_responses.go index 0372c622fbb..7500d6e11b8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_login_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -42,7 +60,7 @@ func (o *ServiceBrokerAuthLoginReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /auth/v1/login] serviceBroker.auth.login", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewServiceBrokerAuthLoginOK() *ServiceBrokerAuthLoginOK { return &ServiceBrokerAuthLoginOK{} } -/* ServiceBrokerAuthLoginOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthLoginOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type ServiceBrokerAuthLoginOK struct { Payload *models.AccessToken } +// IsSuccess returns true when this service broker auth login o k response has a 2xx status code +func (o *ServiceBrokerAuthLoginOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth login o k response has a 3xx status code +func (o *ServiceBrokerAuthLoginOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth login o k response has a 4xx status code +func (o *ServiceBrokerAuthLoginOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth login o k response has a 5xx status code +func (o *ServiceBrokerAuthLoginOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth login o k response a status code equal to that given +func (o *ServiceBrokerAuthLoginOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth login o k response +func (o *ServiceBrokerAuthLoginOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthLoginOK) Error() string { return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthLoginOK) String() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthLoginOK) GetPayload() *models.AccessToken { return o.Payload } @@ -78,12 +132,81 @@ 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{} } -/* ServiceBrokerAuthLoginUnauthorized describes a response with status code 401, with default header values. +/* +ServiceBrokerAuthLoginUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -91,9 +214,44 @@ type ServiceBrokerAuthLoginUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth login unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthLoginUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth login unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthLoginUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth login unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthLoginUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth login unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthLoginUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth login unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthLoginUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth login unauthorized response +func (o *ServiceBrokerAuthLoginUnauthorized) Code() int { + return 401 +} + func (o *ServiceBrokerAuthLoginUnauthorized) Error() string { return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginUnauthorized %+v", 401, o.Payload) } + +func (o *ServiceBrokerAuthLoginUnauthorized) String() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginUnauthorized %+v", 401, o.Payload) +} + func (o *ServiceBrokerAuthLoginUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -110,12 +268,149 @@ 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{} } -/* ServiceBrokerAuthLoginInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthLoginInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +418,44 @@ type ServiceBrokerAuthLoginInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth login internal server error response has a 2xx status code +func (o *ServiceBrokerAuthLoginInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth login internal server error response has a 3xx status code +func (o *ServiceBrokerAuthLoginInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth login internal server error response has a 4xx status code +func (o *ServiceBrokerAuthLoginInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth login internal server error response has a 5xx status code +func (o *ServiceBrokerAuthLoginInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth login internal server error response a status code equal to that given +func (o *ServiceBrokerAuthLoginInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth login internal server error response +func (o *ServiceBrokerAuthLoginInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthLoginInternalServerError) Error() string { return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthLoginInternalServerError) String() string { + return fmt.Sprintf("[GET /auth/v1/login][%d] serviceBrokerAuthLoginInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthLoginInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_parameters.go index dd227cda394..ba95ff8bea1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerAuthLogoutParamsWithHTTPClient(client *http.Client) *Servic } } -/* ServiceBrokerAuthLogoutParams contains all the parameters to send to the API endpoint - for the service broker auth logout operation. +/* +ServiceBrokerAuthLogoutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth logout operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthLogoutParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_responses.go index 6907da0111c..d1ef9e2c0d1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_logout_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -36,7 +60,7 @@ func (o *ServiceBrokerAuthLogoutReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /auth/v1/logout] serviceBroker.auth.logout", response, response.Code()) } } @@ -45,7 +69,8 @@ func NewServiceBrokerAuthLogoutOK() *ServiceBrokerAuthLogoutOK { return &ServiceBrokerAuthLogoutOK{} } -/* ServiceBrokerAuthLogoutOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthLogoutOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +78,44 @@ type ServiceBrokerAuthLogoutOK struct { Payload models.Object } +// IsSuccess returns true when this service broker auth logout o k response has a 2xx status code +func (o *ServiceBrokerAuthLogoutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth logout o k response has a 3xx status code +func (o *ServiceBrokerAuthLogoutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth logout o k response has a 4xx status code +func (o *ServiceBrokerAuthLogoutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth logout o k response has a 5xx status code +func (o *ServiceBrokerAuthLogoutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth logout o k response a status code equal to that given +func (o *ServiceBrokerAuthLogoutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth logout o k response +func (o *ServiceBrokerAuthLogoutOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthLogoutOK) Error() string { return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthLogoutOK) String() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthLogoutOK) GetPayload() models.Object { return o.Payload } @@ -70,12 +130,285 @@ 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{} } -/* ServiceBrokerAuthLogoutInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthLogoutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -83,9 +416,44 @@ type ServiceBrokerAuthLogoutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth logout internal server error response has a 2xx status code +func (o *ServiceBrokerAuthLogoutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth logout internal server error response has a 3xx status code +func (o *ServiceBrokerAuthLogoutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth logout internal server error response has a 4xx status code +func (o *ServiceBrokerAuthLogoutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth logout internal server error response has a 5xx status code +func (o *ServiceBrokerAuthLogoutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth logout internal server error response a status code equal to that given +func (o *ServiceBrokerAuthLogoutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth logout internal server error response +func (o *ServiceBrokerAuthLogoutInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthLogoutInternalServerError) Error() string { return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthLogoutInternalServerError) String() string { + return fmt.Sprintf("[GET /auth/v1/logout][%d] serviceBrokerAuthLogoutInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthLogoutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_parameters.go index 0aceb5313bc..4f53dcbc64f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerAuthRegistrationCallbackParamsWithHTTPClient(client *http.C } } -/* ServiceBrokerAuthRegistrationCallbackParams contains all the parameters to send to the API endpoint - for the service broker auth registration callback operation. +/* +ServiceBrokerAuthRegistrationCallbackParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth registration callback operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthRegistrationCallbackParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_responses.go index bc09a80543e..2833807dcc9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_callback_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -42,7 +60,7 @@ func (o *ServiceBrokerAuthRegistrationCallbackReader) ReadResponse(response runt } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /auth/v1/callback-registration] serviceBroker.auth.registration.callback", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewServiceBrokerAuthRegistrationCallbackOK() *ServiceBrokerAuthRegistration return &ServiceBrokerAuthRegistrationCallbackOK{} } -/* ServiceBrokerAuthRegistrationCallbackOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthRegistrationCallbackOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type ServiceBrokerAuthRegistrationCallbackOK struct { Payload *models.AccessToken } +// IsSuccess returns true when this service broker auth registration callback o k response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationCallbackOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth registration callback o k response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationCallbackOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration callback o k response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationCallbackOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth registration callback o k response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationCallbackOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration callback o k response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationCallbackOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth registration callback o k response +func (o *ServiceBrokerAuthRegistrationCallbackOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthRegistrationCallbackOK) Error() string { return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthRegistrationCallbackOK) String() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthRegistrationCallbackOK) GetPayload() *models.AccessToken { return o.Payload } @@ -78,12 +132,81 @@ 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{} } -/* ServiceBrokerAuthRegistrationCallbackUnauthorized describes a response with status code 401, with default header values. +/* +ServiceBrokerAuthRegistrationCallbackUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -91,9 +214,44 @@ type ServiceBrokerAuthRegistrationCallbackUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth registration callback unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration callback unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration callback unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth registration callback unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration callback unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth registration callback unauthorized response +func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) Code() int { + return 401 +} + func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) Error() string { return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackUnauthorized %+v", 401, o.Payload) } + +func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) String() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackUnauthorized %+v", 401, o.Payload) +} + func (o *ServiceBrokerAuthRegistrationCallbackUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -110,12 +268,149 @@ 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{} } -/* ServiceBrokerAuthRegistrationCallbackInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthRegistrationCallbackInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +418,44 @@ type ServiceBrokerAuthRegistrationCallbackInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth registration callback internal server error response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration callback internal server error response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration callback internal server error response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth registration callback internal server error response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth registration callback internal server error response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth registration callback internal server error response +func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) Error() string { return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) String() string { + return fmt.Sprintf("[GET /auth/v1/callback-registration][%d] serviceBrokerAuthRegistrationCallbackInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthRegistrationCallbackInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_parameters.go index 3a49c00a2e0..0324385e267 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_parameters.go @@ -53,10 +53,12 @@ func NewServiceBrokerAuthRegistrationParamsWithHTTPClient(client *http.Client) * } } -/* ServiceBrokerAuthRegistrationParams contains all the parameters to send to the API endpoint - for the service broker auth registration operation. +/* +ServiceBrokerAuthRegistrationParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth registration operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthRegistrationParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_responses.go index 7ccbe10af14..48a0f28c1e2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_registration_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -42,7 +60,7 @@ func (o *ServiceBrokerAuthRegistrationReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /auth/v1/registration] serviceBroker.auth.registration", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewServiceBrokerAuthRegistrationOK() *ServiceBrokerAuthRegistrationOK { return &ServiceBrokerAuthRegistrationOK{} } -/* ServiceBrokerAuthRegistrationOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthRegistrationOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type ServiceBrokerAuthRegistrationOK struct { Payload *models.AccessToken } +// IsSuccess returns true when this service broker auth registration o k response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth registration o k response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration o k response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth registration o k response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration o k response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth registration o k response +func (o *ServiceBrokerAuthRegistrationOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthRegistrationOK) Error() string { return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthRegistrationOK) String() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthRegistrationOK) GetPayload() *models.AccessToken { return o.Payload } @@ -78,12 +132,81 @@ 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{} } -/* ServiceBrokerAuthRegistrationUnauthorized describes a response with status code 401, with default header values. +/* +ServiceBrokerAuthRegistrationUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -91,9 +214,44 @@ type ServiceBrokerAuthRegistrationUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth registration unauthorized response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration unauthorized response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration unauthorized response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth registration unauthorized response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth registration unauthorized response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service broker auth registration unauthorized response +func (o *ServiceBrokerAuthRegistrationUnauthorized) Code() int { + return 401 +} + func (o *ServiceBrokerAuthRegistrationUnauthorized) Error() string { return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationUnauthorized %+v", 401, o.Payload) } + +func (o *ServiceBrokerAuthRegistrationUnauthorized) String() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationUnauthorized %+v", 401, o.Payload) +} + func (o *ServiceBrokerAuthRegistrationUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -110,12 +268,149 @@ 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{} } -/* ServiceBrokerAuthRegistrationInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthRegistrationInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +418,44 @@ type ServiceBrokerAuthRegistrationInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth registration internal server error response has a 2xx status code +func (o *ServiceBrokerAuthRegistrationInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth registration internal server error response has a 3xx status code +func (o *ServiceBrokerAuthRegistrationInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth registration internal server error response has a 4xx status code +func (o *ServiceBrokerAuthRegistrationInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth registration internal server error response has a 5xx status code +func (o *ServiceBrokerAuthRegistrationInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth registration internal server error response a status code equal to that given +func (o *ServiceBrokerAuthRegistrationInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth registration internal server error response +func (o *ServiceBrokerAuthRegistrationInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthRegistrationInternalServerError) Error() string { return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthRegistrationInternalServerError) String() string { + return fmt.Sprintf("[GET /auth/v1/registration][%d] serviceBrokerAuthRegistrationInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthRegistrationInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_parameters.go index 7c77f5ac72a..d057427c7d5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_parameters.go @@ -54,10 +54,12 @@ func NewServiceBrokerAuthTokenPostParamsWithHTTPClient(client *http.Client) *Ser } } -/* ServiceBrokerAuthTokenPostParams contains all the parameters to send to the API endpoint - for the service broker auth token post operation. +/* +ServiceBrokerAuthTokenPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker auth token post operation. + + Typically these are written to a http.Request. */ type ServiceBrokerAuthTokenPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_responses.go index 72087200a26..dd493095517 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/authentication/service_broker_auth_token_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +66,7 @@ func (o *ServiceBrokerAuthTokenPostReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /auth/v1/token] serviceBroker.auth.token.post", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewServiceBrokerAuthTokenPostOK() *ServiceBrokerAuthTokenPostOK { return &ServiceBrokerAuthTokenPostOK{} } -/* ServiceBrokerAuthTokenPostOK describes a response with status code 200, with default header values. +/* +ServiceBrokerAuthTokenPostOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type ServiceBrokerAuthTokenPostOK struct { Payload *models.Token } +// IsSuccess returns true when this service broker auth token post o k response has a 2xx status code +func (o *ServiceBrokerAuthTokenPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker auth token post o k response has a 3xx status code +func (o *ServiceBrokerAuthTokenPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth token post o k response has a 4xx status code +func (o *ServiceBrokerAuthTokenPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth token post o k response has a 5xx status code +func (o *ServiceBrokerAuthTokenPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth token post o k response a status code equal to that given +func (o *ServiceBrokerAuthTokenPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker auth token post o k response +func (o *ServiceBrokerAuthTokenPostOK) Code() int { + return 200 +} + func (o *ServiceBrokerAuthTokenPostOK) Error() string { return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerAuthTokenPostOK) String() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerAuthTokenPostOK) GetPayload() *models.Token { return o.Payload } @@ -95,17 +143,53 @@ func NewServiceBrokerAuthTokenPostBadRequest() *ServiceBrokerAuthTokenPostBadReq return &ServiceBrokerAuthTokenPostBadRequest{} } -/* ServiceBrokerAuthTokenPostBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerAuthTokenPostBadRequest describes a response with status code 400, with default header values. -Authorization pending +Bad Request */ type ServiceBrokerAuthTokenPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth token post bad request response has a 2xx status code +func (o *ServiceBrokerAuthTokenPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth token post bad request response has a 3xx status code +func (o *ServiceBrokerAuthTokenPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth token post bad request response has a 4xx status code +func (o *ServiceBrokerAuthTokenPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth token post bad request response has a 5xx status code +func (o *ServiceBrokerAuthTokenPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth token post bad request response a status code equal to that given +func (o *ServiceBrokerAuthTokenPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker auth token post bad request response +func (o *ServiceBrokerAuthTokenPostBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerAuthTokenPostBadRequest) Error() string { return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerAuthTokenPostBadRequest) String() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerAuthTokenPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -122,22 +206,126 @@ 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{} } -/* ServiceBrokerAuthTokenPostForbidden describes a response with status code 403, with default header values. +/* +ServiceBrokerAuthTokenPostForbidden describes a response with status code 403, with default header values. -User refused grant +Forbidden */ type ServiceBrokerAuthTokenPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth token post forbidden response has a 2xx status code +func (o *ServiceBrokerAuthTokenPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth token post forbidden response has a 3xx status code +func (o *ServiceBrokerAuthTokenPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth token post forbidden response has a 4xx status code +func (o *ServiceBrokerAuthTokenPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth token post forbidden response has a 5xx status code +func (o *ServiceBrokerAuthTokenPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth token post forbidden response a status code equal to that given +func (o *ServiceBrokerAuthTokenPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker auth token post forbidden response +func (o *ServiceBrokerAuthTokenPostForbidden) Code() int { + return 403 +} + func (o *ServiceBrokerAuthTokenPostForbidden) Error() string { return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostForbidden %+v", 403, o.Payload) } + +func (o *ServiceBrokerAuthTokenPostForbidden) String() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostForbidden %+v", 403, o.Payload) +} + func (o *ServiceBrokerAuthTokenPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -154,12 +342,81 @@ 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{} } -/* ServiceBrokerAuthTokenPostTooManyRequests describes a response with status code 429, with default header values. +/* +ServiceBrokerAuthTokenPostTooManyRequests describes a response with status code 429, with default header values. Polling too frequently */ @@ -167,9 +424,44 @@ type ServiceBrokerAuthTokenPostTooManyRequests struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth token post too many requests response has a 2xx status code +func (o *ServiceBrokerAuthTokenPostTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth token post too many requests response has a 3xx status code +func (o *ServiceBrokerAuthTokenPostTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth token post too many requests response has a 4xx status code +func (o *ServiceBrokerAuthTokenPostTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker auth token post too many requests response has a 5xx status code +func (o *ServiceBrokerAuthTokenPostTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker auth token post too many requests response a status code equal to that given +func (o *ServiceBrokerAuthTokenPostTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the service broker auth token post too many requests response +func (o *ServiceBrokerAuthTokenPostTooManyRequests) Code() int { + return 429 +} + func (o *ServiceBrokerAuthTokenPostTooManyRequests) Error() string { return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostTooManyRequests %+v", 429, o.Payload) } + +func (o *ServiceBrokerAuthTokenPostTooManyRequests) String() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostTooManyRequests %+v", 429, o.Payload) +} + func (o *ServiceBrokerAuthTokenPostTooManyRequests) GetPayload() *models.Error { return o.Payload } @@ -191,7 +483,8 @@ func NewServiceBrokerAuthTokenPostInternalServerError() *ServiceBrokerAuthTokenP return &ServiceBrokerAuthTokenPostInternalServerError{} } -/* ServiceBrokerAuthTokenPostInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerAuthTokenPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +492,44 @@ type ServiceBrokerAuthTokenPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker auth token post internal server error response has a 2xx status code +func (o *ServiceBrokerAuthTokenPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker auth token post internal server error response has a 3xx status code +func (o *ServiceBrokerAuthTokenPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker auth token post internal server error response has a 4xx status code +func (o *ServiceBrokerAuthTokenPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker auth token post internal server error response has a 5xx status code +func (o *ServiceBrokerAuthTokenPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker auth token post internal server error response a status code equal to that given +func (o *ServiceBrokerAuthTokenPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker auth token post internal server error response +func (o *ServiceBrokerAuthTokenPostInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerAuthTokenPostInternalServerError) Error() string { return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerAuthTokenPostInternalServerError) String() string { + return fmt.Sprintf("[POST /auth/v1/token][%d] serviceBrokerAuthTokenPostInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerAuthTokenPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_parameters.go index 185400b277b..c1250167eba 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_parameters.go @@ -52,10 +52,12 @@ func NewBluemixServiceInstanceGetParamsWithHTTPClient(client *http.Client) *Blue } } -/* BluemixServiceInstanceGetParams contains all the parameters to send to the API endpoint - for the bluemix service instance get operation. +/* +BluemixServiceInstanceGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the bluemix service instance get operation. + + Typically these are written to a http.Request. */ type BluemixServiceInstanceGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go index 0fe5b096e30..27f9fd56905 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go @@ -35,8 +35,26 @@ 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /bluemix_v1/service_instances/{instance_id}] bluemix.serviceInstance.get", response, response.Code()) } } @@ -45,7 +63,8 @@ func NewBluemixServiceInstanceGetOK() *BluemixServiceInstanceGetOK { return &BluemixServiceInstanceGetOK{} } -/* BluemixServiceInstanceGetOK describes a response with status code 200, with default header values. +/* +BluemixServiceInstanceGetOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +72,44 @@ type BluemixServiceInstanceGetOK struct { Payload *models.ServiceInstance } +// IsSuccess returns true when this bluemix service instance get o k response has a 2xx status code +func (o *BluemixServiceInstanceGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bluemix service instance get o k response has a 3xx status code +func (o *BluemixServiceInstanceGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance get o k response has a 4xx status code +func (o *BluemixServiceInstanceGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bluemix service instance get o k response has a 5xx status code +func (o *BluemixServiceInstanceGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance get o k response a status code equal to that given +func (o *BluemixServiceInstanceGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bluemix service instance get o k response +func (o *BluemixServiceInstanceGetOK) Code() int { + return 200 +} + func (o *BluemixServiceInstanceGetOK) Error() string { return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetOK %+v", 200, o.Payload) } + +func (o *BluemixServiceInstanceGetOK) String() string { + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetOK %+v", 200, o.Payload) +} + func (o *BluemixServiceInstanceGetOK) GetPayload() *models.ServiceInstance { return o.Payload } @@ -77,7 +131,8 @@ func NewBluemixServiceInstanceGetBadRequest() *BluemixServiceInstanceGetBadReque return &BluemixServiceInstanceGetBadRequest{} } -/* BluemixServiceInstanceGetBadRequest describes a response with status code 400, with default header values. +/* +BluemixServiceInstanceGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -85,9 +140,44 @@ type BluemixServiceInstanceGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this bluemix service instance get bad request response has a 2xx status code +func (o *BluemixServiceInstanceGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bluemix service instance get bad request response has a 3xx status code +func (o *BluemixServiceInstanceGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance get bad request response has a 4xx status code +func (o *BluemixServiceInstanceGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bluemix service instance get bad request response has a 5xx status code +func (o *BluemixServiceInstanceGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance get bad request response a status code equal to that given +func (o *BluemixServiceInstanceGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bluemix service instance get bad request response +func (o *BluemixServiceInstanceGetBadRequest) Code() int { + return 400 +} + func (o *BluemixServiceInstanceGetBadRequest) Error() string { return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetBadRequest %+v", 400, o.Payload) } + +func (o *BluemixServiceInstanceGetBadRequest) String() string { + return fmt.Sprintf("[GET /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstanceGetBadRequest %+v", 400, o.Payload) +} + func (o *BluemixServiceInstanceGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -103,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_parameters.go index 7bc989beb97..e366c432d05 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_parameters.go @@ -54,10 +54,12 @@ func NewBluemixServiceInstancePutParamsWithHTTPClient(client *http.Client) *Blue } } -/* BluemixServiceInstancePutParams contains all the parameters to send to the API endpoint - for the bluemix service instance put operation. +/* +BluemixServiceInstancePutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the bluemix service instance put operation. + + Typically these are written to a http.Request. */ type BluemixServiceInstancePutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go index d35787f1805..1145f9fdb30 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go @@ -35,8 +35,26 @@ 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /bluemix_v1/service_instances/{instance_id}] bluemix.serviceInstance.put", response, response.Code()) } } @@ -45,7 +63,8 @@ func NewBluemixServiceInstancePutOK() *BluemixServiceInstancePutOK { return &BluemixServiceInstancePutOK{} } -/* BluemixServiceInstancePutOK describes a response with status code 200, with default header values. +/* +BluemixServiceInstancePutOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +72,44 @@ type BluemixServiceInstancePutOK struct { Payload *models.ServiceInstance } +// IsSuccess returns true when this bluemix service instance put o k response has a 2xx status code +func (o *BluemixServiceInstancePutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this bluemix service instance put o k response has a 3xx status code +func (o *BluemixServiceInstancePutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance put o k response has a 4xx status code +func (o *BluemixServiceInstancePutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this bluemix service instance put o k response has a 5xx status code +func (o *BluemixServiceInstancePutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance put o k response a status code equal to that given +func (o *BluemixServiceInstancePutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the bluemix service instance put o k response +func (o *BluemixServiceInstancePutOK) Code() int { + return 200 +} + func (o *BluemixServiceInstancePutOK) Error() string { return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutOK %+v", 200, o.Payload) } + +func (o *BluemixServiceInstancePutOK) String() string { + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutOK %+v", 200, o.Payload) +} + func (o *BluemixServiceInstancePutOK) GetPayload() *models.ServiceInstance { return o.Payload } @@ -77,7 +131,8 @@ func NewBluemixServiceInstancePutBadRequest() *BluemixServiceInstancePutBadReque return &BluemixServiceInstancePutBadRequest{} } -/* BluemixServiceInstancePutBadRequest describes a response with status code 400, with default header values. +/* +BluemixServiceInstancePutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -85,9 +140,44 @@ type BluemixServiceInstancePutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this bluemix service instance put bad request response has a 2xx status code +func (o *BluemixServiceInstancePutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this bluemix service instance put bad request response has a 3xx status code +func (o *BluemixServiceInstancePutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this bluemix service instance put bad request response has a 4xx status code +func (o *BluemixServiceInstancePutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this bluemix service instance put bad request response has a 5xx status code +func (o *BluemixServiceInstancePutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this bluemix service instance put bad request response a status code equal to that given +func (o *BluemixServiceInstancePutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the bluemix service instance put bad request response +func (o *BluemixServiceInstancePutBadRequest) Code() int { + return 400 +} + func (o *BluemixServiceInstancePutBadRequest) Error() string { return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutBadRequest %+v", 400, o.Payload) } + +func (o *BluemixServiceInstancePutBadRequest) String() string { + return fmt.Sprintf("[PUT /bluemix_v1/service_instances/{instance_id}][%d] bluemixServiceInstancePutBadRequest %+v", 400, o.Payload) +} + func (o *BluemixServiceInstancePutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -103,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instances_client.go index d0cb0758c4a..76f2c993b43 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances/bluemix_service_instances_client.go @@ -38,7 +38,7 @@ type ClientService interface { } /* - BluemixServiceInstanceGet gets the current state information associated with the service instance +BluemixServiceInstanceGet gets the current state information associated with the service instance */ func (a *Client) BluemixServiceInstanceGet(params *BluemixServiceInstanceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BluemixServiceInstanceGetOK, error) { // TODO: Validate the params before sending @@ -77,7 +77,7 @@ func (a *Client) BluemixServiceInstanceGet(params *BluemixServiceInstanceGetPara } /* - BluemixServiceInstancePut updates disable or enable the state of a provisioned service instance +BluemixServiceInstancePut updates disable or enable the state of a provisioned service instance */ func (a *Client) BluemixServiceInstancePut(params *BluemixServiceInstancePutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BluemixServiceInstancePutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_client.go index 265b7dfec29..0641b3b1bbf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - CatalogGet gets the catalog of services that the service broker offers +CatalogGet gets the catalog of services that the service broker offers */ func (a *Client) CatalogGet(params *CatalogGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CatalogGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_parameters.go index 5f11d0a1ac5..b525e38089f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_parameters.go @@ -52,10 +52,12 @@ func NewCatalogGetParamsWithHTTPClient(client *http.Client) *CatalogGetParams { } } -/* CatalogGetParams contains all the parameters to send to the API endpoint - for the catalog get operation. +/* +CatalogGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the catalog get operation. + + Typically these are written to a http.Request. */ type CatalogGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_responses.go index 448d665f886..f5845626854 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/catalog/catalog_get_responses.go @@ -29,8 +29,32 @@ 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /v2/catalog] catalog.get", response, response.Code()) } } @@ -39,7 +63,8 @@ func NewCatalogGetOK() *CatalogGetOK { return &CatalogGetOK{} } -/* CatalogGetOK describes a response with status code 200, with default header values. +/* +CatalogGetOK describes a response with status code 200, with default header values. catalog response */ @@ -47,9 +72,44 @@ type CatalogGetOK struct { Payload *models.Catalog } +// IsSuccess returns true when this catalog get o k response has a 2xx status code +func (o *CatalogGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this catalog get o k response has a 3xx status code +func (o *CatalogGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this catalog get o k response has a 4xx status code +func (o *CatalogGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this catalog get o k response has a 5xx status code +func (o *CatalogGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this catalog get o k response a status code equal to that given +func (o *CatalogGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the catalog get o k response +func (o *CatalogGetOK) Code() int { + return 200 +} + func (o *CatalogGetOK) Error() string { return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetOK %+v", 200, o.Payload) } + +func (o *CatalogGetOK) String() string { + return fmt.Sprintf("[GET /v2/catalog][%d] catalogGetOK %+v", 200, o.Payload) +} + func (o *CatalogGetOK) GetPayload() *models.Catalog { return o.Payload } @@ -65,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/datacenters_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/datacenters_client.go new file mode 100644 index 00000000000..4bde6516e86 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/datacenters_client.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package datacenters + +// 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 datacenters API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for datacenters 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 { + V1DatacentersGet(params *V1DatacentersGetParams, opts ...ClientOption) (*V1DatacentersGetOK, error) + + V1DatacentersGetall(params *V1DatacentersGetallParams, opts ...ClientOption) (*V1DatacentersGetallOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +V1DatacentersGet gets a datacenter s information and capabilities +*/ +func (a *Client) V1DatacentersGet(params *V1DatacentersGetParams, opts ...ClientOption) (*V1DatacentersGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DatacentersGetParams() + } + op := &runtime.ClientOperation{ + ID: "v1.datacenters.get", + Method: "GET", + PathPattern: "/v1/datacenters/{datacenter_region}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1DatacentersGetReader{formats: a.formats}, + 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.(*V1DatacentersGetOK) + 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.datacenters.get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DatacentersGetall gets all datacenters information and capabilities +*/ +func (a *Client) V1DatacentersGetall(params *V1DatacentersGetallParams, opts ...ClientOption) (*V1DatacentersGetallOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DatacentersGetallParams() + } + op := &runtime.ClientOperation{ + ID: "v1.datacenters.getall", + Method: "GET", + PathPattern: "/v1/datacenters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1DatacentersGetallReader{formats: a.formats}, + 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.(*V1DatacentersGetallOK) + 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.datacenters.getall: 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_parameters.go new file mode 100644 index 00000000000..36a52edbf87 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package datacenters + +// 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" +) + +// NewV1DatacentersGetParams creates a new V1DatacentersGetParams 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 NewV1DatacentersGetParams() *V1DatacentersGetParams { + return &V1DatacentersGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1DatacentersGetParamsWithTimeout creates a new V1DatacentersGetParams object +// with the ability to set a timeout on a request. +func NewV1DatacentersGetParamsWithTimeout(timeout time.Duration) *V1DatacentersGetParams { + return &V1DatacentersGetParams{ + timeout: timeout, + } +} + +// NewV1DatacentersGetParamsWithContext creates a new V1DatacentersGetParams object +// with the ability to set a context for a request. +func NewV1DatacentersGetParamsWithContext(ctx context.Context) *V1DatacentersGetParams { + return &V1DatacentersGetParams{ + Context: ctx, + } +} + +// NewV1DatacentersGetParamsWithHTTPClient creates a new V1DatacentersGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1DatacentersGetParamsWithHTTPClient(client *http.Client) *V1DatacentersGetParams { + return &V1DatacentersGetParams{ + HTTPClient: client, + } +} + +/* +V1DatacentersGetParams contains all the parameters to send to the API endpoint + + for the v1 datacenters get operation. + + Typically these are written to a http.Request. +*/ +type V1DatacentersGetParams struct { + + /* DatacenterRegion. + + Datacenter Region + */ + DatacenterRegion string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 datacenters get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1DatacentersGetParams) WithDefaults() *V1DatacentersGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 datacenters get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1DatacentersGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 datacenters get params +func (o *V1DatacentersGetParams) WithTimeout(timeout time.Duration) *V1DatacentersGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 datacenters get params +func (o *V1DatacentersGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 datacenters get params +func (o *V1DatacentersGetParams) WithContext(ctx context.Context) *V1DatacentersGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 datacenters get params +func (o *V1DatacentersGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 datacenters get params +func (o *V1DatacentersGetParams) WithHTTPClient(client *http.Client) *V1DatacentersGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 datacenters get params +func (o *V1DatacentersGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDatacenterRegion adds the datacenterRegion to the v1 datacenters get params +func (o *V1DatacentersGetParams) WithDatacenterRegion(datacenterRegion string) *V1DatacentersGetParams { + o.SetDatacenterRegion(datacenterRegion) + return o +} + +// SetDatacenterRegion adds the datacenterRegion to the v1 datacenters get params +func (o *V1DatacentersGetParams) SetDatacenterRegion(datacenterRegion string) { + o.DatacenterRegion = datacenterRegion +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DatacentersGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param datacenter_region + if err := r.SetPathParam("datacenter_region", o.DatacenterRegion); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_responses.go new file mode 100644 index 00000000000..2cc84f2e555 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_get_responses.go @@ -0,0 +1,399 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package datacenters + +// 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" +) + +// V1DatacentersGetReader is a Reader for the V1DatacentersGet structure. +type V1DatacentersGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DatacentersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DatacentersGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1DatacentersGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1DatacentersGetUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1DatacentersGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1DatacentersGetInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/datacenters/{datacenter_region}] v1.datacenters.get", response, response.Code()) + } +} + +// NewV1DatacentersGetOK creates a V1DatacentersGetOK with default headers values +func NewV1DatacentersGetOK() *V1DatacentersGetOK { + return &V1DatacentersGetOK{} +} + +/* +V1DatacentersGetOK describes a response with status code 200, with default header values. + +OK +*/ +type V1DatacentersGetOK struct { + Payload *models.Datacenter +} + +// IsSuccess returns true when this v1 datacenters get o k response has a 2xx status code +func (o *V1DatacentersGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 datacenters get o k response has a 3xx status code +func (o *V1DatacentersGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters get o k response has a 4xx status code +func (o *V1DatacentersGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 datacenters get o k response has a 5xx status code +func (o *V1DatacentersGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 datacenters get o k response a status code equal to that given +func (o *V1DatacentersGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 datacenters get o k response +func (o *V1DatacentersGetOK) Code() int { + return 200 +} + +func (o *V1DatacentersGetOK) Error() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetOK %+v", 200, o.Payload) +} + +func (o *V1DatacentersGetOK) String() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetOK %+v", 200, o.Payload) +} + +func (o *V1DatacentersGetOK) GetPayload() *models.Datacenter { + return o.Payload +} + +func (o *V1DatacentersGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Datacenter) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1DatacentersGetBadRequest creates a V1DatacentersGetBadRequest with default headers values +func NewV1DatacentersGetBadRequest() *V1DatacentersGetBadRequest { + return &V1DatacentersGetBadRequest{} +} + +/* +V1DatacentersGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1DatacentersGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 datacenters get bad request response has a 2xx status code +func (o *V1DatacentersGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 datacenters get bad request response has a 3xx status code +func (o *V1DatacentersGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters get bad request response has a 4xx status code +func (o *V1DatacentersGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 datacenters get bad request response has a 5xx status code +func (o *V1DatacentersGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 datacenters get bad request response a status code equal to that given +func (o *V1DatacentersGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 datacenters get bad request response +func (o *V1DatacentersGetBadRequest) Code() int { + return 400 +} + +func (o *V1DatacentersGetBadRequest) Error() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetBadRequest %+v", 400, o.Payload) +} + +func (o *V1DatacentersGetBadRequest) String() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetBadRequest %+v", 400, o.Payload) +} + +func (o *V1DatacentersGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1DatacentersGetBadRequest) 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 +} + +// NewV1DatacentersGetUnauthorized creates a V1DatacentersGetUnauthorized with default headers values +func NewV1DatacentersGetUnauthorized() *V1DatacentersGetUnauthorized { + return &V1DatacentersGetUnauthorized{} +} + +/* +V1DatacentersGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1DatacentersGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 datacenters get unauthorized response has a 2xx status code +func (o *V1DatacentersGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 datacenters get unauthorized response has a 3xx status code +func (o *V1DatacentersGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters get unauthorized response has a 4xx status code +func (o *V1DatacentersGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 datacenters get unauthorized response has a 5xx status code +func (o *V1DatacentersGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 datacenters get unauthorized response a status code equal to that given +func (o *V1DatacentersGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 datacenters get unauthorized response +func (o *V1DatacentersGetUnauthorized) Code() int { + return 401 +} + +func (o *V1DatacentersGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetUnauthorized %+v", 401, o.Payload) +} + +func (o *V1DatacentersGetUnauthorized) String() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetUnauthorized %+v", 401, o.Payload) +} + +func (o *V1DatacentersGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1DatacentersGetUnauthorized) 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 +} + +// NewV1DatacentersGetForbidden creates a V1DatacentersGetForbidden with default headers values +func NewV1DatacentersGetForbidden() *V1DatacentersGetForbidden { + return &V1DatacentersGetForbidden{} +} + +/* +V1DatacentersGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1DatacentersGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 datacenters get forbidden response has a 2xx status code +func (o *V1DatacentersGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 datacenters get forbidden response has a 3xx status code +func (o *V1DatacentersGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters get forbidden response has a 4xx status code +func (o *V1DatacentersGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 datacenters get forbidden response has a 5xx status code +func (o *V1DatacentersGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 datacenters get forbidden response a status code equal to that given +func (o *V1DatacentersGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 datacenters get forbidden response +func (o *V1DatacentersGetForbidden) Code() int { + return 403 +} + +func (o *V1DatacentersGetForbidden) Error() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetForbidden %+v", 403, o.Payload) +} + +func (o *V1DatacentersGetForbidden) String() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetForbidden %+v", 403, o.Payload) +} + +func (o *V1DatacentersGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1DatacentersGetForbidden) 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 +} + +// NewV1DatacentersGetInternalServerError creates a V1DatacentersGetInternalServerError with default headers values +func NewV1DatacentersGetInternalServerError() *V1DatacentersGetInternalServerError { + return &V1DatacentersGetInternalServerError{} +} + +/* +V1DatacentersGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1DatacentersGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 datacenters get internal server error response has a 2xx status code +func (o *V1DatacentersGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 datacenters get internal server error response has a 3xx status code +func (o *V1DatacentersGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters get internal server error response has a 4xx status code +func (o *V1DatacentersGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 datacenters get internal server error response has a 5xx status code +func (o *V1DatacentersGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 datacenters get internal server error response a status code equal to that given +func (o *V1DatacentersGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 datacenters get internal server error response +func (o *V1DatacentersGetInternalServerError) Code() int { + return 500 +} + +func (o *V1DatacentersGetInternalServerError) Error() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetInternalServerError %+v", 500, o.Payload) +} + +func (o *V1DatacentersGetInternalServerError) String() string { + return fmt.Sprintf("[GET /v1/datacenters/{datacenter_region}][%d] v1DatacentersGetInternalServerError %+v", 500, o.Payload) +} + +func (o *V1DatacentersGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1DatacentersGetInternalServerError) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_parameters.go new file mode 100644 index 00000000000..73e30e79293 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package datacenters + +// 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" +) + +// NewV1DatacentersGetallParams creates a new V1DatacentersGetallParams 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 NewV1DatacentersGetallParams() *V1DatacentersGetallParams { + return &V1DatacentersGetallParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1DatacentersGetallParamsWithTimeout creates a new V1DatacentersGetallParams object +// with the ability to set a timeout on a request. +func NewV1DatacentersGetallParamsWithTimeout(timeout time.Duration) *V1DatacentersGetallParams { + return &V1DatacentersGetallParams{ + timeout: timeout, + } +} + +// NewV1DatacentersGetallParamsWithContext creates a new V1DatacentersGetallParams object +// with the ability to set a context for a request. +func NewV1DatacentersGetallParamsWithContext(ctx context.Context) *V1DatacentersGetallParams { + return &V1DatacentersGetallParams{ + Context: ctx, + } +} + +// NewV1DatacentersGetallParamsWithHTTPClient creates a new V1DatacentersGetallParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1DatacentersGetallParamsWithHTTPClient(client *http.Client) *V1DatacentersGetallParams { + return &V1DatacentersGetallParams{ + HTTPClient: client, + } +} + +/* +V1DatacentersGetallParams contains all the parameters to send to the API endpoint + + for the v1 datacenters getall operation. + + Typically these are written to a http.Request. +*/ +type V1DatacentersGetallParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 datacenters getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1DatacentersGetallParams) WithDefaults() *V1DatacentersGetallParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 datacenters getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1DatacentersGetallParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 datacenters getall params +func (o *V1DatacentersGetallParams) WithTimeout(timeout time.Duration) *V1DatacentersGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 datacenters getall params +func (o *V1DatacentersGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 datacenters getall params +func (o *V1DatacentersGetallParams) WithContext(ctx context.Context) *V1DatacentersGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 datacenters getall params +func (o *V1DatacentersGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 datacenters getall params +func (o *V1DatacentersGetallParams) WithHTTPClient(client *http.Client) *V1DatacentersGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 datacenters getall params +func (o *V1DatacentersGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DatacentersGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_responses.go new file mode 100644 index 00000000000..3bcf1f10d1d --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/datacenters/v1_datacenters_getall_responses.go @@ -0,0 +1,399 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package datacenters + +// 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" +) + +// V1DatacentersGetallReader is a Reader for the V1DatacentersGetall structure. +type V1DatacentersGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DatacentersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DatacentersGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewV1DatacentersGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewV1DatacentersGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1DatacentersGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1DatacentersGetallInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/datacenters] v1.datacenters.getall", response, response.Code()) + } +} + +// NewV1DatacentersGetallOK creates a V1DatacentersGetallOK with default headers values +func NewV1DatacentersGetallOK() *V1DatacentersGetallOK { + return &V1DatacentersGetallOK{} +} + +/* +V1DatacentersGetallOK describes a response with status code 200, with default header values. + +OK +*/ +type V1DatacentersGetallOK struct { + Payload *models.Datacenters +} + +// IsSuccess returns true when this v1 datacenters getall o k response has a 2xx status code +func (o *V1DatacentersGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 datacenters getall o k response has a 3xx status code +func (o *V1DatacentersGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters getall o k response has a 4xx status code +func (o *V1DatacentersGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 datacenters getall o k response has a 5xx status code +func (o *V1DatacentersGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 datacenters getall o k response a status code equal to that given +func (o *V1DatacentersGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 datacenters getall o k response +func (o *V1DatacentersGetallOK) Code() int { + return 200 +} + +func (o *V1DatacentersGetallOK) Error() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallOK %+v", 200, o.Payload) +} + +func (o *V1DatacentersGetallOK) String() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallOK %+v", 200, o.Payload) +} + +func (o *V1DatacentersGetallOK) GetPayload() *models.Datacenters { + return o.Payload +} + +func (o *V1DatacentersGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Datacenters) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1DatacentersGetallBadRequest creates a V1DatacentersGetallBadRequest with default headers values +func NewV1DatacentersGetallBadRequest() *V1DatacentersGetallBadRequest { + return &V1DatacentersGetallBadRequest{} +} + +/* +V1DatacentersGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type V1DatacentersGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 datacenters getall bad request response has a 2xx status code +func (o *V1DatacentersGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 datacenters getall bad request response has a 3xx status code +func (o *V1DatacentersGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters getall bad request response has a 4xx status code +func (o *V1DatacentersGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 datacenters getall bad request response has a 5xx status code +func (o *V1DatacentersGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 datacenters getall bad request response a status code equal to that given +func (o *V1DatacentersGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the v1 datacenters getall bad request response +func (o *V1DatacentersGetallBadRequest) Code() int { + return 400 +} + +func (o *V1DatacentersGetallBadRequest) Error() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallBadRequest %+v", 400, o.Payload) +} + +func (o *V1DatacentersGetallBadRequest) String() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallBadRequest %+v", 400, o.Payload) +} + +func (o *V1DatacentersGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1DatacentersGetallBadRequest) 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 +} + +// NewV1DatacentersGetallUnauthorized creates a V1DatacentersGetallUnauthorized with default headers values +func NewV1DatacentersGetallUnauthorized() *V1DatacentersGetallUnauthorized { + return &V1DatacentersGetallUnauthorized{} +} + +/* +V1DatacentersGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1DatacentersGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 datacenters getall unauthorized response has a 2xx status code +func (o *V1DatacentersGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 datacenters getall unauthorized response has a 3xx status code +func (o *V1DatacentersGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters getall unauthorized response has a 4xx status code +func (o *V1DatacentersGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 datacenters getall unauthorized response has a 5xx status code +func (o *V1DatacentersGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 datacenters getall unauthorized response a status code equal to that given +func (o *V1DatacentersGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 datacenters getall unauthorized response +func (o *V1DatacentersGetallUnauthorized) Code() int { + return 401 +} + +func (o *V1DatacentersGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *V1DatacentersGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *V1DatacentersGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1DatacentersGetallUnauthorized) 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 +} + +// NewV1DatacentersGetallForbidden creates a V1DatacentersGetallForbidden with default headers values +func NewV1DatacentersGetallForbidden() *V1DatacentersGetallForbidden { + return &V1DatacentersGetallForbidden{} +} + +/* +V1DatacentersGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1DatacentersGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 datacenters getall forbidden response has a 2xx status code +func (o *V1DatacentersGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 datacenters getall forbidden response has a 3xx status code +func (o *V1DatacentersGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters getall forbidden response has a 4xx status code +func (o *V1DatacentersGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 datacenters getall forbidden response has a 5xx status code +func (o *V1DatacentersGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 datacenters getall forbidden response a status code equal to that given +func (o *V1DatacentersGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 datacenters getall forbidden response +func (o *V1DatacentersGetallForbidden) Code() int { + return 403 +} + +func (o *V1DatacentersGetallForbidden) Error() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallForbidden %+v", 403, o.Payload) +} + +func (o *V1DatacentersGetallForbidden) String() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallForbidden %+v", 403, o.Payload) +} + +func (o *V1DatacentersGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1DatacentersGetallForbidden) 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 +} + +// NewV1DatacentersGetallInternalServerError creates a V1DatacentersGetallInternalServerError with default headers values +func NewV1DatacentersGetallInternalServerError() *V1DatacentersGetallInternalServerError { + return &V1DatacentersGetallInternalServerError{} +} + +/* +V1DatacentersGetallInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1DatacentersGetallInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 datacenters getall internal server error response has a 2xx status code +func (o *V1DatacentersGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 datacenters getall internal server error response has a 3xx status code +func (o *V1DatacentersGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 datacenters getall internal server error response has a 4xx status code +func (o *V1DatacentersGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 datacenters getall internal server error response has a 5xx status code +func (o *V1DatacentersGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 datacenters getall internal server error response a status code equal to that given +func (o *V1DatacentersGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 datacenters getall internal server error response +func (o *V1DatacentersGetallInternalServerError) Code() int { + return 500 +} + +func (o *V1DatacentersGetallInternalServerError) Error() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *V1DatacentersGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /v1/datacenters][%d] v1DatacentersGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *V1DatacentersGetallInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1DatacentersGetallInternalServerError) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/hardware_platforms_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/hardware_platforms_client.go index 0cb215ec15d..89412a252f9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/hardware_platforms_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/hardware_platforms_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - ServiceBrokerHardwareplatformsGet availables hardware statistics and limits +ServiceBrokerHardwareplatformsGet availables hardware statistics and limits */ func (a *Client) ServiceBrokerHardwareplatformsGet(params *ServiceBrokerHardwareplatformsGetParams, opts ...ClientOption) (*ServiceBrokerHardwareplatformsGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_parameters.go index 53c6aee7321..693d196b8a3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerHardwareplatformsGetParamsWithHTTPClient(client *http.Clien } } -/* ServiceBrokerHardwareplatformsGetParams contains all the parameters to send to the API endpoint - for the service broker hardwareplatforms get operation. +/* +ServiceBrokerHardwareplatformsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker hardwareplatforms get operation. + + Typically these are written to a http.Request. */ type ServiceBrokerHardwareplatformsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go index 41e79c37ccc..d9573a44297 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -36,7 +60,7 @@ func (o *ServiceBrokerHardwareplatformsGetReader) ReadResponse(response runtime. } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/hardware-platforms] serviceBroker.hardwareplatforms.get", response, response.Code()) } } @@ -45,7 +69,8 @@ func NewServiceBrokerHardwareplatformsGetOK() *ServiceBrokerHardwareplatformsGet return &ServiceBrokerHardwareplatformsGetOK{} } -/* ServiceBrokerHardwareplatformsGetOK describes a response with status code 200, with default header values. +/* +ServiceBrokerHardwareplatformsGetOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +78,44 @@ type ServiceBrokerHardwareplatformsGetOK struct { Payload models.HardwarePlatforms } +// IsSuccess returns true when this service broker hardwareplatforms get o k response has a 2xx status code +func (o *ServiceBrokerHardwareplatformsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker hardwareplatforms get o k response has a 3xx status code +func (o *ServiceBrokerHardwareplatformsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker hardwareplatforms get o k response has a 4xx status code +func (o *ServiceBrokerHardwareplatformsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker hardwareplatforms get o k response has a 5xx status code +func (o *ServiceBrokerHardwareplatformsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker hardwareplatforms get o k response a status code equal to that given +func (o *ServiceBrokerHardwareplatformsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker hardwareplatforms get o k response +func (o *ServiceBrokerHardwareplatformsGetOK) Code() int { + return 200 +} + func (o *ServiceBrokerHardwareplatformsGetOK) Error() string { return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerHardwareplatformsGetOK) String() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerHardwareplatformsGetOK) GetPayload() models.HardwarePlatforms { return o.Payload } @@ -70,12 +130,285 @@ 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{} } -/* ServiceBrokerHardwareplatformsGetInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerHardwareplatformsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -83,9 +416,44 @@ type ServiceBrokerHardwareplatformsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker hardwareplatforms get internal server error response has a 2xx status code +func (o *ServiceBrokerHardwareplatformsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker hardwareplatforms get internal server error response has a 3xx status code +func (o *ServiceBrokerHardwareplatformsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker hardwareplatforms get internal server error response has a 4xx status code +func (o *ServiceBrokerHardwareplatformsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker hardwareplatforms get internal server error response has a 5xx status code +func (o *ServiceBrokerHardwareplatformsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker hardwareplatforms get internal server error response a status code equal to that given +func (o *ServiceBrokerHardwareplatformsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker hardwareplatforms get internal server error response +func (o *ServiceBrokerHardwareplatformsGetInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerHardwareplatformsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerHardwareplatformsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /broker/v1/hardware-platforms][%d] serviceBrokerHardwareplatformsGetInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerHardwareplatformsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/iaas_service_broker_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/iaas_service_broker_client.go index fee72986f6b..8b17788137b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/iaas_service_broker_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/iaas_service_broker_client.go @@ -42,7 +42,7 @@ type ClientService interface { } /* - ServiceBrokerHealth gets current server health +ServiceBrokerHealth gets current server health */ func (a *Client) ServiceBrokerHealth(params *ServiceBrokerHealthParams, opts ...ClientOption) (*ServiceBrokerHealthOK, error) { // TODO: Validate the params before sending @@ -80,7 +80,7 @@ func (a *Client) ServiceBrokerHealth(params *ServiceBrokerHealthParams, opts ... } /* - ServiceBrokerHealthHead gets current server health +ServiceBrokerHealthHead gets current server health */ func (a *Client) ServiceBrokerHealthHead(params *ServiceBrokerHealthHeadParams, opts ...ClientOption) (*ServiceBrokerHealthHeadOK, error) { // TODO: Validate the params before sending @@ -118,7 +118,7 @@ func (a *Client) ServiceBrokerHealthHead(params *ServiceBrokerHealthHeadParams, } /* - ServiceBrokerTestTimeout gets current server version +ServiceBrokerTestTimeout gets current server version */ func (a *Client) ServiceBrokerTestTimeout(params *ServiceBrokerTestTimeoutParams, opts ...ClientOption) (*ServiceBrokerTestTimeoutOK, error) { // TODO: Validate the params before sending @@ -156,7 +156,7 @@ func (a *Client) ServiceBrokerTestTimeout(params *ServiceBrokerTestTimeoutParams } /* - ServiceBrokerVersion gets current server version +ServiceBrokerVersion gets current server version */ func (a *Client) ServiceBrokerVersion(params *ServiceBrokerVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerVersionOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_parameters.go index 04086695929..a5be3690099 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerHealthHeadParamsWithHTTPClient(client *http.Client) *Servic } } -/* ServiceBrokerHealthHeadParams contains all the parameters to send to the API endpoint - for the service broker health head operation. +/* +ServiceBrokerHealthHeadParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker health head operation. + + Typically these are written to a http.Request. */ type ServiceBrokerHealthHeadParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_responses.go index 3af3bd54575..53719cfabd0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_head_responses.go @@ -35,8 +35,26 @@ 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[HEAD /broker/v1/health] serviceBroker.health.head", response, response.Code()) } } @@ -45,7 +63,8 @@ func NewServiceBrokerHealthHeadOK() *ServiceBrokerHealthHeadOK { return &ServiceBrokerHealthHeadOK{} } -/* ServiceBrokerHealthHeadOK describes a response with status code 200, with default header values. +/* +ServiceBrokerHealthHeadOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +72,44 @@ type ServiceBrokerHealthHeadOK struct { Payload *models.Health } +// IsSuccess returns true when this service broker health head o k response has a 2xx status code +func (o *ServiceBrokerHealthHeadOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker health head o k response has a 3xx status code +func (o *ServiceBrokerHealthHeadOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health head o k response has a 4xx status code +func (o *ServiceBrokerHealthHeadOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker health head o k response has a 5xx status code +func (o *ServiceBrokerHealthHeadOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health head o k response a status code equal to that given +func (o *ServiceBrokerHealthHeadOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker health head o k response +func (o *ServiceBrokerHealthHeadOK) Code() int { + return 200 +} + func (o *ServiceBrokerHealthHeadOK) Error() string { return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerHealthHeadOK) String() string { + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerHealthHeadOK) GetPayload() *models.Health { return o.Payload } @@ -77,7 +131,8 @@ func NewServiceBrokerHealthHeadBadRequest() *ServiceBrokerHealthHeadBadRequest { return &ServiceBrokerHealthHeadBadRequest{} } -/* ServiceBrokerHealthHeadBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerHealthHeadBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -85,9 +140,44 @@ type ServiceBrokerHealthHeadBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker health head bad request response has a 2xx status code +func (o *ServiceBrokerHealthHeadBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker health head bad request response has a 3xx status code +func (o *ServiceBrokerHealthHeadBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health head bad request response has a 4xx status code +func (o *ServiceBrokerHealthHeadBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker health head bad request response has a 5xx status code +func (o *ServiceBrokerHealthHeadBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health head bad request response a status code equal to that given +func (o *ServiceBrokerHealthHeadBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker health head bad request response +func (o *ServiceBrokerHealthHeadBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerHealthHeadBadRequest) Error() string { return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerHealthHeadBadRequest) String() string { + return fmt.Sprintf("[HEAD /broker/v1/health][%d] serviceBrokerHealthHeadBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerHealthHeadBadRequest) GetPayload() *models.Error { return o.Payload } @@ -103,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_parameters.go index bed2ea2fcab..6f9e2010380 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerHealthParamsWithHTTPClient(client *http.Client) *ServiceBro } } -/* ServiceBrokerHealthParams contains all the parameters to send to the API endpoint - for the service broker health operation. +/* +ServiceBrokerHealthParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker health operation. + + Typically these are written to a http.Request. */ type ServiceBrokerHealthParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_responses.go index 9ad3dd6b5d9..e5a1f2fa0a7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_health_responses.go @@ -35,8 +35,26 @@ 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/health] serviceBroker.health", response, response.Code()) } } @@ -45,7 +63,8 @@ func NewServiceBrokerHealthOK() *ServiceBrokerHealthOK { return &ServiceBrokerHealthOK{} } -/* ServiceBrokerHealthOK describes a response with status code 200, with default header values. +/* +ServiceBrokerHealthOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +72,44 @@ type ServiceBrokerHealthOK struct { Payload *models.Health } +// IsSuccess returns true when this service broker health o k response has a 2xx status code +func (o *ServiceBrokerHealthOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker health o k response has a 3xx status code +func (o *ServiceBrokerHealthOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health o k response has a 4xx status code +func (o *ServiceBrokerHealthOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker health o k response has a 5xx status code +func (o *ServiceBrokerHealthOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health o k response a status code equal to that given +func (o *ServiceBrokerHealthOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker health o k response +func (o *ServiceBrokerHealthOK) Code() int { + return 200 +} + func (o *ServiceBrokerHealthOK) Error() string { return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerHealthOK) String() string { + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerHealthOK) GetPayload() *models.Health { return o.Payload } @@ -77,7 +131,8 @@ func NewServiceBrokerHealthBadRequest() *ServiceBrokerHealthBadRequest { return &ServiceBrokerHealthBadRequest{} } -/* ServiceBrokerHealthBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerHealthBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -85,9 +140,44 @@ type ServiceBrokerHealthBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker health bad request response has a 2xx status code +func (o *ServiceBrokerHealthBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker health bad request response has a 3xx status code +func (o *ServiceBrokerHealthBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker health bad request response has a 4xx status code +func (o *ServiceBrokerHealthBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker health bad request response has a 5xx status code +func (o *ServiceBrokerHealthBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker health bad request response a status code equal to that given +func (o *ServiceBrokerHealthBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker health bad request response +func (o *ServiceBrokerHealthBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerHealthBadRequest) Error() string { return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerHealthBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/health][%d] serviceBrokerHealthBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerHealthBadRequest) GetPayload() *models.Error { return o.Payload } @@ -103,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_parameters.go index aec4dc2a330..f401a8bd6ab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_parameters.go @@ -53,10 +53,12 @@ func NewServiceBrokerTestTimeoutParamsWithHTTPClient(client *http.Client) *Servi } } -/* ServiceBrokerTestTimeoutParams contains all the parameters to send to the API endpoint - for the service broker test timeout operation. +/* +ServiceBrokerTestTimeoutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker test timeout operation. + + Typically these are written to a http.Request. */ type ServiceBrokerTestTimeoutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_responses.go index 4aee22ea56b..5660b04cf99 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_test_timeout_responses.go @@ -29,8 +29,32 @@ 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/test/timeout] serviceBroker.test.timeout", response, response.Code()) } } @@ -39,7 +63,8 @@ func NewServiceBrokerTestTimeoutOK() *ServiceBrokerTestTimeoutOK { return &ServiceBrokerTestTimeoutOK{} } -/* ServiceBrokerTestTimeoutOK describes a response with status code 200, with default header values. +/* +ServiceBrokerTestTimeoutOK describes a response with status code 200, with default header values. OK */ @@ -47,9 +72,44 @@ type ServiceBrokerTestTimeoutOK struct { Payload models.Object } +// IsSuccess returns true when this service broker test timeout o k response has a 2xx status code +func (o *ServiceBrokerTestTimeoutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker test timeout o k response has a 3xx status code +func (o *ServiceBrokerTestTimeoutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker test timeout o k response has a 4xx status code +func (o *ServiceBrokerTestTimeoutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker test timeout o k response has a 5xx status code +func (o *ServiceBrokerTestTimeoutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker test timeout o k response a status code equal to that given +func (o *ServiceBrokerTestTimeoutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker test timeout o k response +func (o *ServiceBrokerTestTimeoutOK) Code() int { + return 200 +} + func (o *ServiceBrokerTestTimeoutOK) Error() string { return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerTestTimeoutOK) String() string { + return fmt.Sprintf("[GET /broker/v1/test/timeout][%d] serviceBrokerTestTimeoutOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerTestTimeoutOK) GetPayload() models.Object { return o.Payload } @@ -63,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_parameters.go index 6afbe895cfe..99b839db211 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerVersionParamsWithHTTPClient(client *http.Client) *ServiceBr } } -/* ServiceBrokerVersionParams contains all the parameters to send to the API endpoint - for the service broker version operation. +/* +ServiceBrokerVersionParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker version operation. + + Typically these are written to a http.Request. */ type ServiceBrokerVersionParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_responses.go index 85c8fc176c3..23b0bf2a077 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker/service_broker_version_responses.go @@ -35,8 +35,26 @@ 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/version] serviceBroker.version", response, response.Code()) } } @@ -45,7 +63,8 @@ func NewServiceBrokerVersionOK() *ServiceBrokerVersionOK { return &ServiceBrokerVersionOK{} } -/* ServiceBrokerVersionOK describes a response with status code 200, with default header values. +/* +ServiceBrokerVersionOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +72,44 @@ type ServiceBrokerVersionOK struct { Payload *models.Version } +// IsSuccess returns true when this service broker version o k response has a 2xx status code +func (o *ServiceBrokerVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker version o k response has a 3xx status code +func (o *ServiceBrokerVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker version o k response has a 4xx status code +func (o *ServiceBrokerVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker version o k response has a 5xx status code +func (o *ServiceBrokerVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker version o k response a status code equal to that given +func (o *ServiceBrokerVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker version o k response +func (o *ServiceBrokerVersionOK) Code() int { + return 200 +} + func (o *ServiceBrokerVersionOK) Error() string { return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerVersionOK) String() string { + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerVersionOK) GetPayload() *models.Version { return o.Payload } @@ -77,7 +131,8 @@ func NewServiceBrokerVersionBadRequest() *ServiceBrokerVersionBadRequest { return &ServiceBrokerVersionBadRequest{} } -/* ServiceBrokerVersionBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerVersionBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -85,9 +140,44 @@ type ServiceBrokerVersionBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker version bad request response has a 2xx status code +func (o *ServiceBrokerVersionBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker version bad request response has a 3xx status code +func (o *ServiceBrokerVersionBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker version bad request response has a 4xx status code +func (o *ServiceBrokerVersionBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker version bad request response has a 5xx status code +func (o *ServiceBrokerVersionBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker version bad request response a status code equal to that given +func (o *ServiceBrokerVersionBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker version bad request response +func (o *ServiceBrokerVersionBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerVersionBadRequest) Error() string { return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerVersionBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/version][%d] serviceBrokerVersionBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerVersionBadRequest) GetPayload() *models.Error { return o.Payload } @@ -103,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go index 1c14c10832e..3c26fc52d50 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - InternalV1PowervsInstancesGet gets list of power v s cloud instances +InternalV1PowervsInstancesGet gets list of power v s cloud instances */ func (a *Client) InternalV1PowervsInstancesGet(params *InternalV1PowervsInstancesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1PowervsInstancesGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_parameters.go index 05ff188332d..d70686db83d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_parameters.go @@ -52,10 +52,12 @@ func NewInternalV1PowervsInstancesGetParamsWithHTTPClient(client *http.Client) * } } -/* InternalV1PowervsInstancesGetParams contains all the parameters to send to the API endpoint - for the internal v1 powervs instances get operation. +/* +InternalV1PowervsInstancesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the internal v1 powervs instances get operation. + + Typically these are written to a http.Request. */ type InternalV1PowervsInstancesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go index e8d4224a3e3..b84da6e32ce 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go @@ -42,7 +42,7 @@ func (o *InternalV1PowervsInstancesGetReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /internal/v1/powervs/instances] internal.v1.powervs.instances.get", response, response.Code()) } } @@ -51,7 +51,8 @@ func NewInternalV1PowervsInstancesGetOK() *InternalV1PowervsInstancesGetOK { return &InternalV1PowervsInstancesGetOK{} } -/* InternalV1PowervsInstancesGetOK describes a response with status code 200, with default header values. +/* +InternalV1PowervsInstancesGetOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +60,44 @@ type InternalV1PowervsInstancesGetOK struct { Payload *models.PowerVSInstances } +// IsSuccess returns true when this internal v1 powervs instances get o k response has a 2xx status code +func (o *InternalV1PowervsInstancesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 powervs instances get o k response has a 3xx status code +func (o *InternalV1PowervsInstancesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 powervs instances get o k response has a 4xx status code +func (o *InternalV1PowervsInstancesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 powervs instances get o k response has a 5xx status code +func (o *InternalV1PowervsInstancesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 powervs instances get o k response a status code equal to that given +func (o *InternalV1PowervsInstancesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the internal v1 powervs instances get o k response +func (o *InternalV1PowervsInstancesGetOK) Code() int { + return 200 +} + func (o *InternalV1PowervsInstancesGetOK) Error() string { return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetOK %+v", 200, o.Payload) } + +func (o *InternalV1PowervsInstancesGetOK) String() string { + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetOK %+v", 200, o.Payload) +} + func (o *InternalV1PowervsInstancesGetOK) GetPayload() *models.PowerVSInstances { return o.Payload } @@ -83,7 +119,8 @@ func NewInternalV1PowervsInstancesGetForbidden() *InternalV1PowervsInstancesGetF return &InternalV1PowervsInstancesGetForbidden{} } -/* InternalV1PowervsInstancesGetForbidden describes a response with status code 403, with default header values. +/* +InternalV1PowervsInstancesGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -91,9 +128,44 @@ type InternalV1PowervsInstancesGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 powervs instances get forbidden response has a 2xx status code +func (o *InternalV1PowervsInstancesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 powervs instances get forbidden response has a 3xx status code +func (o *InternalV1PowervsInstancesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 powervs instances get forbidden response has a 4xx status code +func (o *InternalV1PowervsInstancesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 powervs instances get forbidden response has a 5xx status code +func (o *InternalV1PowervsInstancesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 powervs instances get forbidden response a status code equal to that given +func (o *InternalV1PowervsInstancesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 powervs instances get forbidden response +func (o *InternalV1PowervsInstancesGetForbidden) Code() int { + return 403 +} + func (o *InternalV1PowervsInstancesGetForbidden) Error() string { return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetForbidden %+v", 403, o.Payload) } + +func (o *InternalV1PowervsInstancesGetForbidden) String() string { + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetForbidden %+v", 403, o.Payload) +} + func (o *InternalV1PowervsInstancesGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -115,7 +187,8 @@ func NewInternalV1PowervsInstancesGetInternalServerError() *InternalV1PowervsIns return &InternalV1PowervsInstancesGetInternalServerError{} } -/* InternalV1PowervsInstancesGetInternalServerError describes a response with status code 500, with default header values. +/* +InternalV1PowervsInstancesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +196,44 @@ type InternalV1PowervsInstancesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 powervs instances get internal server error response has a 2xx status code +func (o *InternalV1PowervsInstancesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 powervs instances get internal server error response has a 3xx status code +func (o *InternalV1PowervsInstancesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 powervs instances get internal server error response has a 4xx status code +func (o *InternalV1PowervsInstancesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 powervs instances get internal server error response has a 5xx status code +func (o *InternalV1PowervsInstancesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 powervs instances get internal server error response a status code equal to that given +func (o *InternalV1PowervsInstancesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 powervs instances get internal server error response +func (o *InternalV1PowervsInstancesGetInternalServerError) Code() int { + return 500 +} + func (o *InternalV1PowervsInstancesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetInternalServerError %+v", 500, o.Payload) } + +func (o *InternalV1PowervsInstancesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetInternalServerError %+v", 500, o.Payload) +} + func (o *InternalV1PowervsInstancesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go index 46254944e07..0e67d48ed05 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - InternalV1PowervsLocationsTransitgatewayGet gets list of p e r enabled power v s locations +InternalV1PowervsLocationsTransitgatewayGet gets list of p e r enabled power v s locations */ func (a *Client) InternalV1PowervsLocationsTransitgatewayGet(params *InternalV1PowervsLocationsTransitgatewayGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1PowervsLocationsTransitgatewayGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_parameters.go index b2cd034a671..1de5554bd1d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_parameters.go @@ -52,10 +52,12 @@ func NewInternalV1PowervsLocationsTransitgatewayGetParamsWithHTTPClient(client * } } -/* InternalV1PowervsLocationsTransitgatewayGetParams contains all the parameters to send to the API endpoint - for the internal v1 powervs locations transitgateway get operation. +/* +InternalV1PowervsLocationsTransitgatewayGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the internal v1 powervs locations transitgateway get operation. + + Typically these are written to a http.Request. */ type InternalV1PowervsLocationsTransitgatewayGetParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go index e55ecdb219a..a65dc9f3d52 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go @@ -42,7 +42,7 @@ func (o *InternalV1PowervsLocationsTransitgatewayGetReader) ReadResponse(respons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /internal/v1/powervs/locations/transit-gateway] internal.v1.powervs.locations.transitgateway.get", response, response.Code()) } } @@ -51,7 +51,8 @@ func NewInternalV1PowervsLocationsTransitgatewayGetOK() *InternalV1PowervsLocati return &InternalV1PowervsLocationsTransitgatewayGetOK{} } -/* InternalV1PowervsLocationsTransitgatewayGetOK describes a response with status code 200, with default header values. +/* +InternalV1PowervsLocationsTransitgatewayGetOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +60,44 @@ type InternalV1PowervsLocationsTransitgatewayGetOK struct { Payload *models.TransitGatewayLocations } +// IsSuccess returns true when this internal v1 powervs locations transitgateway get o k response has a 2xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 powervs locations transitgateway get o k response has a 3xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 powervs locations transitgateway get o k response has a 4xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 powervs locations transitgateway get o k response has a 5xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 powervs locations transitgateway get o k response a status code equal to that given +func (o *InternalV1PowervsLocationsTransitgatewayGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the internal v1 powervs locations transitgateway get o k response +func (o *InternalV1PowervsLocationsTransitgatewayGetOK) Code() int { + return 200 +} + func (o *InternalV1PowervsLocationsTransitgatewayGetOK) Error() string { return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetOK %+v", 200, o.Payload) } + +func (o *InternalV1PowervsLocationsTransitgatewayGetOK) String() string { + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetOK %+v", 200, o.Payload) +} + func (o *InternalV1PowervsLocationsTransitgatewayGetOK) GetPayload() *models.TransitGatewayLocations { return o.Payload } @@ -83,7 +119,8 @@ func NewInternalV1PowervsLocationsTransitgatewayGetForbidden() *InternalV1Powerv return &InternalV1PowervsLocationsTransitgatewayGetForbidden{} } -/* InternalV1PowervsLocationsTransitgatewayGetForbidden describes a response with status code 403, with default header values. +/* +InternalV1PowervsLocationsTransitgatewayGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -91,9 +128,44 @@ type InternalV1PowervsLocationsTransitgatewayGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 powervs locations transitgateway get forbidden response has a 2xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 powervs locations transitgateway get forbidden response has a 3xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 powervs locations transitgateway get forbidden response has a 4xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 powervs locations transitgateway get forbidden response has a 5xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 powervs locations transitgateway get forbidden response a status code equal to that given +func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 powervs locations transitgateway get forbidden response +func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) Code() int { + return 403 +} + func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) Error() string { return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetForbidden %+v", 403, o.Payload) } + +func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) String() string { + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetForbidden %+v", 403, o.Payload) +} + func (o *InternalV1PowervsLocationsTransitgatewayGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -115,7 +187,8 @@ func NewInternalV1PowervsLocationsTransitgatewayGetInternalServerError() *Intern return &InternalV1PowervsLocationsTransitgatewayGetInternalServerError{} } -/* InternalV1PowervsLocationsTransitgatewayGetInternalServerError describes a response with status code 500, with default header values. +/* +InternalV1PowervsLocationsTransitgatewayGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +196,44 @@ type InternalV1PowervsLocationsTransitgatewayGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 powervs locations transitgateway get internal server error response has a 2xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 powervs locations transitgateway get internal server error response has a 3xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 powervs locations transitgateway get internal server error response has a 4xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 powervs locations transitgateway get internal server error response has a 5xx status code +func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 powervs locations transitgateway get internal server error response a status code equal to that given +func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 powervs locations transitgateway get internal server error response +func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) Code() int { + return 500 +} + func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) Error() string { return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetInternalServerError %+v", 500, o.Payload) } + +func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) String() string { + return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetInternalServerError %+v", 500, o.Payload) +} + func (o *InternalV1PowervsLocationsTransitgatewayGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_storage_regions_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_storage_regions_client.go index eb44b6d75aa..6c57756c89a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_storage_regions_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_storage_regions_client.go @@ -44,7 +44,7 @@ type ClientService interface { } /* - InternalV1StorageRegionsStoragePoolsGet gets the settings for given pool name +InternalV1StorageRegionsStoragePoolsGet gets the settings for given pool name */ func (a *Client) InternalV1StorageRegionsStoragePoolsGet(params *InternalV1StorageRegionsStoragePoolsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsStoragePoolsGetOK, error) { // TODO: Validate the params before sending @@ -83,7 +83,7 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsGet(params *InternalV1Stora } /* - InternalV1StorageRegionsStoragePoolsGetall gets the current storage pools settings for a region zone +InternalV1StorageRegionsStoragePoolsGetall gets the current storage pools settings for a region zone */ func (a *Client) InternalV1StorageRegionsStoragePoolsGetall(params *InternalV1StorageRegionsStoragePoolsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsStoragePoolsGetallOK, error) { // TODO: Validate the params before sending @@ -122,7 +122,7 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsGetall(params *InternalV1St } /* - InternalV1StorageRegionsStoragePoolsPut updates the settings for given pool name +InternalV1StorageRegionsStoragePoolsPut updates the settings for given pool name */ func (a *Client) InternalV1StorageRegionsStoragePoolsPut(params *InternalV1StorageRegionsStoragePoolsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsStoragePoolsPutOK, error) { // TODO: Validate the params before sending @@ -161,7 +161,7 @@ func (a *Client) InternalV1StorageRegionsStoragePoolsPut(params *InternalV1Stora } /* - InternalV1StorageRegionsThresholdsGet gets the current default threshold settings for a region zone +InternalV1StorageRegionsThresholdsGet gets the current default threshold settings for a region zone */ func (a *Client) InternalV1StorageRegionsThresholdsGet(params *InternalV1StorageRegionsThresholdsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsThresholdsGetOK, error) { // TODO: Validate the params before sending @@ -200,7 +200,7 @@ func (a *Client) InternalV1StorageRegionsThresholdsGet(params *InternalV1Storage } /* - InternalV1StorageRegionsThresholdsPut updates a default threshold setting for a region zone +InternalV1StorageRegionsThresholdsPut updates a default threshold setting for a region zone */ func (a *Client) InternalV1StorageRegionsThresholdsPut(params *InternalV1StorageRegionsThresholdsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1StorageRegionsThresholdsPutAccepted, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_parameters.go index 7f5c37e4b22..a3c88e2afd3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_parameters.go @@ -52,10 +52,12 @@ func NewInternalV1StorageRegionsStoragePoolsGetParamsWithHTTPClient(client *http } } -/* InternalV1StorageRegionsStoragePoolsGetParams contains all the parameters to send to the API endpoint - for the internal v1 storage regions storage pools get operation. +/* +InternalV1StorageRegionsStoragePoolsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the internal v1 storage regions storage pools get operation. + + Typically these are written to a http.Request. */ type InternalV1StorageRegionsStoragePoolsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go index 4cb42f88364..8bf2e4d2179 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go @@ -35,6 +35,12 @@ func (o *InternalV1StorageRegionsStoragePoolsGetReader) ReadResponse(response ru return nil, err } return nil, result + case 403: + result := NewInternalV1StorageRegionsStoragePoolsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewInternalV1StorageRegionsStoragePoolsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +54,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetReader) ReadResponse(response ru } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}] internal.v1.storage.regions.storage-pools.get", response, response.Code()) } } @@ -57,7 +63,8 @@ func NewInternalV1StorageRegionsStoragePoolsGetOK() *InternalV1StorageRegionsSto return &InternalV1StorageRegionsStoragePoolsGetOK{} } -/* InternalV1StorageRegionsStoragePoolsGetOK describes a response with status code 200, with default header values. +/* +InternalV1StorageRegionsStoragePoolsGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +72,44 @@ type InternalV1StorageRegionsStoragePoolsGetOK struct { Payload models.StoragePools } +// IsSuccess returns true when this internal v1 storage regions storage pools get o k response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 storage regions storage pools get o k response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools get o k response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions storage pools get o k response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools get o k response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the internal v1 storage regions storage pools get o k response +func (o *InternalV1StorageRegionsStoragePoolsGetOK) Code() int { + return 200 +} + func (o *InternalV1StorageRegionsStoragePoolsGetOK) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetOK %+v", 200, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsGetOK) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetOK %+v", 200, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsGetOK) GetPayload() models.StoragePools { return o.Payload } @@ -87,7 +129,8 @@ func NewInternalV1StorageRegionsStoragePoolsGetUnauthorized() *InternalV1Storage return &InternalV1StorageRegionsStoragePoolsGetUnauthorized{} } -/* InternalV1StorageRegionsStoragePoolsGetUnauthorized describes a response with status code 401, with default header values. +/* +InternalV1StorageRegionsStoragePoolsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -95,9 +138,44 @@ type InternalV1StorageRegionsStoragePoolsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools get unauthorized response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools get unauthorized response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools get unauthorized response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools get unauthorized response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools get unauthorized response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the internal v1 storage regions storage pools get unauthorized response +func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) Code() int { + return 401 +} + func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetUnauthorized %+v", 401, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetUnauthorized %+v", 401, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -114,12 +192,81 @@ func (o *InternalV1StorageRegionsStoragePoolsGetUnauthorized) readResponse(respo return nil } +// NewInternalV1StorageRegionsStoragePoolsGetForbidden creates a InternalV1StorageRegionsStoragePoolsGetForbidden with default headers values +func NewInternalV1StorageRegionsStoragePoolsGetForbidden() *InternalV1StorageRegionsStoragePoolsGetForbidden { + return &InternalV1StorageRegionsStoragePoolsGetForbidden{} +} + +/* +InternalV1StorageRegionsStoragePoolsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type InternalV1StorageRegionsStoragePoolsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 storage regions storage pools get forbidden response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools get forbidden response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools get forbidden response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools get forbidden response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools get forbidden response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 storage regions storage pools get forbidden response +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) Code() int { + return 403 +} + +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) Error() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetForbidden %+v", 403, o.Payload) +} + +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetForbidden %+v", 403, o.Payload) +} + +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1StorageRegionsStoragePoolsGetForbidden) 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 +} + // NewInternalV1StorageRegionsStoragePoolsGetNotFound creates a InternalV1StorageRegionsStoragePoolsGetNotFound with default headers values func NewInternalV1StorageRegionsStoragePoolsGetNotFound() *InternalV1StorageRegionsStoragePoolsGetNotFound { return &InternalV1StorageRegionsStoragePoolsGetNotFound{} } -/* InternalV1StorageRegionsStoragePoolsGetNotFound describes a response with status code 404, with default header values. +/* +InternalV1StorageRegionsStoragePoolsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -127,9 +274,44 @@ type InternalV1StorageRegionsStoragePoolsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools get not found response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools get not found response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools get not found response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools get not found response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools get not found response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the internal v1 storage regions storage pools get not found response +func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) Code() int { + return 404 +} + func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetNotFound %+v", 404, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetNotFound %+v", 404, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -151,7 +333,8 @@ func NewInternalV1StorageRegionsStoragePoolsGetInternalServerError() *InternalV1 return &InternalV1StorageRegionsStoragePoolsGetInternalServerError{} } -/* InternalV1StorageRegionsStoragePoolsGetInternalServerError describes a response with status code 500, with default header values. +/* +InternalV1StorageRegionsStoragePoolsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -159,9 +342,44 @@ type InternalV1StorageRegionsStoragePoolsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools get internal server error response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools get internal server error response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools get internal server error response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions storage pools get internal server error response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 storage regions storage pools get internal server error response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 storage regions storage pools get internal server error response +func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) Code() int { + return 500 +} + func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetInternalServerError %+v", 500, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsGetInternalServerError %+v", 500, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_parameters.go index cda5153c50b..a2535590d67 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_parameters.go @@ -52,10 +52,12 @@ func NewInternalV1StorageRegionsStoragePoolsGetallParamsWithHTTPClient(client *h } } -/* InternalV1StorageRegionsStoragePoolsGetallParams contains all the parameters to send to the API endpoint - for the internal v1 storage regions storage pools getall operation. +/* +InternalV1StorageRegionsStoragePoolsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the internal v1 storage regions storage pools getall operation. + + Typically these are written to a http.Request. */ type InternalV1StorageRegionsStoragePoolsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go index 1c654e2d53a..43e5acda24d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go @@ -35,6 +35,12 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallReader) ReadResponse(response return nil, err } return nil, result + case 403: + result := NewInternalV1StorageRegionsStoragePoolsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewInternalV1StorageRegionsStoragePoolsGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +54,7 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallReader) ReadResponse(response } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools] internal.v1.storage.regions.storage-pools.getall", response, response.Code()) } } @@ -57,7 +63,8 @@ func NewInternalV1StorageRegionsStoragePoolsGetallOK() *InternalV1StorageRegions return &InternalV1StorageRegionsStoragePoolsGetallOK{} } -/* InternalV1StorageRegionsStoragePoolsGetallOK describes a response with status code 200, with default header values. +/* +InternalV1StorageRegionsStoragePoolsGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +72,44 @@ type InternalV1StorageRegionsStoragePoolsGetallOK struct { Payload models.StoragePools } +// IsSuccess returns true when this internal v1 storage regions storage pools getall o k response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 storage regions storage pools getall o k response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools getall o k response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions storage pools getall o k response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools getall o k response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the internal v1 storage regions storage pools getall o k response +func (o *InternalV1StorageRegionsStoragePoolsGetallOK) Code() int { + return 200 +} + func (o *InternalV1StorageRegionsStoragePoolsGetallOK) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallOK %+v", 200, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsGetallOK) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallOK %+v", 200, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsGetallOK) GetPayload() models.StoragePools { return o.Payload } @@ -87,7 +129,8 @@ func NewInternalV1StorageRegionsStoragePoolsGetallUnauthorized() *InternalV1Stor return &InternalV1StorageRegionsStoragePoolsGetallUnauthorized{} } -/* InternalV1StorageRegionsStoragePoolsGetallUnauthorized describes a response with status code 401, with default header values. +/* +InternalV1StorageRegionsStoragePoolsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -95,9 +138,44 @@ type InternalV1StorageRegionsStoragePoolsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools getall unauthorized response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools getall unauthorized response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools getall unauthorized response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools getall unauthorized response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools getall unauthorized response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the internal v1 storage regions storage pools getall unauthorized response +func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) Code() int { + return 401 +} + func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -114,12 +192,81 @@ func (o *InternalV1StorageRegionsStoragePoolsGetallUnauthorized) readResponse(re return nil } +// NewInternalV1StorageRegionsStoragePoolsGetallForbidden creates a InternalV1StorageRegionsStoragePoolsGetallForbidden with default headers values +func NewInternalV1StorageRegionsStoragePoolsGetallForbidden() *InternalV1StorageRegionsStoragePoolsGetallForbidden { + return &InternalV1StorageRegionsStoragePoolsGetallForbidden{} +} + +/* +InternalV1StorageRegionsStoragePoolsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type InternalV1StorageRegionsStoragePoolsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 storage regions storage pools getall forbidden response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools getall forbidden response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools getall forbidden response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools getall forbidden response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools getall forbidden response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 storage regions storage pools getall forbidden response +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) Code() int { + return 403 +} + +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallForbidden %+v", 403, o.Payload) +} + +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallForbidden %+v", 403, o.Payload) +} + +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1StorageRegionsStoragePoolsGetallForbidden) 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 +} + // NewInternalV1StorageRegionsStoragePoolsGetallNotFound creates a InternalV1StorageRegionsStoragePoolsGetallNotFound with default headers values func NewInternalV1StorageRegionsStoragePoolsGetallNotFound() *InternalV1StorageRegionsStoragePoolsGetallNotFound { return &InternalV1StorageRegionsStoragePoolsGetallNotFound{} } -/* InternalV1StorageRegionsStoragePoolsGetallNotFound describes a response with status code 404, with default header values. +/* +InternalV1StorageRegionsStoragePoolsGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -127,9 +274,44 @@ type InternalV1StorageRegionsStoragePoolsGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools getall not found response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools getall not found response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools getall not found response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools getall not found response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools getall not found response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the internal v1 storage regions storage pools getall not found response +func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) Code() int { + return 404 +} + func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallNotFound %+v", 404, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallNotFound %+v", 404, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -151,7 +333,8 @@ func NewInternalV1StorageRegionsStoragePoolsGetallInternalServerError() *Interna return &InternalV1StorageRegionsStoragePoolsGetallInternalServerError{} } -/* InternalV1StorageRegionsStoragePoolsGetallInternalServerError describes a response with status code 500, with default header values. +/* +InternalV1StorageRegionsStoragePoolsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -159,9 +342,44 @@ type InternalV1StorageRegionsStoragePoolsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools getall internal server error response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools getall internal server error response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools getall internal server error response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions storage pools getall internal server error response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 storage regions storage pools getall internal server error response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 storage regions storage pools getall internal server error response +func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) Code() int { + return 500 +} + func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/storage-pools][%d] internalV1StorageRegionsStoragePoolsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_parameters.go index 624f961b4c7..675a4d07f9d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_parameters.go @@ -54,10 +54,12 @@ func NewInternalV1StorageRegionsStoragePoolsPutParamsWithHTTPClient(client *http } } -/* InternalV1StorageRegionsStoragePoolsPutParams contains all the parameters to send to the API endpoint - for the internal v1 storage regions storage pools put operation. +/* +InternalV1StorageRegionsStoragePoolsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the internal v1 storage regions storage pools put operation. + + Typically these are written to a http.Request. */ type InternalV1StorageRegionsStoragePoolsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go index f36b6457212..6df8bdf3f28 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go @@ -41,6 +41,12 @@ func (o *InternalV1StorageRegionsStoragePoolsPutReader) ReadResponse(response ru return nil, err } return nil, result + case 403: + result := NewInternalV1StorageRegionsStoragePoolsPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewInternalV1StorageRegionsStoragePoolsPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *InternalV1StorageRegionsStoragePoolsPutReader) ReadResponse(response ru } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}] internal.v1.storage.regions.storage-pools.put", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewInternalV1StorageRegionsStoragePoolsPutOK() *InternalV1StorageRegionsSto return &InternalV1StorageRegionsStoragePoolsPutOK{} } -/* InternalV1StorageRegionsStoragePoolsPutOK describes a response with status code 200, with default header values. +/* +InternalV1StorageRegionsStoragePoolsPutOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type InternalV1StorageRegionsStoragePoolsPutOK struct { Payload *models.StoragePool } +// IsSuccess returns true when this internal v1 storage regions storage pools put o k response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 storage regions storage pools put o k response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools put o k response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions storage pools put o k response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools put o k response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the internal v1 storage regions storage pools put o k response +func (o *InternalV1StorageRegionsStoragePoolsPutOK) Code() int { + return 200 +} + func (o *InternalV1StorageRegionsStoragePoolsPutOK) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutOK %+v", 200, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsPutOK) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutOK %+v", 200, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsPutOK) GetPayload() *models.StoragePool { return o.Payload } @@ -95,7 +137,8 @@ func NewInternalV1StorageRegionsStoragePoolsPutBadRequest() *InternalV1StorageRe return &InternalV1StorageRegionsStoragePoolsPutBadRequest{} } -/* InternalV1StorageRegionsStoragePoolsPutBadRequest describes a response with status code 400, with default header values. +/* +InternalV1StorageRegionsStoragePoolsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type InternalV1StorageRegionsStoragePoolsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools put bad request response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools put bad request response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools put bad request response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools put bad request response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools put bad request response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the internal v1 storage regions storage pools put bad request response +func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) Code() int { + return 400 +} + func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutBadRequest %+v", 400, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutBadRequest %+v", 400, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewInternalV1StorageRegionsStoragePoolsPutUnauthorized() *InternalV1Storage return &InternalV1StorageRegionsStoragePoolsPutUnauthorized{} } -/* InternalV1StorageRegionsStoragePoolsPutUnauthorized describes a response with status code 401, with default header values. +/* +InternalV1StorageRegionsStoragePoolsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type InternalV1StorageRegionsStoragePoolsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools put unauthorized response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools put unauthorized response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools put unauthorized response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools put unauthorized response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools put unauthorized response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the internal v1 storage regions storage pools put unauthorized response +func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) Code() int { + return 401 +} + func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutUnauthorized %+v", 401, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutUnauthorized %+v", 401, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *InternalV1StorageRegionsStoragePoolsPutUnauthorized) readResponse(respo return nil } +// NewInternalV1StorageRegionsStoragePoolsPutForbidden creates a InternalV1StorageRegionsStoragePoolsPutForbidden with default headers values +func NewInternalV1StorageRegionsStoragePoolsPutForbidden() *InternalV1StorageRegionsStoragePoolsPutForbidden { + return &InternalV1StorageRegionsStoragePoolsPutForbidden{} +} + +/* +InternalV1StorageRegionsStoragePoolsPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type InternalV1StorageRegionsStoragePoolsPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 storage regions storage pools put forbidden response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools put forbidden response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools put forbidden response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools put forbidden response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools put forbidden response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 storage regions storage pools put forbidden response +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) Code() int { + return 403 +} + +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) Error() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutForbidden %+v", 403, o.Payload) +} + +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutForbidden %+v", 403, o.Payload) +} + +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1StorageRegionsStoragePoolsPutForbidden) 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 +} + // NewInternalV1StorageRegionsStoragePoolsPutNotFound creates a InternalV1StorageRegionsStoragePoolsPutNotFound with default headers values func NewInternalV1StorageRegionsStoragePoolsPutNotFound() *InternalV1StorageRegionsStoragePoolsPutNotFound { return &InternalV1StorageRegionsStoragePoolsPutNotFound{} } -/* InternalV1StorageRegionsStoragePoolsPutNotFound describes a response with status code 404, with default header values. +/* +InternalV1StorageRegionsStoragePoolsPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type InternalV1StorageRegionsStoragePoolsPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools put not found response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools put not found response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools put not found response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions storage pools put not found response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions storage pools put not found response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the internal v1 storage regions storage pools put not found response +func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) Code() int { + return 404 +} + func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutNotFound %+v", 404, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutNotFound %+v", 404, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewInternalV1StorageRegionsStoragePoolsPutInternalServerError() *InternalV1 return &InternalV1StorageRegionsStoragePoolsPutInternalServerError{} } -/* InternalV1StorageRegionsStoragePoolsPutInternalServerError describes a response with status code 500, with default header values. +/* +InternalV1StorageRegionsStoragePoolsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type InternalV1StorageRegionsStoragePoolsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions storage pools put internal server error response has a 2xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions storage pools put internal server error response has a 3xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions storage pools put internal server error response has a 4xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions storage pools put internal server error response has a 5xx status code +func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 storage regions storage pools put internal server error response a status code equal to that given +func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 storage regions storage pools put internal server error response +func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) Code() int { + return 500 +} + func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutInternalServerError %+v", 500, o.Payload) } + +func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/storage-pools/{storage_pool_name}][%d] internalV1StorageRegionsStoragePoolsPutInternalServerError %+v", 500, o.Payload) +} + func (o *InternalV1StorageRegionsStoragePoolsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_parameters.go index c60d4fea48a..e7a53a59705 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_parameters.go @@ -52,10 +52,12 @@ func NewInternalV1StorageRegionsThresholdsGetParamsWithHTTPClient(client *http.C } } -/* InternalV1StorageRegionsThresholdsGetParams contains all the parameters to send to the API endpoint - for the internal v1 storage regions thresholds get operation. +/* +InternalV1StorageRegionsThresholdsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the internal v1 storage regions thresholds get operation. + + Typically these are written to a http.Request. */ type InternalV1StorageRegionsThresholdsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go index 87dbb71ea4d..0dd6944423e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go @@ -35,6 +35,12 @@ func (o *InternalV1StorageRegionsThresholdsGetReader) ReadResponse(response runt return nil, err } return nil, result + case 403: + result := NewInternalV1StorageRegionsThresholdsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewInternalV1StorageRegionsThresholdsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +54,7 @@ func (o *InternalV1StorageRegionsThresholdsGetReader) ReadResponse(response runt } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds] internal.v1.storage.regions.thresholds.get", response, response.Code()) } } @@ -57,7 +63,8 @@ func NewInternalV1StorageRegionsThresholdsGetOK() *InternalV1StorageRegionsThres return &InternalV1StorageRegionsThresholdsGetOK{} } -/* InternalV1StorageRegionsThresholdsGetOK describes a response with status code 200, with default header values. +/* +InternalV1StorageRegionsThresholdsGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +72,44 @@ type InternalV1StorageRegionsThresholdsGetOK struct { Payload *models.Thresholds } +// IsSuccess returns true when this internal v1 storage regions thresholds get o k response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 storage regions thresholds get o k response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds get o k response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions thresholds get o k response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds get o k response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the internal v1 storage regions thresholds get o k response +func (o *InternalV1StorageRegionsThresholdsGetOK) Code() int { + return 200 +} + func (o *InternalV1StorageRegionsThresholdsGetOK) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetOK %+v", 200, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsGetOK) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetOK %+v", 200, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsGetOK) GetPayload() *models.Thresholds { return o.Payload } @@ -89,7 +131,8 @@ func NewInternalV1StorageRegionsThresholdsGetUnauthorized() *InternalV1StorageRe return &InternalV1StorageRegionsThresholdsGetUnauthorized{} } -/* InternalV1StorageRegionsThresholdsGetUnauthorized describes a response with status code 401, with default header values. +/* +InternalV1StorageRegionsThresholdsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +140,44 @@ type InternalV1StorageRegionsThresholdsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds get unauthorized response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds get unauthorized response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds get unauthorized response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions thresholds get unauthorized response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds get unauthorized response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the internal v1 storage regions thresholds get unauthorized response +func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) Code() int { + return 401 +} + func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetUnauthorized %+v", 401, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetUnauthorized %+v", 401, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +194,81 @@ func (o *InternalV1StorageRegionsThresholdsGetUnauthorized) readResponse(respons return nil } +// NewInternalV1StorageRegionsThresholdsGetForbidden creates a InternalV1StorageRegionsThresholdsGetForbidden with default headers values +func NewInternalV1StorageRegionsThresholdsGetForbidden() *InternalV1StorageRegionsThresholdsGetForbidden { + return &InternalV1StorageRegionsThresholdsGetForbidden{} +} + +/* +InternalV1StorageRegionsThresholdsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type InternalV1StorageRegionsThresholdsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this internal v1 storage regions thresholds get forbidden response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds get forbidden response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds get forbidden response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions thresholds get forbidden response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds get forbidden response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 storage regions thresholds get forbidden response +func (o *InternalV1StorageRegionsThresholdsGetForbidden) Code() int { + return 403 +} + +func (o *InternalV1StorageRegionsThresholdsGetForbidden) Error() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetForbidden %+v", 403, o.Payload) +} + +func (o *InternalV1StorageRegionsThresholdsGetForbidden) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetForbidden %+v", 403, o.Payload) +} + +func (o *InternalV1StorageRegionsThresholdsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *InternalV1StorageRegionsThresholdsGetForbidden) 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 +} + // NewInternalV1StorageRegionsThresholdsGetNotFound creates a InternalV1StorageRegionsThresholdsGetNotFound with default headers values func NewInternalV1StorageRegionsThresholdsGetNotFound() *InternalV1StorageRegionsThresholdsGetNotFound { return &InternalV1StorageRegionsThresholdsGetNotFound{} } -/* InternalV1StorageRegionsThresholdsGetNotFound describes a response with status code 404, with default header values. +/* +InternalV1StorageRegionsThresholdsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +276,44 @@ type InternalV1StorageRegionsThresholdsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds get not found response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds get not found response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds get not found response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions thresholds get not found response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds get not found response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the internal v1 storage regions thresholds get not found response +func (o *InternalV1StorageRegionsThresholdsGetNotFound) Code() int { + return 404 +} + func (o *InternalV1StorageRegionsThresholdsGetNotFound) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetNotFound %+v", 404, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsGetNotFound) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetNotFound %+v", 404, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +335,8 @@ func NewInternalV1StorageRegionsThresholdsGetInternalServerError() *InternalV1St return &InternalV1StorageRegionsThresholdsGetInternalServerError{} } -/* InternalV1StorageRegionsThresholdsGetInternalServerError describes a response with status code 500, with default header values. +/* +InternalV1StorageRegionsThresholdsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +344,44 @@ type InternalV1StorageRegionsThresholdsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds get internal server error response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds get internal server error response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds get internal server error response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions thresholds get internal server error response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 storage regions thresholds get internal server error response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 storage regions thresholds get internal server error response +func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) Code() int { + return 500 +} + func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetInternalServerError %+v", 500, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsGetInternalServerError %+v", 500, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_parameters.go index 37d8366532b..46f354ddc6e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_parameters.go @@ -54,10 +54,12 @@ func NewInternalV1StorageRegionsThresholdsPutParamsWithHTTPClient(client *http.C } } -/* InternalV1StorageRegionsThresholdsPutParams contains all the parameters to send to the API endpoint - for the internal v1 storage regions thresholds put operation. +/* +InternalV1StorageRegionsThresholdsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the internal v1 storage regions thresholds put operation. + + Typically these are written to a http.Request. */ type InternalV1StorageRegionsThresholdsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go index fab946caab8..c52a3f2bb32 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go @@ -66,7 +66,7 @@ func (o *InternalV1StorageRegionsThresholdsPutReader) ReadResponse(response runt } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds] internal.v1.storage.regions.thresholds.put", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewInternalV1StorageRegionsThresholdsPutAccepted() *InternalV1StorageRegion return &InternalV1StorageRegionsThresholdsPutAccepted{} } -/* InternalV1StorageRegionsThresholdsPutAccepted describes a response with status code 202, with default header values. +/* +InternalV1StorageRegionsThresholdsPutAccepted describes a response with status code 202, with default header values. OK, region-zone default threshold settings update */ @@ -83,9 +84,44 @@ type InternalV1StorageRegionsThresholdsPutAccepted struct { Payload *models.Thresholds } +// IsSuccess returns true when this internal v1 storage regions thresholds put accepted response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsPutAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 storage regions thresholds put accepted response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsPutAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds put accepted response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsPutAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions thresholds put accepted response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsPutAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds put accepted response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsPutAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the internal v1 storage regions thresholds put accepted response +func (o *InternalV1StorageRegionsThresholdsPutAccepted) Code() int { + return 202 +} + func (o *InternalV1StorageRegionsThresholdsPutAccepted) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutAccepted %+v", 202, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsPutAccepted) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutAccepted %+v", 202, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsPutAccepted) GetPayload() *models.Thresholds { return o.Payload } @@ -107,7 +143,8 @@ func NewInternalV1StorageRegionsThresholdsPutBadRequest() *InternalV1StorageRegi return &InternalV1StorageRegionsThresholdsPutBadRequest{} } -/* InternalV1StorageRegionsThresholdsPutBadRequest describes a response with status code 400, with default header values. +/* +InternalV1StorageRegionsThresholdsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type InternalV1StorageRegionsThresholdsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds put bad request response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds put bad request response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds put bad request response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions thresholds put bad request response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds put bad request response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the internal v1 storage regions thresholds put bad request response +func (o *InternalV1StorageRegionsThresholdsPutBadRequest) Code() int { + return 400 +} + func (o *InternalV1StorageRegionsThresholdsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutBadRequest %+v", 400, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutBadRequest %+v", 400, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewInternalV1StorageRegionsThresholdsPutUnauthorized() *InternalV1StorageRe return &InternalV1StorageRegionsThresholdsPutUnauthorized{} } -/* InternalV1StorageRegionsThresholdsPutUnauthorized describes a response with status code 401, with default header values. +/* +InternalV1StorageRegionsThresholdsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type InternalV1StorageRegionsThresholdsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds put unauthorized response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds put unauthorized response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds put unauthorized response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions thresholds put unauthorized response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds put unauthorized response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the internal v1 storage regions thresholds put unauthorized response +func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) Code() int { + return 401 +} + func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnauthorized %+v", 401, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnauthorized %+v", 401, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewInternalV1StorageRegionsThresholdsPutForbidden() *InternalV1StorageRegio return &InternalV1StorageRegionsThresholdsPutForbidden{} } -/* InternalV1StorageRegionsThresholdsPutForbidden describes a response with status code 403, with default header values. +/* +InternalV1StorageRegionsThresholdsPutForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type InternalV1StorageRegionsThresholdsPutForbidden struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds put forbidden response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds put forbidden response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds put forbidden response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions thresholds put forbidden response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds put forbidden response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 storage regions thresholds put forbidden response +func (o *InternalV1StorageRegionsThresholdsPutForbidden) Code() int { + return 403 +} + func (o *InternalV1StorageRegionsThresholdsPutForbidden) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutForbidden %+v", 403, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsPutForbidden) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutForbidden %+v", 403, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsPutForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewInternalV1StorageRegionsThresholdsPutConflict() *InternalV1StorageRegion return &InternalV1StorageRegionsThresholdsPutConflict{} } -/* InternalV1StorageRegionsThresholdsPutConflict describes a response with status code 409, with default header values. +/* +InternalV1StorageRegionsThresholdsPutConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +356,44 @@ type InternalV1StorageRegionsThresholdsPutConflict struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds put conflict response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsPutConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds put conflict response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsPutConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds put conflict response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsPutConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions thresholds put conflict response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsPutConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds put conflict response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsPutConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the internal v1 storage regions thresholds put conflict response +func (o *InternalV1StorageRegionsThresholdsPutConflict) Code() int { + return 409 +} + func (o *InternalV1StorageRegionsThresholdsPutConflict) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutConflict %+v", 409, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsPutConflict) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutConflict %+v", 409, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsPutConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewInternalV1StorageRegionsThresholdsPutUnprocessableEntity() *InternalV1St return &InternalV1StorageRegionsThresholdsPutUnprocessableEntity{} } -/* InternalV1StorageRegionsThresholdsPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +InternalV1StorageRegionsThresholdsPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +424,44 @@ type InternalV1StorageRegionsThresholdsPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds put unprocessable entity response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds put unprocessable entity response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds put unprocessable entity response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 storage regions thresholds put unprocessable entity response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 storage regions thresholds put unprocessable entity response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the internal v1 storage regions thresholds put unprocessable entity response +func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) Code() int { + return 422 +} + func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewInternalV1StorageRegionsThresholdsPutInternalServerError() *InternalV1St return &InternalV1StorageRegionsThresholdsPutInternalServerError{} } -/* InternalV1StorageRegionsThresholdsPutInternalServerError describes a response with status code 500, with default header values. +/* +InternalV1StorageRegionsThresholdsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type InternalV1StorageRegionsThresholdsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 storage regions thresholds put internal server error response has a 2xx status code +func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 storage regions thresholds put internal server error response has a 3xx status code +func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 storage regions thresholds put internal server error response has a 4xx status code +func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 storage regions thresholds put internal server error response has a 5xx status code +func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this internal v1 storage regions thresholds put internal server error response a status code equal to that given +func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the internal v1 storage regions thresholds put internal server error response +func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) Code() int { + return 500 +} + func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutInternalServerError %+v", 500, o.Payload) } + +func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /internal/v1/storage/regions/{region_zone_id}/thresholds][%d] internalV1StorageRegionsThresholdsPutInternalServerError %+v", 500, o.Payload) +} + func (o *InternalV1StorageRegionsThresholdsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_transit_gateway_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_transit_gateway_client.go index fac9ae4ecd7..7e54f6c30fc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_transit_gateway_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_transit_gateway_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - InternalV1TransitgatewayGet gets the cloud instance transit gateway information +InternalV1TransitgatewayGet gets the cloud instance transit gateway information */ func (a *Client) InternalV1TransitgatewayGet(params *InternalV1TransitgatewayGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*InternalV1TransitgatewayGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_parameters.go index 57d545991b2..123bbefcd23 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_parameters.go @@ -52,10 +52,12 @@ func NewInternalV1TransitgatewayGetParamsWithHTTPClient(client *http.Client) *In } } -/* InternalV1TransitgatewayGetParams contains all the parameters to send to the API endpoint - for the internal v1 transitgateway get operation. +/* +InternalV1TransitgatewayGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the internal v1 transitgateway get operation. + + Typically these are written to a http.Request. */ type InternalV1TransitgatewayGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go index 3d25a7110e9..e39c82b9a83 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go @@ -36,7 +36,7 @@ func (o *InternalV1TransitgatewayGetReader) ReadResponse(response runtime.Client } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /internal/v1/transit-gateway/{powervs_service_crn}] internal.v1.transitgateway.get", response, response.Code()) } } @@ -45,7 +45,8 @@ func NewInternalV1TransitgatewayGetOK() *InternalV1TransitgatewayGetOK { return &InternalV1TransitgatewayGetOK{} } -/* InternalV1TransitgatewayGetOK describes a response with status code 200, with default header values. +/* +InternalV1TransitgatewayGetOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +54,44 @@ type InternalV1TransitgatewayGetOK struct { Payload *models.TransitGatewayInstance } +// IsSuccess returns true when this internal v1 transitgateway get o k response has a 2xx status code +func (o *InternalV1TransitgatewayGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this internal v1 transitgateway get o k response has a 3xx status code +func (o *InternalV1TransitgatewayGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 transitgateway get o k response has a 4xx status code +func (o *InternalV1TransitgatewayGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this internal v1 transitgateway get o k response has a 5xx status code +func (o *InternalV1TransitgatewayGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 transitgateway get o k response a status code equal to that given +func (o *InternalV1TransitgatewayGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the internal v1 transitgateway get o k response +func (o *InternalV1TransitgatewayGetOK) Code() int { + return 200 +} + func (o *InternalV1TransitgatewayGetOK) Error() string { return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetOK %+v", 200, o.Payload) } + +func (o *InternalV1TransitgatewayGetOK) String() string { + return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetOK %+v", 200, o.Payload) +} + func (o *InternalV1TransitgatewayGetOK) GetPayload() *models.TransitGatewayInstance { return o.Payload } @@ -77,7 +113,8 @@ func NewInternalV1TransitgatewayGetForbidden() *InternalV1TransitgatewayGetForbi return &InternalV1TransitgatewayGetForbidden{} } -/* InternalV1TransitgatewayGetForbidden describes a response with status code 403, with default header values. +/* +InternalV1TransitgatewayGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -85,9 +122,44 @@ type InternalV1TransitgatewayGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this internal v1 transitgateway get forbidden response has a 2xx status code +func (o *InternalV1TransitgatewayGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this internal v1 transitgateway get forbidden response has a 3xx status code +func (o *InternalV1TransitgatewayGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this internal v1 transitgateway get forbidden response has a 4xx status code +func (o *InternalV1TransitgatewayGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this internal v1 transitgateway get forbidden response has a 5xx status code +func (o *InternalV1TransitgatewayGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this internal v1 transitgateway get forbidden response a status code equal to that given +func (o *InternalV1TransitgatewayGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the internal v1 transitgateway get forbidden response +func (o *InternalV1TransitgatewayGetForbidden) Code() int { + return 403 +} + func (o *InternalV1TransitgatewayGetForbidden) Error() string { return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetForbidden %+v", 403, o.Payload) } + +func (o *InternalV1TransitgatewayGetForbidden) String() string { + return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetForbidden %+v", 403, o.Payload) +} + func (o *InternalV1TransitgatewayGetForbidden) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/open_stacks_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/open_stacks_client.go index 693bef3bab1..7cce851ec80 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/open_stacks_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/open_stacks_client.go @@ -44,7 +44,7 @@ type ClientService interface { } /* - ServiceBrokerOpenstacksGet lists all open stack instances being managed +ServiceBrokerOpenstacksGet lists all open stack instances being managed */ func (a *Client) ServiceBrokerOpenstacksGet(params *ServiceBrokerOpenstacksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksGetOK, error) { // TODO: Validate the params before sending @@ -83,7 +83,7 @@ func (a *Client) ServiceBrokerOpenstacksGet(params *ServiceBrokerOpenstacksGetPa } /* - ServiceBrokerOpenstacksHostsGet lists account information for all pvm instances on hostname +ServiceBrokerOpenstacksHostsGet lists account information for all pvm instances on hostname */ func (a *Client) ServiceBrokerOpenstacksHostsGet(params *ServiceBrokerOpenstacksHostsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksHostsGetOK, error) { // TODO: Validate the params before sending @@ -122,7 +122,7 @@ func (a *Client) ServiceBrokerOpenstacksHostsGet(params *ServiceBrokerOpenstacks } /* - ServiceBrokerOpenstacksOpenstackGet lists account information for all pvm instances on hostname +ServiceBrokerOpenstacksOpenstackGet lists account information for all pvm instances on hostname */ func (a *Client) ServiceBrokerOpenstacksOpenstackGet(params *ServiceBrokerOpenstacksOpenstackGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksOpenstackGetOK, error) { // TODO: Validate the params before sending @@ -161,7 +161,7 @@ func (a *Client) ServiceBrokerOpenstacksOpenstackGet(params *ServiceBrokerOpenst } /* - ServiceBrokerOpenstacksPost creates a new open stack instance to be managed +ServiceBrokerOpenstacksPost creates a new open stack instance to be managed */ func (a *Client) ServiceBrokerOpenstacksPost(params *ServiceBrokerOpenstacksPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksPostOK, *ServiceBrokerOpenstacksPostCreated, error) { // TODO: Validate the params before sending @@ -201,7 +201,7 @@ func (a *Client) ServiceBrokerOpenstacksPost(params *ServiceBrokerOpenstacksPost } /* - ServiceBrokerOpenstacksServersGet lists account information for a pvm instance +ServiceBrokerOpenstacksServersGet lists account information for a pvm instance */ func (a *Client) ServiceBrokerOpenstacksServersGet(params *ServiceBrokerOpenstacksServersGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBrokerOpenstacksServersGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_parameters.go index a5fc89bfd6c..9ea71faefd9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerOpenstacksGetParamsWithHTTPClient(client *http.Client) *Ser } } -/* ServiceBrokerOpenstacksGetParams contains all the parameters to send to the API endpoint - for the service broker openstacks get operation. +/* +ServiceBrokerOpenstacksGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker openstacks get operation. + + Typically these are written to a http.Request. */ type ServiceBrokerOpenstacksGetParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_responses.go index c1903411789..4dc173d8688 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *ServiceBrokerOpenstacksGetReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/openstacks] serviceBroker.openstacks.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewServiceBrokerOpenstacksGetOK() *ServiceBrokerOpenstacksGetOK { return &ServiceBrokerOpenstacksGetOK{} } -/* ServiceBrokerOpenstacksGetOK describes a response with status code 200, with default header values. +/* +ServiceBrokerOpenstacksGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type ServiceBrokerOpenstacksGetOK struct { Payload *models.OpenStacks } +// IsSuccess returns true when this service broker openstacks get o k response has a 2xx status code +func (o *ServiceBrokerOpenstacksGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker openstacks get o k response has a 3xx status code +func (o *ServiceBrokerOpenstacksGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks get o k response has a 4xx status code +func (o *ServiceBrokerOpenstacksGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks get o k response has a 5xx status code +func (o *ServiceBrokerOpenstacksGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks get o k response a status code equal to that given +func (o *ServiceBrokerOpenstacksGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker openstacks get o k response +func (o *ServiceBrokerOpenstacksGetOK) Code() int { + return 200 +} + func (o *ServiceBrokerOpenstacksGetOK) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerOpenstacksGetOK) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerOpenstacksGetOK) GetPayload() *models.OpenStacks { return o.Payload } @@ -89,7 +137,8 @@ func NewServiceBrokerOpenstacksGetBadRequest() *ServiceBrokerOpenstacksGetBadReq return &ServiceBrokerOpenstacksGetBadRequest{} } -/* ServiceBrokerOpenstacksGetBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerOpenstacksGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type ServiceBrokerOpenstacksGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks get bad request response has a 2xx status code +func (o *ServiceBrokerOpenstacksGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks get bad request response has a 3xx status code +func (o *ServiceBrokerOpenstacksGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks get bad request response has a 4xx status code +func (o *ServiceBrokerOpenstacksGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks get bad request response has a 5xx status code +func (o *ServiceBrokerOpenstacksGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks get bad request response a status code equal to that given +func (o *ServiceBrokerOpenstacksGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker openstacks get bad request response +func (o *ServiceBrokerOpenstacksGetBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerOpenstacksGetBadRequest) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerOpenstacksGetBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerOpenstacksGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -116,22 +200,126 @@ 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{} } -/* ServiceBrokerOpenstacksGetForbidden describes a response with status code 403, with default header values. +/* +ServiceBrokerOpenstacksGetForbidden describes a response with status code 403, with default header values. -Unauthorized +Forbidden */ type ServiceBrokerOpenstacksGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks get forbidden response has a 2xx status code +func (o *ServiceBrokerOpenstacksGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks get forbidden response has a 3xx status code +func (o *ServiceBrokerOpenstacksGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks get forbidden response has a 4xx status code +func (o *ServiceBrokerOpenstacksGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks get forbidden response has a 5xx status code +func (o *ServiceBrokerOpenstacksGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks get forbidden response a status code equal to that given +func (o *ServiceBrokerOpenstacksGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the service broker openstacks get forbidden response +func (o *ServiceBrokerOpenstacksGetForbidden) Code() int { + return 403 +} + func (o *ServiceBrokerOpenstacksGetForbidden) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetForbidden %+v", 403, o.Payload) } + +func (o *ServiceBrokerOpenstacksGetForbidden) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetForbidden %+v", 403, o.Payload) +} + func (o *ServiceBrokerOpenstacksGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -148,12 +336,81 @@ 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{} } -/* ServiceBrokerOpenstacksGetInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerOpenstacksGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type ServiceBrokerOpenstacksGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks get internal server error response has a 2xx status code +func (o *ServiceBrokerOpenstacksGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks get internal server error response has a 3xx status code +func (o *ServiceBrokerOpenstacksGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks get internal server error response has a 4xx status code +func (o *ServiceBrokerOpenstacksGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks get internal server error response has a 5xx status code +func (o *ServiceBrokerOpenstacksGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker openstacks get internal server error response a status code equal to that given +func (o *ServiceBrokerOpenstacksGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker openstacks get internal server error response +func (o *ServiceBrokerOpenstacksGetInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerOpenstacksGetInternalServerError) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerOpenstacksGetInternalServerError) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks][%d] serviceBrokerOpenstacksGetInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerOpenstacksGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_parameters.go index 0f29aa65ee4..0e25e371194 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerOpenstacksHostsGetParamsWithHTTPClient(client *http.Client) } } -/* ServiceBrokerOpenstacksHostsGetParams contains all the parameters to send to the API endpoint - for the service broker openstacks hosts get operation. +/* +ServiceBrokerOpenstacksHostsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker openstacks hosts get operation. + + Typically these are written to a http.Request. */ type ServiceBrokerOpenstacksHostsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go index 83eff4cf2e6..b7fa6312ea2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go @@ -48,7 +48,7 @@ func (o *ServiceBrokerOpenstacksHostsGetReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}] serviceBroker.openstacks.hosts.get", response, response.Code()) } } @@ -57,7 +57,8 @@ func NewServiceBrokerOpenstacksHostsGetOK() *ServiceBrokerOpenstacksHostsGetOK { return &ServiceBrokerOpenstacksHostsGetOK{} } -/* ServiceBrokerOpenstacksHostsGetOK describes a response with status code 200, with default header values. +/* +ServiceBrokerOpenstacksHostsGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +66,44 @@ type ServiceBrokerOpenstacksHostsGetOK struct { Payload *models.HostInfo } +// IsSuccess returns true when this service broker openstacks hosts get o k response has a 2xx status code +func (o *ServiceBrokerOpenstacksHostsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker openstacks hosts get o k response has a 3xx status code +func (o *ServiceBrokerOpenstacksHostsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks hosts get o k response has a 4xx status code +func (o *ServiceBrokerOpenstacksHostsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks hosts get o k response has a 5xx status code +func (o *ServiceBrokerOpenstacksHostsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks hosts get o k response a status code equal to that given +func (o *ServiceBrokerOpenstacksHostsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker openstacks hosts get o k response +func (o *ServiceBrokerOpenstacksHostsGetOK) Code() int { + return 200 +} + func (o *ServiceBrokerOpenstacksHostsGetOK) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerOpenstacksHostsGetOK) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerOpenstacksHostsGetOK) GetPayload() *models.HostInfo { return o.Payload } @@ -89,7 +125,8 @@ func NewServiceBrokerOpenstacksHostsGetBadRequest() *ServiceBrokerOpenstacksHost return &ServiceBrokerOpenstacksHostsGetBadRequest{} } -/* ServiceBrokerOpenstacksHostsGetBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerOpenstacksHostsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +134,44 @@ type ServiceBrokerOpenstacksHostsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks hosts get bad request response has a 2xx status code +func (o *ServiceBrokerOpenstacksHostsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks hosts get bad request response has a 3xx status code +func (o *ServiceBrokerOpenstacksHostsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks hosts get bad request response has a 4xx status code +func (o *ServiceBrokerOpenstacksHostsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks hosts get bad request response has a 5xx status code +func (o *ServiceBrokerOpenstacksHostsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks hosts get bad request response a status code equal to that given +func (o *ServiceBrokerOpenstacksHostsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker openstacks hosts get bad request response +func (o *ServiceBrokerOpenstacksHostsGetBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerOpenstacksHostsGetBadRequest) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerOpenstacksHostsGetBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerOpenstacksHostsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +193,8 @@ func NewServiceBrokerOpenstacksHostsGetNotFound() *ServiceBrokerOpenstacksHostsG return &ServiceBrokerOpenstacksHostsGetNotFound{} } -/* ServiceBrokerOpenstacksHostsGetNotFound describes a response with status code 404, with default header values. +/* +ServiceBrokerOpenstacksHostsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +202,44 @@ type ServiceBrokerOpenstacksHostsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks hosts get not found response has a 2xx status code +func (o *ServiceBrokerOpenstacksHostsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks hosts get not found response has a 3xx status code +func (o *ServiceBrokerOpenstacksHostsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks hosts get not found response has a 4xx status code +func (o *ServiceBrokerOpenstacksHostsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks hosts get not found response has a 5xx status code +func (o *ServiceBrokerOpenstacksHostsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks hosts get not found response a status code equal to that given +func (o *ServiceBrokerOpenstacksHostsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker openstacks hosts get not found response +func (o *ServiceBrokerOpenstacksHostsGetNotFound) Code() int { + return 404 +} + func (o *ServiceBrokerOpenstacksHostsGetNotFound) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetNotFound %+v", 404, o.Payload) } + +func (o *ServiceBrokerOpenstacksHostsGetNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetNotFound %+v", 404, o.Payload) +} + func (o *ServiceBrokerOpenstacksHostsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +261,8 @@ func NewServiceBrokerOpenstacksHostsGetInternalServerError() *ServiceBrokerOpens return &ServiceBrokerOpenstacksHostsGetInternalServerError{} } -/* ServiceBrokerOpenstacksHostsGetInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerOpenstacksHostsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +270,44 @@ type ServiceBrokerOpenstacksHostsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks hosts get internal server error response has a 2xx status code +func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks hosts get internal server error response has a 3xx status code +func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks hosts get internal server error response has a 4xx status code +func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks hosts get internal server error response has a 5xx status code +func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker openstacks hosts get internal server error response a status code equal to that given +func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker openstacks hosts get internal server error response +func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/hosts/{hostname}][%d] serviceBrokerOpenstacksHostsGetInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerOpenstacksHostsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_parameters.go index 11249b70fb7..e3b228af5e1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerOpenstacksOpenstackGetParamsWithHTTPClient(client *http.Cli } } -/* ServiceBrokerOpenstacksOpenstackGetParams contains all the parameters to send to the API endpoint - for the service broker openstacks openstack get operation. +/* +ServiceBrokerOpenstacksOpenstackGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker openstacks openstack get operation. + + Typically these are written to a http.Request. */ type ServiceBrokerOpenstacksOpenstackGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go index dece779e2ef..ea4ea2624df 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *ServiceBrokerOpenstacksOpenstackGetReader) ReadResponse(response runtim } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/openstacks/{openstack_id}] serviceBroker.openstacks.openstack.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewServiceBrokerOpenstacksOpenstackGetOK() *ServiceBrokerOpenstacksOpenstac return &ServiceBrokerOpenstacksOpenstackGetOK{} } -/* ServiceBrokerOpenstacksOpenstackGetOK describes a response with status code 200, with default header values. +/* +ServiceBrokerOpenstacksOpenstackGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type ServiceBrokerOpenstacksOpenstackGetOK struct { Payload *models.OpenStackInfo } +// IsSuccess returns true when this service broker openstacks openstack get o k response has a 2xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker openstacks openstack get o k response has a 3xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks openstack get o k response has a 4xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks openstack get o k response has a 5xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks openstack get o k response a status code equal to that given +func (o *ServiceBrokerOpenstacksOpenstackGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker openstacks openstack get o k response +func (o *ServiceBrokerOpenstacksOpenstackGetOK) Code() int { + return 200 +} + func (o *ServiceBrokerOpenstacksOpenstackGetOK) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerOpenstacksOpenstackGetOK) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerOpenstacksOpenstackGetOK) GetPayload() *models.OpenStackInfo { return o.Payload } @@ -89,7 +137,8 @@ func NewServiceBrokerOpenstacksOpenstackGetBadRequest() *ServiceBrokerOpenstacks return &ServiceBrokerOpenstacksOpenstackGetBadRequest{} } -/* ServiceBrokerOpenstacksOpenstackGetBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerOpenstacksOpenstackGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type ServiceBrokerOpenstacksOpenstackGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks openstack get bad request response has a 2xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks openstack get bad request response has a 3xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks openstack get bad request response has a 4xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks openstack get bad request response has a 5xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks openstack get bad request response a status code equal to that given +func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker openstacks openstack get bad request response +func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerOpenstacksOpenstackGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -116,12 +200,149 @@ 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{} } -/* ServiceBrokerOpenstacksOpenstackGetNotFound describes a response with status code 404, with default header values. +/* +ServiceBrokerOpenstacksOpenstackGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type ServiceBrokerOpenstacksOpenstackGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks openstack get not found response has a 2xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks openstack get not found response has a 3xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks openstack get not found response has a 4xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks openstack get not found response has a 5xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks openstack get not found response a status code equal to that given +func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker openstacks openstack get not found response +func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) Code() int { + return 404 +} + func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetNotFound %+v", 404, o.Payload) } + +func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetNotFound %+v", 404, o.Payload) +} + func (o *ServiceBrokerOpenstacksOpenstackGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewServiceBrokerOpenstacksOpenstackGetInternalServerError() *ServiceBrokerO return &ServiceBrokerOpenstacksOpenstackGetInternalServerError{} } -/* ServiceBrokerOpenstacksOpenstackGetInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerOpenstacksOpenstackGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type ServiceBrokerOpenstacksOpenstackGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks openstack get internal server error response has a 2xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks openstack get internal server error response has a 3xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks openstack get internal server error response has a 4xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks openstack get internal server error response has a 5xx status code +func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker openstacks openstack get internal server error response a status code equal to that given +func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker openstacks openstack get internal server error response +func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}][%d] serviceBrokerOpenstacksOpenstackGetInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerOpenstacksOpenstackGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_parameters.go index 32935216b2d..3b9a54f6267 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_parameters.go @@ -54,10 +54,12 @@ func NewServiceBrokerOpenstacksPostParamsWithHTTPClient(client *http.Client) *Se } } -/* ServiceBrokerOpenstacksPostParams contains all the parameters to send to the API endpoint - for the service broker openstacks post operation. +/* +ServiceBrokerOpenstacksPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker openstacks post operation. + + Typically these are written to a http.Request. */ type ServiceBrokerOpenstacksPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_responses.go index b83e9e39719..e7021aaa9ef 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +78,7 @@ func (o *ServiceBrokerOpenstacksPostReader) ReadResponse(response runtime.Client } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /broker/v1/openstacks] serviceBroker.openstacks.post", response, response.Code()) } } @@ -69,7 +87,8 @@ func NewServiceBrokerOpenstacksPostOK() *ServiceBrokerOpenstacksPostOK { return &ServiceBrokerOpenstacksPostOK{} } -/* ServiceBrokerOpenstacksPostOK describes a response with status code 200, with default header values. +/* +ServiceBrokerOpenstacksPostOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +96,44 @@ type ServiceBrokerOpenstacksPostOK struct { Payload *models.OpenStack } +// IsSuccess returns true when this service broker openstacks post o k response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker openstacks post o k response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post o k response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks post o k response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks post o k response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker openstacks post o k response +func (o *ServiceBrokerOpenstacksPostOK) Code() int { + return 200 +} + func (o *ServiceBrokerOpenstacksPostOK) Error() string { return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerOpenstacksPostOK) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerOpenstacksPostOK) GetPayload() *models.OpenStack { return o.Payload } @@ -101,7 +155,8 @@ func NewServiceBrokerOpenstacksPostCreated() *ServiceBrokerOpenstacksPostCreated return &ServiceBrokerOpenstacksPostCreated{} } -/* ServiceBrokerOpenstacksPostCreated describes a response with status code 201, with default header values. +/* +ServiceBrokerOpenstacksPostCreated describes a response with status code 201, with default header values. Created */ @@ -109,9 +164,44 @@ type ServiceBrokerOpenstacksPostCreated struct { Payload *models.OpenStack } +// IsSuccess returns true when this service broker openstacks post created response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker openstacks post created response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post created response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks post created response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks post created response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the service broker openstacks post created response +func (o *ServiceBrokerOpenstacksPostCreated) Code() int { + return 201 +} + func (o *ServiceBrokerOpenstacksPostCreated) Error() string { return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostCreated %+v", 201, o.Payload) } + +func (o *ServiceBrokerOpenstacksPostCreated) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostCreated %+v", 201, o.Payload) +} + func (o *ServiceBrokerOpenstacksPostCreated) GetPayload() *models.OpenStack { return o.Payload } @@ -133,7 +223,8 @@ func NewServiceBrokerOpenstacksPostBadRequest() *ServiceBrokerOpenstacksPostBadR return &ServiceBrokerOpenstacksPostBadRequest{} } -/* ServiceBrokerOpenstacksPostBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerOpenstacksPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -141,9 +232,44 @@ type ServiceBrokerOpenstacksPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks post bad request response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks post bad request response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post bad request response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks post bad request response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks post bad request response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker openstacks post bad request response +func (o *ServiceBrokerOpenstacksPostBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerOpenstacksPostBadRequest) Error() string { return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerOpenstacksPostBadRequest) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerOpenstacksPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -160,12 +286,217 @@ 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{} } -/* ServiceBrokerOpenstacksPostConflict describes a response with status code 409, with default header values. +/* +ServiceBrokerOpenstacksPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -173,9 +504,44 @@ type ServiceBrokerOpenstacksPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks post conflict response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks post conflict response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post conflict response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks post conflict response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks post conflict response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the service broker openstacks post conflict response +func (o *ServiceBrokerOpenstacksPostConflict) Code() int { + return 409 +} + func (o *ServiceBrokerOpenstacksPostConflict) Error() string { return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostConflict %+v", 409, o.Payload) } + +func (o *ServiceBrokerOpenstacksPostConflict) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostConflict %+v", 409, o.Payload) +} + func (o *ServiceBrokerOpenstacksPostConflict) GetPayload() *models.Error { return o.Payload } @@ -197,7 +563,8 @@ func NewServiceBrokerOpenstacksPostUnprocessableEntity() *ServiceBrokerOpenstack return &ServiceBrokerOpenstacksPostUnprocessableEntity{} } -/* ServiceBrokerOpenstacksPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +ServiceBrokerOpenstacksPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +572,44 @@ type ServiceBrokerOpenstacksPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks post unprocessable entity response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks post unprocessable entity response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post unprocessable entity response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks post unprocessable entity response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks post unprocessable entity response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the service broker openstacks post unprocessable entity response +func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) Code() int { + return 422 +} + func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *ServiceBrokerOpenstacksPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +631,8 @@ func NewServiceBrokerOpenstacksPostInternalServerError() *ServiceBrokerOpenstack return &ServiceBrokerOpenstacksPostInternalServerError{} } -/* ServiceBrokerOpenstacksPostInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerOpenstacksPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +640,44 @@ type ServiceBrokerOpenstacksPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks post internal server error response has a 2xx status code +func (o *ServiceBrokerOpenstacksPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks post internal server error response has a 3xx status code +func (o *ServiceBrokerOpenstacksPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks post internal server error response has a 4xx status code +func (o *ServiceBrokerOpenstacksPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks post internal server error response has a 5xx status code +func (o *ServiceBrokerOpenstacksPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker openstacks post internal server error response a status code equal to that given +func (o *ServiceBrokerOpenstacksPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker openstacks post internal server error response +func (o *ServiceBrokerOpenstacksPostInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerOpenstacksPostInternalServerError) Error() string { return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerOpenstacksPostInternalServerError) String() string { + return fmt.Sprintf("[POST /broker/v1/openstacks][%d] serviceBrokerOpenstacksPostInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerOpenstacksPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_parameters.go index dbe1a1a52fc..2ba42257c48 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerOpenstacksServersGetParamsWithHTTPClient(client *http.Clien } } -/* ServiceBrokerOpenstacksServersGetParams contains all the parameters to send to the API endpoint - for the service broker openstacks servers get operation. +/* +ServiceBrokerOpenstacksServersGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker openstacks servers get operation. + + Typically these are written to a http.Request. */ type ServiceBrokerOpenstacksServersGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go index d52ebc75f71..38e732064c6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *ServiceBrokerOpenstacksServersGetReader) ReadResponse(response runtime. } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}] serviceBroker.openstacks.servers.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewServiceBrokerOpenstacksServersGetOK() *ServiceBrokerOpenstacksServersGet return &ServiceBrokerOpenstacksServersGetOK{} } -/* ServiceBrokerOpenstacksServersGetOK describes a response with status code 200, with default header values. +/* +ServiceBrokerOpenstacksServersGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type ServiceBrokerOpenstacksServersGetOK struct { Payload *models.HostPVMInstance } +// IsSuccess returns true when this service broker openstacks servers get o k response has a 2xx status code +func (o *ServiceBrokerOpenstacksServersGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker openstacks servers get o k response has a 3xx status code +func (o *ServiceBrokerOpenstacksServersGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks servers get o k response has a 4xx status code +func (o *ServiceBrokerOpenstacksServersGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks servers get o k response has a 5xx status code +func (o *ServiceBrokerOpenstacksServersGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks servers get o k response a status code equal to that given +func (o *ServiceBrokerOpenstacksServersGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker openstacks servers get o k response +func (o *ServiceBrokerOpenstacksServersGetOK) Code() int { + return 200 +} + func (o *ServiceBrokerOpenstacksServersGetOK) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerOpenstacksServersGetOK) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerOpenstacksServersGetOK) GetPayload() *models.HostPVMInstance { return o.Payload } @@ -89,7 +137,8 @@ func NewServiceBrokerOpenstacksServersGetBadRequest() *ServiceBrokerOpenstacksSe return &ServiceBrokerOpenstacksServersGetBadRequest{} } -/* ServiceBrokerOpenstacksServersGetBadRequest describes a response with status code 400, with default header values. +/* +ServiceBrokerOpenstacksServersGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type ServiceBrokerOpenstacksServersGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks servers get bad request response has a 2xx status code +func (o *ServiceBrokerOpenstacksServersGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks servers get bad request response has a 3xx status code +func (o *ServiceBrokerOpenstacksServersGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks servers get bad request response has a 4xx status code +func (o *ServiceBrokerOpenstacksServersGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks servers get bad request response has a 5xx status code +func (o *ServiceBrokerOpenstacksServersGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks servers get bad request response a status code equal to that given +func (o *ServiceBrokerOpenstacksServersGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service broker openstacks servers get bad request response +func (o *ServiceBrokerOpenstacksServersGetBadRequest) Code() int { + return 400 +} + func (o *ServiceBrokerOpenstacksServersGetBadRequest) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBrokerOpenstacksServersGetBadRequest) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBrokerOpenstacksServersGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -116,12 +200,149 @@ 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{} } -/* ServiceBrokerOpenstacksServersGetNotFound describes a response with status code 404, with default header values. +/* +ServiceBrokerOpenstacksServersGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type ServiceBrokerOpenstacksServersGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks servers get not found response has a 2xx status code +func (o *ServiceBrokerOpenstacksServersGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks servers get not found response has a 3xx status code +func (o *ServiceBrokerOpenstacksServersGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks servers get not found response has a 4xx status code +func (o *ServiceBrokerOpenstacksServersGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker openstacks servers get not found response has a 5xx status code +func (o *ServiceBrokerOpenstacksServersGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker openstacks servers get not found response a status code equal to that given +func (o *ServiceBrokerOpenstacksServersGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service broker openstacks servers get not found response +func (o *ServiceBrokerOpenstacksServersGetNotFound) Code() int { + return 404 +} + func (o *ServiceBrokerOpenstacksServersGetNotFound) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetNotFound %+v", 404, o.Payload) } + +func (o *ServiceBrokerOpenstacksServersGetNotFound) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetNotFound %+v", 404, o.Payload) +} + func (o *ServiceBrokerOpenstacksServersGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewServiceBrokerOpenstacksServersGetInternalServerError() *ServiceBrokerOpe return &ServiceBrokerOpenstacksServersGetInternalServerError{} } -/* ServiceBrokerOpenstacksServersGetInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerOpenstacksServersGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type ServiceBrokerOpenstacksServersGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker openstacks servers get internal server error response has a 2xx status code +func (o *ServiceBrokerOpenstacksServersGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker openstacks servers get internal server error response has a 3xx status code +func (o *ServiceBrokerOpenstacksServersGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker openstacks servers get internal server error response has a 4xx status code +func (o *ServiceBrokerOpenstacksServersGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker openstacks servers get internal server error response has a 5xx status code +func (o *ServiceBrokerOpenstacksServersGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker openstacks servers get internal server error response a status code equal to that given +func (o *ServiceBrokerOpenstacksServersGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker openstacks servers get internal server error response +func (o *ServiceBrokerOpenstacksServersGetInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerOpenstacksServersGetInternalServerError) Error() string { return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerOpenstacksServersGetInternalServerError) String() string { + return fmt.Sprintf("[GET /broker/v1/openstacks/{openstack_id}/servers/{pvm_instance_id}][%d] serviceBrokerOpenstacksServersGetInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerOpenstacksServersGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go index 6b3a5437c37..864741d56ed 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go @@ -50,7 +50,7 @@ type ClientService interface { } /* - PcloudCloudconnectionsDelete deletes a cloud connection +PcloudCloudconnectionsDelete deletes a cloud connection */ func (a *Client) PcloudCloudconnectionsDelete(params *PcloudCloudconnectionsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsDeleteOK, *PcloudCloudconnectionsDeleteAccepted, error) { // TODO: Validate the params before sending @@ -90,7 +90,7 @@ func (a *Client) PcloudCloudconnectionsDelete(params *PcloudCloudconnectionsDele } /* - PcloudCloudconnectionsGet gets a cloud connection s state information +PcloudCloudconnectionsGet gets a cloud connection s state information */ func (a *Client) PcloudCloudconnectionsGet(params *PcloudCloudconnectionsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsGetOK, error) { // TODO: Validate the params before sending @@ -129,7 +129,7 @@ func (a *Client) PcloudCloudconnectionsGet(params *PcloudCloudconnectionsGetPara } /* - PcloudCloudconnectionsGetall gets all cloud connections in this cloud instance +PcloudCloudconnectionsGetall gets all cloud connections in this cloud instance */ func (a *Client) PcloudCloudconnectionsGetall(params *PcloudCloudconnectionsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsGetallOK, error) { // TODO: Validate the params before sending @@ -168,7 +168,7 @@ func (a *Client) PcloudCloudconnectionsGetall(params *PcloudCloudconnectionsGeta } /* - PcloudCloudconnectionsNetworksDelete deletes a network from a cloud connection +PcloudCloudconnectionsNetworksDelete detaches a network from a cloud connection */ func (a *Client) PcloudCloudconnectionsNetworksDelete(params *PcloudCloudconnectionsNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsNetworksDeleteOK, *PcloudCloudconnectionsNetworksDeleteAccepted, error) { // TODO: Validate the params before sending @@ -208,7 +208,7 @@ func (a *Client) PcloudCloudconnectionsNetworksDelete(params *PcloudCloudconnect } /* - PcloudCloudconnectionsNetworksPut adds a network to the cloud connection +PcloudCloudconnectionsNetworksPut attaches a network to the cloud connection */ func (a *Client) PcloudCloudconnectionsNetworksPut(params *PcloudCloudconnectionsNetworksPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsNetworksPutOK, *PcloudCloudconnectionsNetworksPutAccepted, error) { // TODO: Validate the params before sending @@ -248,7 +248,7 @@ func (a *Client) PcloudCloudconnectionsNetworksPut(params *PcloudCloudconnection } /* - PcloudCloudconnectionsPost creates a new cloud connection +PcloudCloudconnectionsPost creates a new cloud connection */ func (a *Client) PcloudCloudconnectionsPost(params *PcloudCloudconnectionsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsPostOK, *PcloudCloudconnectionsPostCreated, *PcloudCloudconnectionsPostAccepted, error) { // TODO: Validate the params before sending @@ -290,7 +290,7 @@ func (a *Client) PcloudCloudconnectionsPost(params *PcloudCloudconnectionsPostPa } /* - PcloudCloudconnectionsPut updates a cloud connection +PcloudCloudconnectionsPut updates a cloud connection */ func (a *Client) PcloudCloudconnectionsPut(params *PcloudCloudconnectionsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsPutOK, *PcloudCloudconnectionsPutAccepted, error) { // TODO: Validate the params before sending @@ -330,7 +330,7 @@ func (a *Client) PcloudCloudconnectionsPut(params *PcloudCloudconnectionsPutPara } /* - PcloudCloudconnectionsVirtualprivatecloudsGetall gets all virtual private cloud connections in this cloud instance +PcloudCloudconnectionsVirtualprivatecloudsGetall gets all virtual private cloud connections in this cloud instance */ func (a *Client) PcloudCloudconnectionsVirtualprivatecloudsGetall(params *PcloudCloudconnectionsVirtualprivatecloudsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudconnectionsVirtualprivatecloudsGetallOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_parameters.go index 9cbc14c98f4..f83100f692f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudconnectionsDeleteParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudCloudconnectionsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud cloudconnections delete operation. +/* +PcloudCloudconnectionsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudconnections delete operation. + + Typically these are written to a http.Request. */ type PcloudCloudconnectionsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go index d955a28be5d..1cc559d2edf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -72,7 +78,7 @@ func (o *PcloudCloudconnectionsDeleteReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}] pcloud.cloudconnections.delete", response, response.Code()) } } @@ -81,7 +87,8 @@ func NewPcloudCloudconnectionsDeleteOK() *PcloudCloudconnectionsDeleteOK { return &PcloudCloudconnectionsDeleteOK{} } -/* PcloudCloudconnectionsDeleteOK describes a response with status code 200, with default header values. +/* +PcloudCloudconnectionsDeleteOK describes a response with status code 200, with default header values. OK */ @@ -89,9 +96,44 @@ type PcloudCloudconnectionsDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudconnections delete o k response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections delete o k response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete o k response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections delete o k response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections delete o k response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudconnections delete o k response +func (o *PcloudCloudconnectionsDeleteOK) Code() int { + return 200 +} + func (o *PcloudCloudconnectionsDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudCloudconnectionsDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudCloudconnectionsDeleteOK) GetPayload() models.Object { return o.Payload } @@ -111,7 +153,8 @@ func NewPcloudCloudconnectionsDeleteAccepted() *PcloudCloudconnectionsDeleteAcce return &PcloudCloudconnectionsDeleteAccepted{} } -/* PcloudCloudconnectionsDeleteAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudconnectionsDeleteAccepted describes a response with status code 202, with default header values. Accepted */ @@ -119,9 +162,44 @@ type PcloudCloudconnectionsDeleteAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud cloudconnections delete accepted response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections delete accepted response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete accepted response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections delete accepted response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections delete accepted response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudconnections delete accepted response +func (o *PcloudCloudconnectionsDeleteAccepted) Code() int { + return 202 +} + func (o *PcloudCloudconnectionsDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudconnectionsDeleteAccepted) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudconnectionsDeleteAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -143,7 +221,8 @@ func NewPcloudCloudconnectionsDeleteBadRequest() *PcloudCloudconnectionsDeleteBa return &PcloudCloudconnectionsDeleteBadRequest{} } -/* PcloudCloudconnectionsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudconnectionsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -151,9 +230,44 @@ type PcloudCloudconnectionsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections delete bad request response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections delete bad request response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete bad request response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections delete bad request response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections delete bad request response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudconnections delete bad request response +func (o *PcloudCloudconnectionsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudconnectionsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudconnectionsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudconnectionsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -175,7 +289,8 @@ func NewPcloudCloudconnectionsDeleteUnauthorized() *PcloudCloudconnectionsDelete return &PcloudCloudconnectionsDeleteUnauthorized{} } -/* PcloudCloudconnectionsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudconnectionsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -183,9 +298,44 @@ type PcloudCloudconnectionsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections delete unauthorized response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections delete unauthorized response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete unauthorized response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections delete unauthorized response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections delete unauthorized response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudconnections delete unauthorized response +func (o *PcloudCloudconnectionsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudconnectionsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudconnectionsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudconnectionsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -202,12 +352,81 @@ 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{} } -/* PcloudCloudconnectionsDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudconnectionsDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -215,9 +434,44 @@ type PcloudCloudconnectionsDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections delete not found response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections delete not found response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete not found response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections delete not found response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections delete not found response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudconnections delete not found response +func (o *PcloudCloudconnectionsDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudCloudconnectionsDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudconnectionsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudconnectionsDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -239,7 +493,8 @@ func NewPcloudCloudconnectionsDeleteRequestTimeout() *PcloudCloudconnectionsDele return &PcloudCloudconnectionsDeleteRequestTimeout{} } -/* PcloudCloudconnectionsDeleteRequestTimeout describes a response with status code 408, with default header values. +/* +PcloudCloudconnectionsDeleteRequestTimeout describes a response with status code 408, with default header values. Request Timeout */ @@ -247,9 +502,44 @@ type PcloudCloudconnectionsDeleteRequestTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections delete request timeout response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections delete request timeout response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete request timeout response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections delete request timeout response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections delete request timeout response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud cloudconnections delete request timeout response +func (o *PcloudCloudconnectionsDeleteRequestTimeout) Code() int { + return 408 +} + func (o *PcloudCloudconnectionsDeleteRequestTimeout) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteRequestTimeout %+v", 408, o.Payload) } + +func (o *PcloudCloudconnectionsDeleteRequestTimeout) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteRequestTimeout %+v", 408, o.Payload) +} + func (o *PcloudCloudconnectionsDeleteRequestTimeout) GetPayload() *models.Error { return o.Payload } @@ -271,7 +561,8 @@ func NewPcloudCloudconnectionsDeleteGone() *PcloudCloudconnectionsDeleteGone { return &PcloudCloudconnectionsDeleteGone{} } -/* PcloudCloudconnectionsDeleteGone describes a response with status code 410, with default header values. +/* +PcloudCloudconnectionsDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -279,9 +570,44 @@ type PcloudCloudconnectionsDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections delete gone response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections delete gone response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete gone response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections delete gone response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections delete gone response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud cloudconnections delete gone response +func (o *PcloudCloudconnectionsDeleteGone) Code() int { + return 410 +} + func (o *PcloudCloudconnectionsDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudCloudconnectionsDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudCloudconnectionsDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -303,7 +629,8 @@ func NewPcloudCloudconnectionsDeleteInternalServerError() *PcloudCloudconnection return &PcloudCloudconnectionsDeleteInternalServerError{} } -/* PcloudCloudconnectionsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudconnectionsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -311,9 +638,44 @@ type PcloudCloudconnectionsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections delete internal server error response has a 2xx status code +func (o *PcloudCloudconnectionsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections delete internal server error response has a 3xx status code +func (o *PcloudCloudconnectionsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections delete internal server error response has a 4xx status code +func (o *PcloudCloudconnectionsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections delete internal server error response has a 5xx status code +func (o *PcloudCloudconnectionsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections delete internal server error response a status code equal to that given +func (o *PcloudCloudconnectionsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudconnections delete internal server error response +func (o *PcloudCloudconnectionsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudconnectionsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudconnectionsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudconnectionsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_parameters.go index 16a386f8d24..58a85a958dd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudconnectionsGetParamsWithHTTPClient(client *http.Client) *Pclo } } -/* PcloudCloudconnectionsGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudconnections get operation. +/* +PcloudCloudconnectionsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudconnections get operation. + + Typically these are written to a http.Request. */ type PcloudCloudconnectionsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go index 11434159e74..f4b8e64a7ee 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudCloudconnectionsGetReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}] pcloud.cloudconnections.get", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudCloudconnectionsGetOK() *PcloudCloudconnectionsGetOK { return &PcloudCloudconnectionsGetOK{} } -/* PcloudCloudconnectionsGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudconnectionsGetOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudCloudconnectionsGetOK struct { Payload *models.CloudConnection } +// IsSuccess returns true when this pcloud cloudconnections get o k response has a 2xx status code +func (o *PcloudCloudconnectionsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections get o k response has a 3xx status code +func (o *PcloudCloudconnectionsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections get o k response has a 4xx status code +func (o *PcloudCloudconnectionsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections get o k response has a 5xx status code +func (o *PcloudCloudconnectionsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections get o k response a status code equal to that given +func (o *PcloudCloudconnectionsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudconnections get o k response +func (o *PcloudCloudconnectionsGetOK) Code() int { + return 200 +} + func (o *PcloudCloudconnectionsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudconnectionsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudconnectionsGetOK) GetPayload() *models.CloudConnection { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudCloudconnectionsGetBadRequest() *PcloudCloudconnectionsGetBadReque return &PcloudCloudconnectionsGetBadRequest{} } -/* PcloudCloudconnectionsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudconnectionsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudCloudconnectionsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections get bad request response has a 2xx status code +func (o *PcloudCloudconnectionsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections get bad request response has a 3xx status code +func (o *PcloudCloudconnectionsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections get bad request response has a 4xx status code +func (o *PcloudCloudconnectionsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections get bad request response has a 5xx status code +func (o *PcloudCloudconnectionsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections get bad request response a status code equal to that given +func (o *PcloudCloudconnectionsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudconnections get bad request response +func (o *PcloudCloudconnectionsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudconnectionsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudconnectionsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudconnectionsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudCloudconnectionsGetUnauthorized() *PcloudCloudconnectionsGetUnauth return &PcloudCloudconnectionsGetUnauthorized{} } -/* PcloudCloudconnectionsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudconnectionsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudCloudconnectionsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections get unauthorized response has a 2xx status code +func (o *PcloudCloudconnectionsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections get unauthorized response has a 3xx status code +func (o *PcloudCloudconnectionsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections get unauthorized response has a 4xx status code +func (o *PcloudCloudconnectionsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections get unauthorized response has a 5xx status code +func (o *PcloudCloudconnectionsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections get unauthorized response a status code equal to that given +func (o *PcloudCloudconnectionsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudconnections get unauthorized response +func (o *PcloudCloudconnectionsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudconnectionsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudconnectionsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudconnectionsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +274,81 @@ 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{} } -/* PcloudCloudconnectionsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudconnectionsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -173,9 +356,44 @@ type PcloudCloudconnectionsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections get not found response has a 2xx status code +func (o *PcloudCloudconnectionsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections get not found response has a 3xx status code +func (o *PcloudCloudconnectionsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections get not found response has a 4xx status code +func (o *PcloudCloudconnectionsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections get not found response has a 5xx status code +func (o *PcloudCloudconnectionsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections get not found response a status code equal to that given +func (o *PcloudCloudconnectionsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudconnections get not found response +func (o *PcloudCloudconnectionsGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudconnectionsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudconnectionsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudconnectionsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -197,7 +415,8 @@ func NewPcloudCloudconnectionsGetRequestTimeout() *PcloudCloudconnectionsGetRequ return &PcloudCloudconnectionsGetRequestTimeout{} } -/* PcloudCloudconnectionsGetRequestTimeout describes a response with status code 408, with default header values. +/* +PcloudCloudconnectionsGetRequestTimeout describes a response with status code 408, with default header values. Request Timeout */ @@ -205,9 +424,44 @@ type PcloudCloudconnectionsGetRequestTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections get request timeout response has a 2xx status code +func (o *PcloudCloudconnectionsGetRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections get request timeout response has a 3xx status code +func (o *PcloudCloudconnectionsGetRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections get request timeout response has a 4xx status code +func (o *PcloudCloudconnectionsGetRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections get request timeout response has a 5xx status code +func (o *PcloudCloudconnectionsGetRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections get request timeout response a status code equal to that given +func (o *PcloudCloudconnectionsGetRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud cloudconnections get request timeout response +func (o *PcloudCloudconnectionsGetRequestTimeout) Code() int { + return 408 +} + func (o *PcloudCloudconnectionsGetRequestTimeout) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetRequestTimeout %+v", 408, o.Payload) } + +func (o *PcloudCloudconnectionsGetRequestTimeout) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetRequestTimeout %+v", 408, o.Payload) +} + func (o *PcloudCloudconnectionsGetRequestTimeout) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudCloudconnectionsGetInternalServerError() *PcloudCloudconnectionsGe return &PcloudCloudconnectionsGetInternalServerError{} } -/* PcloudCloudconnectionsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudconnectionsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudCloudconnectionsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections get internal server error response has a 2xx status code +func (o *PcloudCloudconnectionsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections get internal server error response has a 3xx status code +func (o *PcloudCloudconnectionsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections get internal server error response has a 4xx status code +func (o *PcloudCloudconnectionsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections get internal server error response has a 5xx status code +func (o *PcloudCloudconnectionsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections get internal server error response a status code equal to that given +func (o *PcloudCloudconnectionsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudconnections get internal server error response +func (o *PcloudCloudconnectionsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudconnectionsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudconnectionsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudconnectionsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_parameters.go index ab74a7af066..a0969a7bd5b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudconnectionsGetallParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudCloudconnectionsGetallParams contains all the parameters to send to the API endpoint - for the pcloud cloudconnections getall operation. +/* +PcloudCloudconnectionsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudconnections getall operation. + + Typically these are written to a http.Request. */ type PcloudCloudconnectionsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go index f096d6de76a..4cc11e81773 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudCloudconnectionsGetallReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 403: + result := NewPcloudCloudconnectionsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -54,7 +66,7 @@ func (o *PcloudCloudconnectionsGetallReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections] pcloud.cloudconnections.getall", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudCloudconnectionsGetallOK() *PcloudCloudconnectionsGetallOK { return &PcloudCloudconnectionsGetallOK{} } -/* PcloudCloudconnectionsGetallOK describes a response with status code 200, with default header values. +/* +PcloudCloudconnectionsGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudCloudconnectionsGetallOK struct { Payload *models.CloudConnections } +// IsSuccess returns true when this pcloud cloudconnections getall o k response has a 2xx status code +func (o *PcloudCloudconnectionsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections getall o k response has a 3xx status code +func (o *PcloudCloudconnectionsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections getall o k response has a 4xx status code +func (o *PcloudCloudconnectionsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections getall o k response has a 5xx status code +func (o *PcloudCloudconnectionsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections getall o k response a status code equal to that given +func (o *PcloudCloudconnectionsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudconnections getall o k response +func (o *PcloudCloudconnectionsGetallOK) Code() int { + return 200 +} + func (o *PcloudCloudconnectionsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudCloudconnectionsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudCloudconnectionsGetallOK) GetPayload() *models.CloudConnections { return o.Payload } @@ -95,7 +143,8 @@ func NewPcloudCloudconnectionsGetallBadRequest() *PcloudCloudconnectionsGetallBa return &PcloudCloudconnectionsGetallBadRequest{} } -/* PcloudCloudconnectionsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudconnectionsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +152,44 @@ type PcloudCloudconnectionsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections getall bad request response has a 2xx status code +func (o *PcloudCloudconnectionsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections getall bad request response has a 3xx status code +func (o *PcloudCloudconnectionsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections getall bad request response has a 4xx status code +func (o *PcloudCloudconnectionsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections getall bad request response has a 5xx status code +func (o *PcloudCloudconnectionsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections getall bad request response a status code equal to that given +func (o *PcloudCloudconnectionsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudconnections getall bad request response +func (o *PcloudCloudconnectionsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudconnectionsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudconnectionsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudconnectionsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +211,8 @@ func NewPcloudCloudconnectionsGetallUnauthorized() *PcloudCloudconnectionsGetall return &PcloudCloudconnectionsGetallUnauthorized{} } -/* PcloudCloudconnectionsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudconnectionsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +220,44 @@ type PcloudCloudconnectionsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections getall unauthorized response has a 2xx status code +func (o *PcloudCloudconnectionsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections getall unauthorized response has a 3xx status code +func (o *PcloudCloudconnectionsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections getall unauthorized response has a 4xx status code +func (o *PcloudCloudconnectionsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections getall unauthorized response has a 5xx status code +func (o *PcloudCloudconnectionsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections getall unauthorized response a status code equal to that given +func (o *PcloudCloudconnectionsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudconnections getall unauthorized response +func (o *PcloudCloudconnectionsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudconnectionsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudconnectionsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudconnectionsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +274,149 @@ func (o *PcloudCloudconnectionsGetallUnauthorized) readResponse(response runtime return nil } +// NewPcloudCloudconnectionsGetallForbidden creates a PcloudCloudconnectionsGetallForbidden with default headers values +func NewPcloudCloudconnectionsGetallForbidden() *PcloudCloudconnectionsGetallForbidden { + return &PcloudCloudconnectionsGetallForbidden{} +} + +/* +PcloudCloudconnectionsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudconnectionsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections getall forbidden response has a 2xx status code +func (o *PcloudCloudconnectionsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections getall forbidden response has a 3xx status code +func (o *PcloudCloudconnectionsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections getall forbidden response has a 4xx status code +func (o *PcloudCloudconnectionsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections getall forbidden response has a 5xx status code +func (o *PcloudCloudconnectionsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections getall forbidden response a status code equal to that given +func (o *PcloudCloudconnectionsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudconnections getall forbidden response +func (o *PcloudCloudconnectionsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudconnectionsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsGetallForbidden) 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 +} + +// 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{} } -/* PcloudCloudconnectionsGetallRequestTimeout describes a response with status code 408, with default header values. +/* +PcloudCloudconnectionsGetallRequestTimeout describes a response with status code 408, with default header values. Request Timeout */ @@ -167,9 +424,44 @@ type PcloudCloudconnectionsGetallRequestTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections getall request timeout response has a 2xx status code +func (o *PcloudCloudconnectionsGetallRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections getall request timeout response has a 3xx status code +func (o *PcloudCloudconnectionsGetallRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections getall request timeout response has a 4xx status code +func (o *PcloudCloudconnectionsGetallRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections getall request timeout response has a 5xx status code +func (o *PcloudCloudconnectionsGetallRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections getall request timeout response a status code equal to that given +func (o *PcloudCloudconnectionsGetallRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud cloudconnections getall request timeout response +func (o *PcloudCloudconnectionsGetallRequestTimeout) Code() int { + return 408 +} + func (o *PcloudCloudconnectionsGetallRequestTimeout) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallRequestTimeout %+v", 408, o.Payload) } + +func (o *PcloudCloudconnectionsGetallRequestTimeout) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallRequestTimeout %+v", 408, o.Payload) +} + func (o *PcloudCloudconnectionsGetallRequestTimeout) GetPayload() *models.Error { return o.Payload } @@ -191,7 +483,8 @@ func NewPcloudCloudconnectionsGetallInternalServerError() *PcloudCloudconnection return &PcloudCloudconnectionsGetallInternalServerError{} } -/* PcloudCloudconnectionsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudconnectionsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +492,44 @@ type PcloudCloudconnectionsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections getall internal server error response has a 2xx status code +func (o *PcloudCloudconnectionsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections getall internal server error response has a 3xx status code +func (o *PcloudCloudconnectionsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections getall internal server error response has a 4xx status code +func (o *PcloudCloudconnectionsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections getall internal server error response has a 5xx status code +func (o *PcloudCloudconnectionsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections getall internal server error response a status code equal to that given +func (o *PcloudCloudconnectionsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudconnections getall internal server error response +func (o *PcloudCloudconnectionsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudconnectionsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudconnectionsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudconnectionsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_parameters.go index e3c9466d439..b5227f7a7b0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudconnectionsNetworksDeleteParamsWithHTTPClient(client *http.Cl } } -/* PcloudCloudconnectionsNetworksDeleteParams contains all the parameters to send to the API endpoint - for the pcloud cloudconnections networks delete operation. +/* +PcloudCloudconnectionsNetworksDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudconnections networks delete operation. + + Typically these are written to a http.Request. */ type PcloudCloudconnectionsNetworksDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go index 254b75dfa19..4ca9cca7c84 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -72,7 +78,7 @@ func (o *PcloudCloudconnectionsNetworksDeleteReader) ReadResponse(response runti } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}] pcloud.cloudconnections.networks.delete", response, response.Code()) } } @@ -81,7 +87,8 @@ func NewPcloudCloudconnectionsNetworksDeleteOK() *PcloudCloudconnectionsNetworks return &PcloudCloudconnectionsNetworksDeleteOK{} } -/* PcloudCloudconnectionsNetworksDeleteOK describes a response with status code 200, with default header values. +/* +PcloudCloudconnectionsNetworksDeleteOK describes a response with status code 200, with default header values. OK */ @@ -89,9 +96,44 @@ type PcloudCloudconnectionsNetworksDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudconnections networks delete o k response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete o k response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete o k response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections networks delete o k response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks delete o k response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudconnections networks delete o k response +func (o *PcloudCloudconnectionsNetworksDeleteOK) Code() int { + return 200 +} + func (o *PcloudCloudconnectionsNetworksDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksDeleteOK) GetPayload() models.Object { return o.Payload } @@ -111,7 +153,8 @@ func NewPcloudCloudconnectionsNetworksDeleteAccepted() *PcloudCloudconnectionsNe return &PcloudCloudconnectionsNetworksDeleteAccepted{} } -/* PcloudCloudconnectionsNetworksDeleteAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudconnectionsNetworksDeleteAccepted describes a response with status code 202, with default header values. Accepted */ @@ -119,9 +162,44 @@ type PcloudCloudconnectionsNetworksDeleteAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud cloudconnections networks delete accepted response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete accepted response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete accepted response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections networks delete accepted response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks delete accepted response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudconnections networks delete accepted response +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) Code() int { + return 202 +} + func (o *PcloudCloudconnectionsNetworksDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksDeleteAccepted) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksDeleteAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -143,7 +221,8 @@ func NewPcloudCloudconnectionsNetworksDeleteBadRequest() *PcloudCloudconnections return &PcloudCloudconnectionsNetworksDeleteBadRequest{} } -/* PcloudCloudconnectionsNetworksDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudconnectionsNetworksDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -151,9 +230,44 @@ type PcloudCloudconnectionsNetworksDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks delete bad request response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete bad request response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete bad request response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks delete bad request response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks delete bad request response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudconnections networks delete bad request response +func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -175,7 +289,8 @@ func NewPcloudCloudconnectionsNetworksDeleteUnauthorized() *PcloudCloudconnectio return &PcloudCloudconnectionsNetworksDeleteUnauthorized{} } -/* PcloudCloudconnectionsNetworksDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudconnectionsNetworksDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -183,9 +298,44 @@ type PcloudCloudconnectionsNetworksDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks delete unauthorized response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete unauthorized response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete unauthorized response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks delete unauthorized response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks delete unauthorized response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudconnections networks delete unauthorized response +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -202,12 +352,81 @@ 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{} } -/* PcloudCloudconnectionsNetworksDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudconnectionsNetworksDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -215,9 +434,44 @@ type PcloudCloudconnectionsNetworksDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks delete not found response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete not found response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete not found response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks delete not found response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks delete not found response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudconnections networks delete not found response +func (o *PcloudCloudconnectionsNetworksDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudCloudconnectionsNetworksDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -239,7 +493,8 @@ func NewPcloudCloudconnectionsNetworksDeleteRequestTimeout() *PcloudCloudconnect return &PcloudCloudconnectionsNetworksDeleteRequestTimeout{} } -/* PcloudCloudconnectionsNetworksDeleteRequestTimeout describes a response with status code 408, with default header values. +/* +PcloudCloudconnectionsNetworksDeleteRequestTimeout describes a response with status code 408, with default header values. Request Timeout */ @@ -247,9 +502,44 @@ type PcloudCloudconnectionsNetworksDeleteRequestTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks delete request timeout response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete request timeout response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete request timeout response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks delete request timeout response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks delete request timeout response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud cloudconnections networks delete request timeout response +func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) Code() int { + return 408 +} + func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteRequestTimeout %+v", 408, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteRequestTimeout %+v", 408, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksDeleteRequestTimeout) GetPayload() *models.Error { return o.Payload } @@ -271,7 +561,8 @@ func NewPcloudCloudconnectionsNetworksDeleteGone() *PcloudCloudconnectionsNetwor return &PcloudCloudconnectionsNetworksDeleteGone{} } -/* PcloudCloudconnectionsNetworksDeleteGone describes a response with status code 410, with default header values. +/* +PcloudCloudconnectionsNetworksDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -279,9 +570,44 @@ type PcloudCloudconnectionsNetworksDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks delete gone response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete gone response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete gone response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks delete gone response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks delete gone response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud cloudconnections networks delete gone response +func (o *PcloudCloudconnectionsNetworksDeleteGone) Code() int { + return 410 +} + func (o *PcloudCloudconnectionsNetworksDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -303,7 +629,8 @@ func NewPcloudCloudconnectionsNetworksDeleteInternalServerError() *PcloudCloudco return &PcloudCloudconnectionsNetworksDeleteInternalServerError{} } -/* PcloudCloudconnectionsNetworksDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudconnectionsNetworksDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -311,9 +638,44 @@ type PcloudCloudconnectionsNetworksDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks delete internal server error response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks delete internal server error response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks delete internal server error response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections networks delete internal server error response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections networks delete internal server error response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudconnections networks delete internal server error response +func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_parameters.go index c19e5e7ad4a..7fdcb871daf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudconnectionsNetworksPutParamsWithHTTPClient(client *http.Clien } } -/* PcloudCloudconnectionsNetworksPutParams contains all the parameters to send to the API endpoint - for the pcloud cloudconnections networks put operation. +/* +PcloudCloudconnectionsNetworksPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudconnections networks put operation. + + Typically these are written to a http.Request. */ type PcloudCloudconnectionsNetworksPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go index 0317d3be1e0..afa8d478212 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -72,7 +78,7 @@ func (o *PcloudCloudconnectionsNetworksPutReader) ReadResponse(response runtime. } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}] pcloud.cloudconnections.networks.put", response, response.Code()) } } @@ -81,7 +87,8 @@ func NewPcloudCloudconnectionsNetworksPutOK() *PcloudCloudconnectionsNetworksPut return &PcloudCloudconnectionsNetworksPutOK{} } -/* PcloudCloudconnectionsNetworksPutOK describes a response with status code 200, with default header values. +/* +PcloudCloudconnectionsNetworksPutOK describes a response with status code 200, with default header values. OK */ @@ -89,9 +96,44 @@ type PcloudCloudconnectionsNetworksPutOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudconnections networks put o k response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections networks put o k response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put o k response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections networks put o k response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks put o k response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudconnections networks put o k response +func (o *PcloudCloudconnectionsNetworksPutOK) Code() int { + return 200 +} + func (o *PcloudCloudconnectionsNetworksPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutOK %+v", 200, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutOK %+v", 200, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksPutOK) GetPayload() models.Object { return o.Payload } @@ -111,7 +153,8 @@ func NewPcloudCloudconnectionsNetworksPutAccepted() *PcloudCloudconnectionsNetwo return &PcloudCloudconnectionsNetworksPutAccepted{} } -/* PcloudCloudconnectionsNetworksPutAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudconnectionsNetworksPutAccepted describes a response with status code 202, with default header values. Accepted */ @@ -119,9 +162,44 @@ type PcloudCloudconnectionsNetworksPutAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud cloudconnections networks put accepted response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections networks put accepted response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put accepted response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections networks put accepted response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks put accepted response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudconnections networks put accepted response +func (o *PcloudCloudconnectionsNetworksPutAccepted) Code() int { + return 202 +} + func (o *PcloudCloudconnectionsNetworksPutAccepted) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksPutAccepted) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksPutAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -143,7 +221,8 @@ func NewPcloudCloudconnectionsNetworksPutBadRequest() *PcloudCloudconnectionsNet return &PcloudCloudconnectionsNetworksPutBadRequest{} } -/* PcloudCloudconnectionsNetworksPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudconnectionsNetworksPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -151,9 +230,44 @@ type PcloudCloudconnectionsNetworksPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks put bad request response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks put bad request response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put bad request response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks put bad request response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks put bad request response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudconnections networks put bad request response +func (o *PcloudCloudconnectionsNetworksPutBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudconnectionsNetworksPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -175,7 +289,8 @@ func NewPcloudCloudconnectionsNetworksPutUnauthorized() *PcloudCloudconnectionsN return &PcloudCloudconnectionsNetworksPutUnauthorized{} } -/* PcloudCloudconnectionsNetworksPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudconnectionsNetworksPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -183,9 +298,44 @@ type PcloudCloudconnectionsNetworksPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks put unauthorized response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks put unauthorized response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put unauthorized response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks put unauthorized response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks put unauthorized response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudconnections networks put unauthorized response +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudconnectionsNetworksPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -202,12 +352,81 @@ 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{} } -/* PcloudCloudconnectionsNetworksPutNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudconnectionsNetworksPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -215,9 +434,44 @@ type PcloudCloudconnectionsNetworksPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks put not found response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks put not found response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put not found response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks put not found response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks put not found response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudconnections networks put not found response +func (o *PcloudCloudconnectionsNetworksPutNotFound) Code() int { + return 404 +} + func (o *PcloudCloudconnectionsNetworksPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -239,7 +493,8 @@ func NewPcloudCloudconnectionsNetworksPutRequestTimeout() *PcloudCloudconnection return &PcloudCloudconnectionsNetworksPutRequestTimeout{} } -/* PcloudCloudconnectionsNetworksPutRequestTimeout describes a response with status code 408, with default header values. +/* +PcloudCloudconnectionsNetworksPutRequestTimeout describes a response with status code 408, with default header values. Request Timeout */ @@ -247,9 +502,44 @@ type PcloudCloudconnectionsNetworksPutRequestTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks put request timeout response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks put request timeout response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put request timeout response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks put request timeout response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks put request timeout response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud cloudconnections networks put request timeout response +func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) Code() int { + return 408 +} + func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutRequestTimeout %+v", 408, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutRequestTimeout %+v", 408, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksPutRequestTimeout) GetPayload() *models.Error { return o.Payload } @@ -271,7 +561,8 @@ func NewPcloudCloudconnectionsNetworksPutUnprocessableEntity() *PcloudCloudconne return &PcloudCloudconnectionsNetworksPutUnprocessableEntity{} } -/* PcloudCloudconnectionsNetworksPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudCloudconnectionsNetworksPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -279,9 +570,44 @@ type PcloudCloudconnectionsNetworksPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks put unprocessable entity response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks put unprocessable entity response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put unprocessable entity response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections networks put unprocessable entity response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections networks put unprocessable entity response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudconnections networks put unprocessable entity response +func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -303,7 +629,8 @@ func NewPcloudCloudconnectionsNetworksPutInternalServerError() *PcloudCloudconne return &PcloudCloudconnectionsNetworksPutInternalServerError{} } -/* PcloudCloudconnectionsNetworksPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudconnectionsNetworksPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -311,9 +638,44 @@ type PcloudCloudconnectionsNetworksPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections networks put internal server error response has a 2xx status code +func (o *PcloudCloudconnectionsNetworksPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections networks put internal server error response has a 3xx status code +func (o *PcloudCloudconnectionsNetworksPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections networks put internal server error response has a 4xx status code +func (o *PcloudCloudconnectionsNetworksPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections networks put internal server error response has a 5xx status code +func (o *PcloudCloudconnectionsNetworksPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections networks put internal server error response a status code equal to that given +func (o *PcloudCloudconnectionsNetworksPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudconnections networks put internal server error response +func (o *PcloudCloudconnectionsNetworksPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudconnectionsNetworksPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudconnectionsNetworksPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}/networks/{network_id}][%d] pcloudCloudconnectionsNetworksPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudconnectionsNetworksPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_parameters.go index 71ee602f8c9..b2bcf71f5d4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudconnectionsPostParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudCloudconnectionsPostParams contains all the parameters to send to the API endpoint - for the pcloud cloudconnections post operation. +/* +PcloudCloudconnectionsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudconnections post operation. + + Typically these are written to a http.Request. */ type PcloudCloudconnectionsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go index bde60c12b20..aa886b9ba51 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -83,6 +89,12 @@ func (o *PcloudCloudconnectionsPostReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 503: + result := NewPcloudCloudconnectionsPostServiceUnavailable() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 504: result := NewPcloudCloudconnectionsPostGatewayTimeout() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -90,7 +102,7 @@ func (o *PcloudCloudconnectionsPostReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections] pcloud.cloudconnections.post", response, response.Code()) } } @@ -99,7 +111,8 @@ func NewPcloudCloudconnectionsPostOK() *PcloudCloudconnectionsPostOK { return &PcloudCloudconnectionsPostOK{} } -/* PcloudCloudconnectionsPostOK describes a response with status code 200, with default header values. +/* +PcloudCloudconnectionsPostOK describes a response with status code 200, with default header values. OK */ @@ -107,9 +120,44 @@ type PcloudCloudconnectionsPostOK struct { Payload *models.CloudConnection } +// IsSuccess returns true when this pcloud cloudconnections post o k response has a 2xx status code +func (o *PcloudCloudconnectionsPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections post o k response has a 3xx status code +func (o *PcloudCloudconnectionsPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post o k response has a 4xx status code +func (o *PcloudCloudconnectionsPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections post o k response has a 5xx status code +func (o *PcloudCloudconnectionsPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post o k response a status code equal to that given +func (o *PcloudCloudconnectionsPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudconnections post o k response +func (o *PcloudCloudconnectionsPostOK) Code() int { + return 200 +} + func (o *PcloudCloudconnectionsPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostOK %+v", 200, o.Payload) } + +func (o *PcloudCloudconnectionsPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostOK %+v", 200, o.Payload) +} + func (o *PcloudCloudconnectionsPostOK) GetPayload() *models.CloudConnection { return o.Payload } @@ -131,7 +179,8 @@ func NewPcloudCloudconnectionsPostCreated() *PcloudCloudconnectionsPostCreated { return &PcloudCloudconnectionsPostCreated{} } -/* PcloudCloudconnectionsPostCreated describes a response with status code 201, with default header values. +/* +PcloudCloudconnectionsPostCreated describes a response with status code 201, with default header values. Created */ @@ -139,9 +188,44 @@ type PcloudCloudconnectionsPostCreated struct { Payload *models.CloudConnection } +// IsSuccess returns true when this pcloud cloudconnections post created response has a 2xx status code +func (o *PcloudCloudconnectionsPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections post created response has a 3xx status code +func (o *PcloudCloudconnectionsPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post created response has a 4xx status code +func (o *PcloudCloudconnectionsPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections post created response has a 5xx status code +func (o *PcloudCloudconnectionsPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post created response a status code equal to that given +func (o *PcloudCloudconnectionsPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud cloudconnections post created response +func (o *PcloudCloudconnectionsPostCreated) Code() int { + return 201 +} + func (o *PcloudCloudconnectionsPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostCreated %+v", 201, o.Payload) } + +func (o *PcloudCloudconnectionsPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostCreated %+v", 201, o.Payload) +} + func (o *PcloudCloudconnectionsPostCreated) GetPayload() *models.CloudConnection { return o.Payload } @@ -163,7 +247,8 @@ func NewPcloudCloudconnectionsPostAccepted() *PcloudCloudconnectionsPostAccepted return &PcloudCloudconnectionsPostAccepted{} } -/* PcloudCloudconnectionsPostAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudconnectionsPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -171,9 +256,44 @@ type PcloudCloudconnectionsPostAccepted struct { Payload *models.CloudConnectionCreateResponse } +// IsSuccess returns true when this pcloud cloudconnections post accepted response has a 2xx status code +func (o *PcloudCloudconnectionsPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections post accepted response has a 3xx status code +func (o *PcloudCloudconnectionsPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post accepted response has a 4xx status code +func (o *PcloudCloudconnectionsPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections post accepted response has a 5xx status code +func (o *PcloudCloudconnectionsPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post accepted response a status code equal to that given +func (o *PcloudCloudconnectionsPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudconnections post accepted response +func (o *PcloudCloudconnectionsPostAccepted) Code() int { + return 202 +} + func (o *PcloudCloudconnectionsPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudconnectionsPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudconnectionsPostAccepted) GetPayload() *models.CloudConnectionCreateResponse { return o.Payload } @@ -195,7 +315,8 @@ func NewPcloudCloudconnectionsPostBadRequest() *PcloudCloudconnectionsPostBadReq return &PcloudCloudconnectionsPostBadRequest{} } -/* PcloudCloudconnectionsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudconnectionsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -203,9 +324,44 @@ type PcloudCloudconnectionsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections post bad request response has a 2xx status code +func (o *PcloudCloudconnectionsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post bad request response has a 3xx status code +func (o *PcloudCloudconnectionsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post bad request response has a 4xx status code +func (o *PcloudCloudconnectionsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections post bad request response has a 5xx status code +func (o *PcloudCloudconnectionsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post bad request response a status code equal to that given +func (o *PcloudCloudconnectionsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudconnections post bad request response +func (o *PcloudCloudconnectionsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudconnectionsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudconnectionsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudconnectionsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -227,7 +383,8 @@ func NewPcloudCloudconnectionsPostUnauthorized() *PcloudCloudconnectionsPostUnau return &PcloudCloudconnectionsPostUnauthorized{} } -/* PcloudCloudconnectionsPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudconnectionsPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -235,9 +392,44 @@ type PcloudCloudconnectionsPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections post unauthorized response has a 2xx status code +func (o *PcloudCloudconnectionsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post unauthorized response has a 3xx status code +func (o *PcloudCloudconnectionsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post unauthorized response has a 4xx status code +func (o *PcloudCloudconnectionsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections post unauthorized response has a 5xx status code +func (o *PcloudCloudconnectionsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post unauthorized response a status code equal to that given +func (o *PcloudCloudconnectionsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudconnections post unauthorized response +func (o *PcloudCloudconnectionsPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudconnectionsPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudconnectionsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudconnectionsPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -254,12 +446,81 @@ 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{} } -/* PcloudCloudconnectionsPostNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudconnectionsPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -267,9 +528,44 @@ type PcloudCloudconnectionsPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections post not found response has a 2xx status code +func (o *PcloudCloudconnectionsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post not found response has a 3xx status code +func (o *PcloudCloudconnectionsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post not found response has a 4xx status code +func (o *PcloudCloudconnectionsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections post not found response has a 5xx status code +func (o *PcloudCloudconnectionsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post not found response a status code equal to that given +func (o *PcloudCloudconnectionsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudconnections post not found response +func (o *PcloudCloudconnectionsPostNotFound) Code() int { + return 404 +} + func (o *PcloudCloudconnectionsPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudconnectionsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudconnectionsPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -291,7 +587,8 @@ func NewPcloudCloudconnectionsPostRequestTimeout() *PcloudCloudconnectionsPostRe return &PcloudCloudconnectionsPostRequestTimeout{} } -/* PcloudCloudconnectionsPostRequestTimeout describes a response with status code 408, with default header values. +/* +PcloudCloudconnectionsPostRequestTimeout describes a response with status code 408, with default header values. Request Timeout */ @@ -299,9 +596,44 @@ type PcloudCloudconnectionsPostRequestTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections post request timeout response has a 2xx status code +func (o *PcloudCloudconnectionsPostRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post request timeout response has a 3xx status code +func (o *PcloudCloudconnectionsPostRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post request timeout response has a 4xx status code +func (o *PcloudCloudconnectionsPostRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections post request timeout response has a 5xx status code +func (o *PcloudCloudconnectionsPostRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post request timeout response a status code equal to that given +func (o *PcloudCloudconnectionsPostRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud cloudconnections post request timeout response +func (o *PcloudCloudconnectionsPostRequestTimeout) Code() int { + return 408 +} + func (o *PcloudCloudconnectionsPostRequestTimeout) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostRequestTimeout %+v", 408, o.Payload) } + +func (o *PcloudCloudconnectionsPostRequestTimeout) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostRequestTimeout %+v", 408, o.Payload) +} + func (o *PcloudCloudconnectionsPostRequestTimeout) GetPayload() *models.Error { return o.Payload } @@ -323,7 +655,8 @@ func NewPcloudCloudconnectionsPostConflict() *PcloudCloudconnectionsPostConflict return &PcloudCloudconnectionsPostConflict{} } -/* PcloudCloudconnectionsPostConflict describes a response with status code 409, with default header values. +/* +PcloudCloudconnectionsPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -331,9 +664,44 @@ type PcloudCloudconnectionsPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections post conflict response has a 2xx status code +func (o *PcloudCloudconnectionsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post conflict response has a 3xx status code +func (o *PcloudCloudconnectionsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post conflict response has a 4xx status code +func (o *PcloudCloudconnectionsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections post conflict response has a 5xx status code +func (o *PcloudCloudconnectionsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post conflict response a status code equal to that given +func (o *PcloudCloudconnectionsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud cloudconnections post conflict response +func (o *PcloudCloudconnectionsPostConflict) Code() int { + return 409 +} + func (o *PcloudCloudconnectionsPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostConflict %+v", 409, o.Payload) } + +func (o *PcloudCloudconnectionsPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostConflict %+v", 409, o.Payload) +} + func (o *PcloudCloudconnectionsPostConflict) GetPayload() *models.Error { return o.Payload } @@ -355,7 +723,8 @@ func NewPcloudCloudconnectionsPostUnprocessableEntity() *PcloudCloudconnectionsP return &PcloudCloudconnectionsPostUnprocessableEntity{} } -/* PcloudCloudconnectionsPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudCloudconnectionsPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -363,9 +732,44 @@ type PcloudCloudconnectionsPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections post unprocessable entity response has a 2xx status code +func (o *PcloudCloudconnectionsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post unprocessable entity response has a 3xx status code +func (o *PcloudCloudconnectionsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post unprocessable entity response has a 4xx status code +func (o *PcloudCloudconnectionsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections post unprocessable entity response has a 5xx status code +func (o *PcloudCloudconnectionsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections post unprocessable entity response a status code equal to that given +func (o *PcloudCloudconnectionsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudconnections post unprocessable entity response +func (o *PcloudCloudconnectionsPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudCloudconnectionsPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudCloudconnectionsPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudCloudconnectionsPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -387,7 +791,8 @@ func NewPcloudCloudconnectionsPostInternalServerError() *PcloudCloudconnectionsP return &PcloudCloudconnectionsPostInternalServerError{} } -/* PcloudCloudconnectionsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudconnectionsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -395,9 +800,44 @@ type PcloudCloudconnectionsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections post internal server error response has a 2xx status code +func (o *PcloudCloudconnectionsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post internal server error response has a 3xx status code +func (o *PcloudCloudconnectionsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post internal server error response has a 4xx status code +func (o *PcloudCloudconnectionsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections post internal server error response has a 5xx status code +func (o *PcloudCloudconnectionsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections post internal server error response a status code equal to that given +func (o *PcloudCloudconnectionsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudconnections post internal server error response +func (o *PcloudCloudconnectionsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudconnectionsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudconnectionsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudconnectionsPostInternalServerError) GetPayload() *models.Error { return o.Payload } @@ -414,12 +854,81 @@ func (o *PcloudCloudconnectionsPostInternalServerError) readResponse(response ru return nil } +// NewPcloudCloudconnectionsPostServiceUnavailable creates a PcloudCloudconnectionsPostServiceUnavailable with default headers values +func NewPcloudCloudconnectionsPostServiceUnavailable() *PcloudCloudconnectionsPostServiceUnavailable { + return &PcloudCloudconnectionsPostServiceUnavailable{} +} + +/* +PcloudCloudconnectionsPostServiceUnavailable describes a response with status code 503, with default header values. + +Service Unavailable +*/ +type PcloudCloudconnectionsPostServiceUnavailable struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections post service unavailable response has a 2xx status code +func (o *PcloudCloudconnectionsPostServiceUnavailable) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post service unavailable response has a 3xx status code +func (o *PcloudCloudconnectionsPostServiceUnavailable) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post service unavailable response has a 4xx status code +func (o *PcloudCloudconnectionsPostServiceUnavailable) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections post service unavailable response has a 5xx status code +func (o *PcloudCloudconnectionsPostServiceUnavailable) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections post service unavailable response a status code equal to that given +func (o *PcloudCloudconnectionsPostServiceUnavailable) IsCode(code int) bool { + return code == 503 +} + +// Code gets the status code for the pcloud cloudconnections post service unavailable response +func (o *PcloudCloudconnectionsPostServiceUnavailable) Code() int { + return 503 +} + +func (o *PcloudCloudconnectionsPostServiceUnavailable) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostServiceUnavailable %+v", 503, o.Payload) +} + +func (o *PcloudCloudconnectionsPostServiceUnavailable) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostServiceUnavailable %+v", 503, o.Payload) +} + +func (o *PcloudCloudconnectionsPostServiceUnavailable) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsPostServiceUnavailable) 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 +} + // NewPcloudCloudconnectionsPostGatewayTimeout creates a PcloudCloudconnectionsPostGatewayTimeout with default headers values func NewPcloudCloudconnectionsPostGatewayTimeout() *PcloudCloudconnectionsPostGatewayTimeout { return &PcloudCloudconnectionsPostGatewayTimeout{} } -/* PcloudCloudconnectionsPostGatewayTimeout describes a response with status code 504, with default header values. +/* +PcloudCloudconnectionsPostGatewayTimeout describes a response with status code 504, with default header values. Gateway Timeout */ @@ -427,9 +936,44 @@ type PcloudCloudconnectionsPostGatewayTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections post gateway timeout response has a 2xx status code +func (o *PcloudCloudconnectionsPostGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections post gateway timeout response has a 3xx status code +func (o *PcloudCloudconnectionsPostGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections post gateway timeout response has a 4xx status code +func (o *PcloudCloudconnectionsPostGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections post gateway timeout response has a 5xx status code +func (o *PcloudCloudconnectionsPostGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections post gateway timeout response a status code equal to that given +func (o *PcloudCloudconnectionsPostGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the pcloud cloudconnections post gateway timeout response +func (o *PcloudCloudconnectionsPostGatewayTimeout) Code() int { + return 504 +} + func (o *PcloudCloudconnectionsPostGatewayTimeout) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostGatewayTimeout %+v", 504, o.Payload) } + +func (o *PcloudCloudconnectionsPostGatewayTimeout) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostGatewayTimeout %+v", 504, o.Payload) +} + func (o *PcloudCloudconnectionsPostGatewayTimeout) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_parameters.go index 136980886a0..61ecb3bec50 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudconnectionsPutParamsWithHTTPClient(client *http.Client) *Pclo } } -/* PcloudCloudconnectionsPutParams contains all the parameters to send to the API endpoint - for the pcloud cloudconnections put operation. +/* +PcloudCloudconnectionsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudconnections put operation. + + Typically these are written to a http.Request. */ type PcloudCloudconnectionsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go index 2b46c560fa1..df515672a3c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -83,8 +89,14 @@ func (o *PcloudCloudconnectionsPutReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 503: + result := NewPcloudCloudconnectionsPutServiceUnavailable() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}] pcloud.cloudconnections.put", response, response.Code()) } } @@ -93,7 +105,8 @@ func NewPcloudCloudconnectionsPutOK() *PcloudCloudconnectionsPutOK { return &PcloudCloudconnectionsPutOK{} } -/* PcloudCloudconnectionsPutOK describes a response with status code 200, with default header values. +/* +PcloudCloudconnectionsPutOK describes a response with status code 200, with default header values. OK */ @@ -101,9 +114,44 @@ type PcloudCloudconnectionsPutOK struct { Payload *models.CloudConnection } +// IsSuccess returns true when this pcloud cloudconnections put o k response has a 2xx status code +func (o *PcloudCloudconnectionsPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections put o k response has a 3xx status code +func (o *PcloudCloudconnectionsPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put o k response has a 4xx status code +func (o *PcloudCloudconnectionsPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections put o k response has a 5xx status code +func (o *PcloudCloudconnectionsPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put o k response a status code equal to that given +func (o *PcloudCloudconnectionsPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudconnections put o k response +func (o *PcloudCloudconnectionsPutOK) Code() int { + return 200 +} + func (o *PcloudCloudconnectionsPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutOK %+v", 200, o.Payload) } + +func (o *PcloudCloudconnectionsPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutOK %+v", 200, o.Payload) +} + func (o *PcloudCloudconnectionsPutOK) GetPayload() *models.CloudConnection { return o.Payload } @@ -125,7 +173,8 @@ func NewPcloudCloudconnectionsPutAccepted() *PcloudCloudconnectionsPutAccepted { return &PcloudCloudconnectionsPutAccepted{} } -/* PcloudCloudconnectionsPutAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudconnectionsPutAccepted describes a response with status code 202, with default header values. Accepted */ @@ -133,9 +182,44 @@ type PcloudCloudconnectionsPutAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud cloudconnections put accepted response has a 2xx status code +func (o *PcloudCloudconnectionsPutAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections put accepted response has a 3xx status code +func (o *PcloudCloudconnectionsPutAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put accepted response has a 4xx status code +func (o *PcloudCloudconnectionsPutAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections put accepted response has a 5xx status code +func (o *PcloudCloudconnectionsPutAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put accepted response a status code equal to that given +func (o *PcloudCloudconnectionsPutAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudconnections put accepted response +func (o *PcloudCloudconnectionsPutAccepted) Code() int { + return 202 +} + func (o *PcloudCloudconnectionsPutAccepted) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudconnectionsPutAccepted) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudconnectionsPutAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -157,7 +241,8 @@ func NewPcloudCloudconnectionsPutBadRequest() *PcloudCloudconnectionsPutBadReque return &PcloudCloudconnectionsPutBadRequest{} } -/* PcloudCloudconnectionsPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudconnectionsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -165,9 +250,44 @@ type PcloudCloudconnectionsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections put bad request response has a 2xx status code +func (o *PcloudCloudconnectionsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put bad request response has a 3xx status code +func (o *PcloudCloudconnectionsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put bad request response has a 4xx status code +func (o *PcloudCloudconnectionsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections put bad request response has a 5xx status code +func (o *PcloudCloudconnectionsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put bad request response a status code equal to that given +func (o *PcloudCloudconnectionsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudconnections put bad request response +func (o *PcloudCloudconnectionsPutBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudconnectionsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudconnectionsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudconnectionsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -189,7 +309,8 @@ func NewPcloudCloudconnectionsPutUnauthorized() *PcloudCloudconnectionsPutUnauth return &PcloudCloudconnectionsPutUnauthorized{} } -/* PcloudCloudconnectionsPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudconnectionsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -197,9 +318,44 @@ type PcloudCloudconnectionsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections put unauthorized response has a 2xx status code +func (o *PcloudCloudconnectionsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put unauthorized response has a 3xx status code +func (o *PcloudCloudconnectionsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put unauthorized response has a 4xx status code +func (o *PcloudCloudconnectionsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections put unauthorized response has a 5xx status code +func (o *PcloudCloudconnectionsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put unauthorized response a status code equal to that given +func (o *PcloudCloudconnectionsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudconnections put unauthorized response +func (o *PcloudCloudconnectionsPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudconnectionsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudconnectionsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudconnectionsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -216,12 +372,81 @@ 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{} } -/* PcloudCloudconnectionsPutNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudconnectionsPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -229,9 +454,44 @@ type PcloudCloudconnectionsPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections put not found response has a 2xx status code +func (o *PcloudCloudconnectionsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put not found response has a 3xx status code +func (o *PcloudCloudconnectionsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put not found response has a 4xx status code +func (o *PcloudCloudconnectionsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections put not found response has a 5xx status code +func (o *PcloudCloudconnectionsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put not found response a status code equal to that given +func (o *PcloudCloudconnectionsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudconnections put not found response +func (o *PcloudCloudconnectionsPutNotFound) Code() int { + return 404 +} + func (o *PcloudCloudconnectionsPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudconnectionsPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudconnectionsPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -253,7 +513,8 @@ func NewPcloudCloudconnectionsPutMethodNotAllowed() *PcloudCloudconnectionsPutMe return &PcloudCloudconnectionsPutMethodNotAllowed{} } -/* PcloudCloudconnectionsPutMethodNotAllowed describes a response with status code 405, with default header values. +/* +PcloudCloudconnectionsPutMethodNotAllowed describes a response with status code 405, with default header values. Method Not Allowed */ @@ -261,9 +522,44 @@ type PcloudCloudconnectionsPutMethodNotAllowed struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections put method not allowed response has a 2xx status code +func (o *PcloudCloudconnectionsPutMethodNotAllowed) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put method not allowed response has a 3xx status code +func (o *PcloudCloudconnectionsPutMethodNotAllowed) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put method not allowed response has a 4xx status code +func (o *PcloudCloudconnectionsPutMethodNotAllowed) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections put method not allowed response has a 5xx status code +func (o *PcloudCloudconnectionsPutMethodNotAllowed) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put method not allowed response a status code equal to that given +func (o *PcloudCloudconnectionsPutMethodNotAllowed) IsCode(code int) bool { + return code == 405 +} + +// Code gets the status code for the pcloud cloudconnections put method not allowed response +func (o *PcloudCloudconnectionsPutMethodNotAllowed) Code() int { + return 405 +} + func (o *PcloudCloudconnectionsPutMethodNotAllowed) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutMethodNotAllowed %+v", 405, o.Payload) } + +func (o *PcloudCloudconnectionsPutMethodNotAllowed) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutMethodNotAllowed %+v", 405, o.Payload) +} + func (o *PcloudCloudconnectionsPutMethodNotAllowed) GetPayload() *models.Error { return o.Payload } @@ -285,7 +581,8 @@ func NewPcloudCloudconnectionsPutRequestTimeout() *PcloudCloudconnectionsPutRequ return &PcloudCloudconnectionsPutRequestTimeout{} } -/* PcloudCloudconnectionsPutRequestTimeout describes a response with status code 408, with default header values. +/* +PcloudCloudconnectionsPutRequestTimeout describes a response with status code 408, with default header values. Request Timeout */ @@ -293,9 +590,44 @@ type PcloudCloudconnectionsPutRequestTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections put request timeout response has a 2xx status code +func (o *PcloudCloudconnectionsPutRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put request timeout response has a 3xx status code +func (o *PcloudCloudconnectionsPutRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put request timeout response has a 4xx status code +func (o *PcloudCloudconnectionsPutRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections put request timeout response has a 5xx status code +func (o *PcloudCloudconnectionsPutRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put request timeout response a status code equal to that given +func (o *PcloudCloudconnectionsPutRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud cloudconnections put request timeout response +func (o *PcloudCloudconnectionsPutRequestTimeout) Code() int { + return 408 +} + func (o *PcloudCloudconnectionsPutRequestTimeout) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutRequestTimeout %+v", 408, o.Payload) } + +func (o *PcloudCloudconnectionsPutRequestTimeout) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutRequestTimeout %+v", 408, o.Payload) +} + func (o *PcloudCloudconnectionsPutRequestTimeout) GetPayload() *models.Error { return o.Payload } @@ -317,7 +649,8 @@ func NewPcloudCloudconnectionsPutConflict() *PcloudCloudconnectionsPutConflict { return &PcloudCloudconnectionsPutConflict{} } -/* PcloudCloudconnectionsPutConflict describes a response with status code 409, with default header values. +/* +PcloudCloudconnectionsPutConflict describes a response with status code 409, with default header values. Conflict */ @@ -325,9 +658,44 @@ type PcloudCloudconnectionsPutConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections put conflict response has a 2xx status code +func (o *PcloudCloudconnectionsPutConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put conflict response has a 3xx status code +func (o *PcloudCloudconnectionsPutConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put conflict response has a 4xx status code +func (o *PcloudCloudconnectionsPutConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections put conflict response has a 5xx status code +func (o *PcloudCloudconnectionsPutConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put conflict response a status code equal to that given +func (o *PcloudCloudconnectionsPutConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud cloudconnections put conflict response +func (o *PcloudCloudconnectionsPutConflict) Code() int { + return 409 +} + func (o *PcloudCloudconnectionsPutConflict) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutConflict %+v", 409, o.Payload) } + +func (o *PcloudCloudconnectionsPutConflict) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutConflict %+v", 409, o.Payload) +} + func (o *PcloudCloudconnectionsPutConflict) GetPayload() *models.Error { return o.Payload } @@ -349,7 +717,8 @@ func NewPcloudCloudconnectionsPutUnprocessableEntity() *PcloudCloudconnectionsPu return &PcloudCloudconnectionsPutUnprocessableEntity{} } -/* PcloudCloudconnectionsPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudCloudconnectionsPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -357,9 +726,44 @@ type PcloudCloudconnectionsPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections put unprocessable entity response has a 2xx status code +func (o *PcloudCloudconnectionsPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put unprocessable entity response has a 3xx status code +func (o *PcloudCloudconnectionsPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put unprocessable entity response has a 4xx status code +func (o *PcloudCloudconnectionsPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections put unprocessable entity response has a 5xx status code +func (o *PcloudCloudconnectionsPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections put unprocessable entity response a status code equal to that given +func (o *PcloudCloudconnectionsPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudconnections put unprocessable entity response +func (o *PcloudCloudconnectionsPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudCloudconnectionsPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudCloudconnectionsPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudCloudconnectionsPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -381,7 +785,8 @@ func NewPcloudCloudconnectionsPutInternalServerError() *PcloudCloudconnectionsPu return &PcloudCloudconnectionsPutInternalServerError{} } -/* PcloudCloudconnectionsPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudconnectionsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -389,9 +794,44 @@ type PcloudCloudconnectionsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections put internal server error response has a 2xx status code +func (o *PcloudCloudconnectionsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put internal server error response has a 3xx status code +func (o *PcloudCloudconnectionsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put internal server error response has a 4xx status code +func (o *PcloudCloudconnectionsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections put internal server error response has a 5xx status code +func (o *PcloudCloudconnectionsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections put internal server error response a status code equal to that given +func (o *PcloudCloudconnectionsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudconnections put internal server error response +func (o *PcloudCloudconnectionsPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudconnectionsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudconnectionsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudconnectionsPutInternalServerError) GetPayload() *models.Error { return o.Payload } @@ -407,3 +847,71 @@ func (o *PcloudCloudconnectionsPutInternalServerError) readResponse(response run return nil } + +// NewPcloudCloudconnectionsPutServiceUnavailable creates a PcloudCloudconnectionsPutServiceUnavailable with default headers values +func NewPcloudCloudconnectionsPutServiceUnavailable() *PcloudCloudconnectionsPutServiceUnavailable { + return &PcloudCloudconnectionsPutServiceUnavailable{} +} + +/* +PcloudCloudconnectionsPutServiceUnavailable describes a response with status code 503, with default header values. + +Service Unavailable +*/ +type PcloudCloudconnectionsPutServiceUnavailable struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections put service unavailable response has a 2xx status code +func (o *PcloudCloudconnectionsPutServiceUnavailable) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections put service unavailable response has a 3xx status code +func (o *PcloudCloudconnectionsPutServiceUnavailable) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections put service unavailable response has a 4xx status code +func (o *PcloudCloudconnectionsPutServiceUnavailable) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections put service unavailable response has a 5xx status code +func (o *PcloudCloudconnectionsPutServiceUnavailable) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections put service unavailable response a status code equal to that given +func (o *PcloudCloudconnectionsPutServiceUnavailable) IsCode(code int) bool { + return code == 503 +} + +// Code gets the status code for the pcloud cloudconnections put service unavailable response +func (o *PcloudCloudconnectionsPutServiceUnavailable) Code() int { + return 503 +} + +func (o *PcloudCloudconnectionsPutServiceUnavailable) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutServiceUnavailable %+v", 503, o.Payload) +} + +func (o *PcloudCloudconnectionsPutServiceUnavailable) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections/{cloud_connection_id}][%d] pcloudCloudconnectionsPutServiceUnavailable %+v", 503, o.Payload) +} + +func (o *PcloudCloudconnectionsPutServiceUnavailable) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsPutServiceUnavailable) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_parameters.go index 6cc7c04cd6a..64064893b6f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudconnectionsVirtualprivatecloudsGetallParamsWithHTTPClient(cli } } -/* PcloudCloudconnectionsVirtualprivatecloudsGetallParams contains all the parameters to send to the API endpoint - for the pcloud cloudconnections virtualprivateclouds getall operation. +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudconnections virtualprivateclouds getall operation. + + Typically these are written to a http.Request. */ type PcloudCloudconnectionsVirtualprivatecloudsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go index 3da81fad1e3..164c7838c78 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallReader) ReadResponse(re return nil, err } return nil, result + case 403: + result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -53,6 +65,12 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallReader) ReadResponse(re return nil, err } return nil, result + case 503: + result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 504: result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +78,7 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallReader) ReadResponse(re } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds] pcloud.cloudconnections.virtualprivateclouds.getall", response, response.Code()) } } @@ -69,7 +87,8 @@ func NewPcloudCloudconnectionsVirtualprivatecloudsGetallOK() *PcloudCloudconnect return &PcloudCloudconnectionsVirtualprivatecloudsGetallOK{} } -/* PcloudCloudconnectionsVirtualprivatecloudsGetallOK describes a response with status code 200, with default header values. +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +96,44 @@ type PcloudCloudconnectionsVirtualprivatecloudsGetallOK struct { Payload *models.CloudConnectionVirtualPrivateClouds } +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall o k response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall o k response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall o k response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall o k response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall o k response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall o k response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) Code() int { + return 200 +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallOK) GetPayload() *models.CloudConnectionVirtualPrivateClouds { return o.Payload } @@ -101,7 +155,8 @@ func NewPcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest() *PcloudClou return &PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest{} } -/* PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +164,44 @@ type PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall bad request response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall bad request response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall bad request response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall bad request response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall bad request response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall bad request response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +223,8 @@ func NewPcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized() *PcloudCl return &PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized{} } -/* PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +232,44 @@ type PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall unauthorized response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall unauthorized response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall unauthorized response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall unauthorized response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall unauthorized response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall unauthorized response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +286,149 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) readRespo return nil } +// NewPcloudCloudconnectionsVirtualprivatecloudsGetallForbidden creates a PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden with default headers values +func NewPcloudCloudconnectionsVirtualprivatecloudsGetallForbidden() *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden { + return &PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden{} +} + +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall forbidden response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall forbidden response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall forbidden response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall forbidden response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall forbidden response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall forbidden response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallForbidden) 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 +} + +// 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{} } -/* PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout describes a response with status code 408, with default header values. +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout describes a response with status code 408, with default header values. Request Timeout */ @@ -173,9 +436,44 @@ type PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall request timeout response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall request timeout response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall request timeout response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall request timeout response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall request timeout response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall request timeout response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) Code() int { + return 408 +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout %+v", 408, o.Payload) } + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout %+v", 408, o.Payload) +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) GetPayload() *models.Error { return o.Payload } @@ -197,7 +495,8 @@ func NewPcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError() *P return &PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError{} } -/* PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -205,9 +504,44 @@ type PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError struct Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall internal server error response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall internal server error response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall internal server error response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall internal server error response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall internal server error response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall internal server error response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } @@ -224,12 +558,81 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) re return nil } +// NewPcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable creates a PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable with default headers values +func NewPcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable() *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable { + return &PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable{} +} + +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable describes a response with status code 503, with default header values. + +Service Unavailable +*/ +type PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall service unavailable response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall service unavailable response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall service unavailable response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall service unavailable response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall service unavailable response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) IsCode(code int) bool { + return code == 503 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall service unavailable response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) Code() int { + return 503 +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable %+v", 503, o.Payload) +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable %+v", 503, o.Payload) +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallServiceUnavailable) 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 +} + // NewPcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout creates a PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout with default headers values func NewPcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout() *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout { return &PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout{} } -/* PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout describes a response with status code 504, with default header values. +/* +PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout describes a response with status code 504, with default header values. Gateway Timeout */ @@ -237,9 +640,44 @@ type PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudconnections virtualprivateclouds getall gateway timeout response has a 2xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudconnections virtualprivateclouds getall gateway timeout response has a 3xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudconnections virtualprivateclouds getall gateway timeout response has a 4xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudconnections virtualprivateclouds getall gateway timeout response has a 5xx status code +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudconnections virtualprivateclouds getall gateway timeout response a status code equal to that given +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the pcloud cloudconnections virtualprivateclouds getall gateway timeout response +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) Code() int { + return 504 +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout %+v", 504, o.Payload) } + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout %+v", 504, o.Payload) +} + func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go index 377f9a1628d..bdcf215fc6c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go @@ -38,7 +38,7 @@ type ClientService interface { } /* - PcloudLocationsDisasterrecoveryGet gets the disaster recovery site details for the current location +PcloudLocationsDisasterrecoveryGet gets the disaster recovery site details for the current location */ func (a *Client) PcloudLocationsDisasterrecoveryGet(params *PcloudLocationsDisasterrecoveryGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudLocationsDisasterrecoveryGetOK, error) { // TODO: Validate the params before sending @@ -77,7 +77,7 @@ func (a *Client) PcloudLocationsDisasterrecoveryGet(params *PcloudLocationsDisas } /* - PcloudLocationsDisasterrecoveryGetall gets all disaster recovery locations supported by power virtual server +PcloudLocationsDisasterrecoveryGetall gets all disaster recovery locations supported by power virtual server */ func (a *Client) PcloudLocationsDisasterrecoveryGetall(params *PcloudLocationsDisasterrecoveryGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudLocationsDisasterrecoveryGetallOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_parameters.go index 60da677c6d5..7bdf07a13ad 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudLocationsDisasterrecoveryGetParamsWithHTTPClient(client *http.Clie } } -/* PcloudLocationsDisasterrecoveryGetParams contains all the parameters to send to the API endpoint - for the pcloud locations disasterrecovery get operation. +/* +PcloudLocationsDisasterrecoveryGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud locations disasterrecovery get operation. + + Typically these are written to a http.Request. */ type PcloudLocationsDisasterrecoveryGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go index 3bf37390be8..735176d8ca1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go @@ -29,12 +29,24 @@ func (o *PcloudLocationsDisasterrecoveryGetReader) ReadResponse(response runtime return nil, err } return result, nil + case 400: + result := NewPcloudLocationsDisasterrecoveryGetBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudLocationsDisasterrecoveryGetUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 403: + result := NewPcloudLocationsDisasterrecoveryGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudLocationsDisasterrecoveryGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudLocationsDisasterrecoveryGetReader) ReadResponse(response runtime } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery] pcloud.locations.disasterrecovery.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudLocationsDisasterrecoveryGetOK() *PcloudLocationsDisasterrecoveryG return &PcloudLocationsDisasterrecoveryGetOK{} } -/* PcloudLocationsDisasterrecoveryGetOK describes a response with status code 200, with default header values. +/* +PcloudLocationsDisasterrecoveryGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudLocationsDisasterrecoveryGetOK struct { Payload *models.DisasterRecoveryLocation } +// IsSuccess returns true when this pcloud locations disasterrecovery get o k response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud locations disasterrecovery get o k response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery get o k response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud locations disasterrecovery get o k response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery get o k response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud locations disasterrecovery get o k response +func (o *PcloudLocationsDisasterrecoveryGetOK) Code() int { + return 200 +} + func (o *PcloudLocationsDisasterrecoveryGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetOK %+v", 200, o.Payload) } + +func (o *PcloudLocationsDisasterrecoveryGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetOK %+v", 200, o.Payload) +} + func (o *PcloudLocationsDisasterrecoveryGetOK) GetPayload() *models.DisasterRecoveryLocation { return o.Payload } @@ -84,12 +132,81 @@ func (o *PcloudLocationsDisasterrecoveryGetOK) readResponse(response runtime.Cli return nil } +// NewPcloudLocationsDisasterrecoveryGetBadRequest creates a PcloudLocationsDisasterrecoveryGetBadRequest with default headers values +func NewPcloudLocationsDisasterrecoveryGetBadRequest() *PcloudLocationsDisasterrecoveryGetBadRequest { + return &PcloudLocationsDisasterrecoveryGetBadRequest{} +} + +/* +PcloudLocationsDisasterrecoveryGetBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudLocationsDisasterrecoveryGetBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud locations disasterrecovery get bad request response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery get bad request response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery get bad request response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud locations disasterrecovery get bad request response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery get bad request response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud locations disasterrecovery get bad request response +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) Code() int { + return 400 +} + +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudLocationsDisasterrecoveryGetBadRequest) 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 +} + // NewPcloudLocationsDisasterrecoveryGetUnauthorized creates a PcloudLocationsDisasterrecoveryGetUnauthorized with default headers values func NewPcloudLocationsDisasterrecoveryGetUnauthorized() *PcloudLocationsDisasterrecoveryGetUnauthorized { return &PcloudLocationsDisasterrecoveryGetUnauthorized{} } -/* PcloudLocationsDisasterrecoveryGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudLocationsDisasterrecoveryGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudLocationsDisasterrecoveryGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud locations disasterrecovery get unauthorized response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery get unauthorized response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery get unauthorized response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud locations disasterrecovery get unauthorized response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery get unauthorized response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud locations disasterrecovery get unauthorized response +func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ func (o *PcloudLocationsDisasterrecoveryGetUnauthorized) readResponse(response r return nil } +// NewPcloudLocationsDisasterrecoveryGetForbidden creates a PcloudLocationsDisasterrecoveryGetForbidden with default headers values +func NewPcloudLocationsDisasterrecoveryGetForbidden() *PcloudLocationsDisasterrecoveryGetForbidden { + return &PcloudLocationsDisasterrecoveryGetForbidden{} +} + +/* +PcloudLocationsDisasterrecoveryGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudLocationsDisasterrecoveryGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud locations disasterrecovery get forbidden response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery get forbidden response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery get forbidden response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud locations disasterrecovery get forbidden response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery get forbidden response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud locations disasterrecovery get forbidden response +func (o *PcloudLocationsDisasterrecoveryGetForbidden) Code() int { + return 403 +} + +func (o *PcloudLocationsDisasterrecoveryGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudLocationsDisasterrecoveryGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudLocationsDisasterrecoveryGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudLocationsDisasterrecoveryGetForbidden) 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 +} + // NewPcloudLocationsDisasterrecoveryGetNotFound creates a PcloudLocationsDisasterrecoveryGetNotFound with default headers values func NewPcloudLocationsDisasterrecoveryGetNotFound() *PcloudLocationsDisasterrecoveryGetNotFound { return &PcloudLocationsDisasterrecoveryGetNotFound{} } -/* PcloudLocationsDisasterrecoveryGetNotFound describes a response with status code 404, with default header values. +/* +PcloudLocationsDisasterrecoveryGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudLocationsDisasterrecoveryGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud locations disasterrecovery get not found response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery get not found response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery get not found response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud locations disasterrecovery get not found response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery get not found response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud locations disasterrecovery get not found response +func (o *PcloudLocationsDisasterrecoveryGetNotFound) Code() int { + return 404 +} + func (o *PcloudLocationsDisasterrecoveryGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudLocationsDisasterrecoveryGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudLocationsDisasterrecoveryGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudLocationsDisasterrecoveryGetInternalServerError() *PcloudLocations return &PcloudLocationsDisasterrecoveryGetInternalServerError{} } -/* PcloudLocationsDisasterrecoveryGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudLocationsDisasterrecoveryGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudLocationsDisasterrecoveryGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud locations disasterrecovery get internal server error response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery get internal server error response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery get internal server error response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud locations disasterrecovery get internal server error response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud locations disasterrecovery get internal server error response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud locations disasterrecovery get internal server error response +func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudLocationsDisasterrecoveryGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_parameters.go index 4c92f7d7fba..bee46c0c309 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudLocationsDisasterrecoveryGetallParamsWithHTTPClient(client *http.C } } -/* PcloudLocationsDisasterrecoveryGetallParams contains all the parameters to send to the API endpoint - for the pcloud locations disasterrecovery getall operation. +/* +PcloudLocationsDisasterrecoveryGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud locations disasterrecovery getall operation. + + Typically these are written to a http.Request. */ type PcloudLocationsDisasterrecoveryGetallParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go index 6af89762eda..d83e4ff445c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go @@ -29,12 +29,24 @@ func (o *PcloudLocationsDisasterrecoveryGetallReader) ReadResponse(response runt return nil, err } return result, nil + case 400: + result := NewPcloudLocationsDisasterrecoveryGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 401: result := NewPcloudLocationsDisasterrecoveryGetallUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { 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 { @@ -48,7 +60,7 @@ func (o *PcloudLocationsDisasterrecoveryGetallReader) ReadResponse(response runt } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/locations/disaster-recovery] pcloud.locations.disasterrecovery.getall", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudLocationsDisasterrecoveryGetallOK() *PcloudLocationsDisasterrecove return &PcloudLocationsDisasterrecoveryGetallOK{} } -/* PcloudLocationsDisasterrecoveryGetallOK describes a response with status code 200, with default header values. +/* +PcloudLocationsDisasterrecoveryGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudLocationsDisasterrecoveryGetallOK struct { Payload *models.DisasterRecoveryLocations } +// IsSuccess returns true when this pcloud locations disasterrecovery getall o k response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud locations disasterrecovery getall o k response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery getall o k response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud locations disasterrecovery getall o k response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery getall o k response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud locations disasterrecovery getall o k response +func (o *PcloudLocationsDisasterrecoveryGetallOK) Code() int { + return 200 +} + func (o *PcloudLocationsDisasterrecoveryGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallOK %+v", 200, o.Payload) } + +func (o *PcloudLocationsDisasterrecoveryGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallOK %+v", 200, o.Payload) +} + func (o *PcloudLocationsDisasterrecoveryGetallOK) GetPayload() *models.DisasterRecoveryLocations { return o.Payload } @@ -84,12 +132,81 @@ func (o *PcloudLocationsDisasterrecoveryGetallOK) readResponse(response runtime. return nil } +// NewPcloudLocationsDisasterrecoveryGetallBadRequest creates a PcloudLocationsDisasterrecoveryGetallBadRequest with default headers values +func NewPcloudLocationsDisasterrecoveryGetallBadRequest() *PcloudLocationsDisasterrecoveryGetallBadRequest { + return &PcloudLocationsDisasterrecoveryGetallBadRequest{} +} + +/* +PcloudLocationsDisasterrecoveryGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudLocationsDisasterrecoveryGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud locations disasterrecovery getall bad request response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery getall bad request response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery getall bad request response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud locations disasterrecovery getall bad request response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery getall bad request response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud locations disasterrecovery getall bad request response +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) Code() int { + return 400 +} + +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudLocationsDisasterrecoveryGetallBadRequest) 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 +} + // NewPcloudLocationsDisasterrecoveryGetallUnauthorized creates a PcloudLocationsDisasterrecoveryGetallUnauthorized with default headers values func NewPcloudLocationsDisasterrecoveryGetallUnauthorized() *PcloudLocationsDisasterrecoveryGetallUnauthorized { return &PcloudLocationsDisasterrecoveryGetallUnauthorized{} } -/* PcloudLocationsDisasterrecoveryGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudLocationsDisasterrecoveryGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudLocationsDisasterrecoveryGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud locations disasterrecovery getall unauthorized response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery getall unauthorized response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery getall unauthorized response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud locations disasterrecovery getall unauthorized response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery getall unauthorized response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud locations disasterrecovery getall unauthorized response +func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudLocationsDisasterrecoveryGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ 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{} } -/* PcloudLocationsDisasterrecoveryGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudLocationsDisasterrecoveryGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudLocationsDisasterrecoveryGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud locations disasterrecovery getall not found response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery getall not found response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery getall not found response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud locations disasterrecovery getall not found response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud locations disasterrecovery getall not found response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud locations disasterrecovery getall not found response +func (o *PcloudLocationsDisasterrecoveryGetallNotFound) Code() int { + return 404 +} + func (o *PcloudLocationsDisasterrecoveryGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudLocationsDisasterrecoveryGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudLocationsDisasterrecoveryGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudLocationsDisasterrecoveryGetallInternalServerError() *PcloudLocati return &PcloudLocationsDisasterrecoveryGetallInternalServerError{} } -/* PcloudLocationsDisasterrecoveryGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudLocationsDisasterrecoveryGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudLocationsDisasterrecoveryGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud locations disasterrecovery getall internal server error response has a 2xx status code +func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud locations disasterrecovery getall internal server error response has a 3xx status code +func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud locations disasterrecovery getall internal server error response has a 4xx status code +func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud locations disasterrecovery getall internal server error response has a 5xx status code +func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud locations disasterrecovery getall internal server error response a status code equal to that given +func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud locations disasterrecovery getall internal server error response +func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/locations/disaster-recovery][%d] pcloudLocationsDisasterrecoveryGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudLocationsDisasterrecoveryGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/p_cloud_events_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/p_cloud_events_client.go index 7305a15619f..567b869dad4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/p_cloud_events_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/p_cloud_events_client.go @@ -38,7 +38,7 @@ type ClientService interface { } /* - PcloudEventsGet gets a single event +PcloudEventsGet gets a single event */ func (a *Client) PcloudEventsGet(params *PcloudEventsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudEventsGetOK, error) { // TODO: Validate the params before sending @@ -77,7 +77,7 @@ func (a *Client) PcloudEventsGet(params *PcloudEventsGetParams, authInfo runtime } /* - PcloudEventsGetquery gets events from this cloud instance since a specific timestamp +PcloudEventsGetquery gets events from this cloud instance since a specific timestamp */ func (a *Client) PcloudEventsGetquery(params *PcloudEventsGetqueryParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudEventsGetqueryOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_parameters.go index a2b5d98e841..86b441740b8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudEventsGetParamsWithHTTPClient(client *http.Client) *PcloudEventsGe } } -/* PcloudEventsGetParams contains all the parameters to send to the API endpoint - for the pcloud events get operation. +/* +PcloudEventsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud events get operation. + + Typically these are written to a http.Request. */ type PcloudEventsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go index ff28ed26483..b332e0ec5cb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudEventsGetReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return nil, result + case 403: + result := NewPcloudEventsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudEventsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudEventsGetReader) ReadResponse(response runtime.ClientResponse, co } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}] pcloud.events.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudEventsGetOK() *PcloudEventsGetOK { return &PcloudEventsGetOK{} } -/* PcloudEventsGetOK describes a response with status code 200, with default header values. +/* +PcloudEventsGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudEventsGetOK struct { Payload *models.Event } +// IsSuccess returns true when this pcloud events get o k response has a 2xx status code +func (o *PcloudEventsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud events get o k response has a 3xx status code +func (o *PcloudEventsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events get o k response has a 4xx status code +func (o *PcloudEventsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud events get o k response has a 5xx status code +func (o *PcloudEventsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events get o k response a status code equal to that given +func (o *PcloudEventsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud events get o k response +func (o *PcloudEventsGetOK) Code() int { + return 200 +} + func (o *PcloudEventsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetOK %+v", 200, o.Payload) } + +func (o *PcloudEventsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetOK %+v", 200, o.Payload) +} + func (o *PcloudEventsGetOK) GetPayload() *models.Event { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudEventsGetBadRequest() *PcloudEventsGetBadRequest { return &PcloudEventsGetBadRequest{} } -/* PcloudEventsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudEventsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudEventsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud events get bad request response has a 2xx status code +func (o *PcloudEventsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events get bad request response has a 3xx status code +func (o *PcloudEventsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events get bad request response has a 4xx status code +func (o *PcloudEventsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud events get bad request response has a 5xx status code +func (o *PcloudEventsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events get bad request response a status code equal to that given +func (o *PcloudEventsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud events get bad request response +func (o *PcloudEventsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudEventsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudEventsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudEventsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudEventsGetUnauthorized() *PcloudEventsGetUnauthorized { return &PcloudEventsGetUnauthorized{} } -/* PcloudEventsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudEventsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ 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 } @@ -154,12 +268,81 @@ func (o *PcloudEventsGetUnauthorized) readResponse(response runtime.ClientRespon return nil } +// NewPcloudEventsGetForbidden creates a PcloudEventsGetForbidden with default headers values +func NewPcloudEventsGetForbidden() *PcloudEventsGetForbidden { + return &PcloudEventsGetForbidden{} +} + +/* +PcloudEventsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudEventsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud events get forbidden response has a 2xx status code +func (o *PcloudEventsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events get forbidden response has a 3xx status code +func (o *PcloudEventsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events get forbidden response has a 4xx status code +func (o *PcloudEventsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud events get forbidden response has a 5xx status code +func (o *PcloudEventsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events get forbidden response a status code equal to that given +func (o *PcloudEventsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud events get forbidden response +func (o *PcloudEventsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudEventsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudEventsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudEventsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudEventsGetForbidden) 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 +} + // NewPcloudEventsGetNotFound creates a PcloudEventsGetNotFound with default headers values func NewPcloudEventsGetNotFound() *PcloudEventsGetNotFound { return &PcloudEventsGetNotFound{} } -/* PcloudEventsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudEventsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudEventsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud events get not found response has a 2xx status code +func (o *PcloudEventsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events get not found response has a 3xx status code +func (o *PcloudEventsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events get not found response has a 4xx status code +func (o *PcloudEventsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud events get not found response has a 5xx status code +func (o *PcloudEventsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events get not found response a status code equal to that given +func (o *PcloudEventsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud events get not found response +func (o *PcloudEventsGetNotFound) Code() int { + return 404 +} + func (o *PcloudEventsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudEventsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudEventsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudEventsGetInternalServerError() *PcloudEventsGetInternalServerError return &PcloudEventsGetInternalServerError{} } -/* PcloudEventsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudEventsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudEventsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud events get internal server error response has a 2xx status code +func (o *PcloudEventsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events get internal server error response has a 3xx status code +func (o *PcloudEventsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events get internal server error response has a 4xx status code +func (o *PcloudEventsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud events get internal server error response has a 5xx status code +func (o *PcloudEventsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud events get internal server error response a status code equal to that given +func (o *PcloudEventsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud events get internal server error response +func (o *PcloudEventsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudEventsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudEventsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events/{event_id}][%d] pcloudEventsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudEventsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_parameters.go index 4ee037fa96f..8355be3e0b8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_parameters.go @@ -52,10 +52,12 @@ func NewPcloudEventsGetqueryParamsWithHTTPClient(client *http.Client) *PcloudEve } } -/* PcloudEventsGetqueryParams contains all the parameters to send to the API endpoint - for the pcloud events getquery operation. +/* +PcloudEventsGetqueryParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud events getquery operation. + + Typically these are written to a http.Request. */ type PcloudEventsGetqueryParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go index b018f267f24..97369cbf816 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_events/pcloud_events_getquery_responses.go @@ -41,6 +41,18 @@ func (o *PcloudEventsGetqueryReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 403: + result := NewPcloudEventsGetqueryForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -48,7 +60,7 @@ func (o *PcloudEventsGetqueryReader) ReadResponse(response runtime.ClientRespons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events] pcloud.events.getquery", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudEventsGetqueryOK() *PcloudEventsGetqueryOK { return &PcloudEventsGetqueryOK{} } -/* PcloudEventsGetqueryOK describes a response with status code 200, with default header values. +/* +PcloudEventsGetqueryOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudEventsGetqueryOK struct { Payload *models.Events } +// IsSuccess returns true when this pcloud events getquery o k response has a 2xx status code +func (o *PcloudEventsGetqueryOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud events getquery o k response has a 3xx status code +func (o *PcloudEventsGetqueryOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events getquery o k response has a 4xx status code +func (o *PcloudEventsGetqueryOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud events getquery o k response has a 5xx status code +func (o *PcloudEventsGetqueryOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events getquery o k response a status code equal to that given +func (o *PcloudEventsGetqueryOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud events getquery o k response +func (o *PcloudEventsGetqueryOK) Code() int { + return 200 +} + func (o *PcloudEventsGetqueryOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryOK %+v", 200, o.Payload) } + +func (o *PcloudEventsGetqueryOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryOK %+v", 200, o.Payload) +} + func (o *PcloudEventsGetqueryOK) GetPayload() *models.Events { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudEventsGetqueryBadRequest() *PcloudEventsGetqueryBadRequest { return &PcloudEventsGetqueryBadRequest{} } -/* PcloudEventsGetqueryBadRequest describes a response with status code 400, with default header values. +/* +PcloudEventsGetqueryBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudEventsGetqueryBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud events getquery bad request response has a 2xx status code +func (o *PcloudEventsGetqueryBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events getquery bad request response has a 3xx status code +func (o *PcloudEventsGetqueryBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events getquery bad request response has a 4xx status code +func (o *PcloudEventsGetqueryBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud events getquery bad request response has a 5xx status code +func (o *PcloudEventsGetqueryBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events getquery bad request response a status code equal to that given +func (o *PcloudEventsGetqueryBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud events getquery bad request response +func (o *PcloudEventsGetqueryBadRequest) Code() int { + return 400 +} + func (o *PcloudEventsGetqueryBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryBadRequest %+v", 400, o.Payload) } + +func (o *PcloudEventsGetqueryBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryBadRequest %+v", 400, o.Payload) +} + func (o *PcloudEventsGetqueryBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudEventsGetqueryUnauthorized() *PcloudEventsGetqueryUnauthorized { return &PcloudEventsGetqueryUnauthorized{} } -/* PcloudEventsGetqueryUnauthorized describes a response with status code 401, with default header values. +/* +PcloudEventsGetqueryUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudEventsGetqueryUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud events getquery unauthorized response has a 2xx status code +func (o *PcloudEventsGetqueryUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events getquery unauthorized response has a 3xx status code +func (o *PcloudEventsGetqueryUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events getquery unauthorized response has a 4xx status code +func (o *PcloudEventsGetqueryUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud events getquery unauthorized response has a 5xx status code +func (o *PcloudEventsGetqueryUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events getquery unauthorized response a status code equal to that given +func (o *PcloudEventsGetqueryUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud events getquery unauthorized response +func (o *PcloudEventsGetqueryUnauthorized) Code() int { + return 401 +} + func (o *PcloudEventsGetqueryUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudEventsGetqueryUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudEventsGetqueryUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudEventsGetqueryUnauthorized) readResponse(response runtime.ClientR return nil } +// NewPcloudEventsGetqueryForbidden creates a PcloudEventsGetqueryForbidden with default headers values +func NewPcloudEventsGetqueryForbidden() *PcloudEventsGetqueryForbidden { + return &PcloudEventsGetqueryForbidden{} +} + +/* +PcloudEventsGetqueryForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudEventsGetqueryForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud events getquery forbidden response has a 2xx status code +func (o *PcloudEventsGetqueryForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events getquery forbidden response has a 3xx status code +func (o *PcloudEventsGetqueryForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events getquery forbidden response has a 4xx status code +func (o *PcloudEventsGetqueryForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud events getquery forbidden response has a 5xx status code +func (o *PcloudEventsGetqueryForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud events getquery forbidden response a status code equal to that given +func (o *PcloudEventsGetqueryForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud events getquery forbidden response +func (o *PcloudEventsGetqueryForbidden) Code() int { + return 403 +} + +func (o *PcloudEventsGetqueryForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryForbidden %+v", 403, o.Payload) +} + +func (o *PcloudEventsGetqueryForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryForbidden %+v", 403, o.Payload) +} + +func (o *PcloudEventsGetqueryForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudEventsGetqueryForbidden) 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 +} + +// 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{} } -/* PcloudEventsGetqueryInternalServerError describes a response with status code 500, with default header values. +/* +PcloudEventsGetqueryInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudEventsGetqueryInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud events getquery internal server error response has a 2xx status code +func (o *PcloudEventsGetqueryInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud events getquery internal server error response has a 3xx status code +func (o *PcloudEventsGetqueryInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud events getquery internal server error response has a 4xx status code +func (o *PcloudEventsGetqueryInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud events getquery internal server error response has a 5xx status code +func (o *PcloudEventsGetqueryInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud events getquery internal server error response a status code equal to that given +func (o *PcloudEventsGetqueryInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud events getquery internal server error response +func (o *PcloudEventsGetqueryInternalServerError) Code() int { + return 500 +} + func (o *PcloudEventsGetqueryInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudEventsGetqueryInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/events][%d] pcloudEventsGetqueryInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudEventsGetqueryInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/p_cloud_images_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/p_cloud_images_client.go index be0badf8135..d8853ee3617 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/p_cloud_images_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/p_cloud_images_client.go @@ -60,7 +60,7 @@ type ClientService interface { } /* - PcloudCloudinstancesImagesDelete deletes an image from a cloud instance +PcloudCloudinstancesImagesDelete deletes an image from a cloud instance */ func (a *Client) PcloudCloudinstancesImagesDelete(params *PcloudCloudinstancesImagesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesDeleteOK, error) { // TODO: Validate the params before sending @@ -99,7 +99,11 @@ func (a *Client) PcloudCloudinstancesImagesDelete(params *PcloudCloudinstancesIm } /* - PcloudCloudinstancesImagesExportPost exports an image + PcloudCloudinstancesImagesExportPost exports an image + + This API is deprecated for /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export. + +>*Note*: Support for this API is available till Oct 2022. */ func (a *Client) PcloudCloudinstancesImagesExportPost(params *PcloudCloudinstancesImagesExportPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesExportPostAccepted, error) { // TODO: Validate the params before sending @@ -138,7 +142,7 @@ func (a *Client) PcloudCloudinstancesImagesExportPost(params *PcloudCloudinstanc } /* - PcloudCloudinstancesImagesGet detaileds info of an image +PcloudCloudinstancesImagesGet detaileds info of an image */ func (a *Client) PcloudCloudinstancesImagesGet(params *PcloudCloudinstancesImagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesGetOK, error) { // TODO: Validate the params before sending @@ -177,7 +181,7 @@ func (a *Client) PcloudCloudinstancesImagesGet(params *PcloudCloudinstancesImage } /* - PcloudCloudinstancesImagesGetall lists all images for this cloud instance +PcloudCloudinstancesImagesGetall lists all images for this cloud instance */ func (a *Client) PcloudCloudinstancesImagesGetall(params *PcloudCloudinstancesImagesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesGetallOK, error) { // TODO: Validate the params before sending @@ -216,7 +220,7 @@ func (a *Client) PcloudCloudinstancesImagesGetall(params *PcloudCloudinstancesIm } /* - PcloudCloudinstancesImagesPost creates a new image from available images +PcloudCloudinstancesImagesPost creates a new image from available images */ func (a *Client) PcloudCloudinstancesImagesPost(params *PcloudCloudinstancesImagesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesPostOK, *PcloudCloudinstancesImagesPostCreated, error) { // TODO: Validate the params before sending @@ -256,7 +260,7 @@ func (a *Client) PcloudCloudinstancesImagesPost(params *PcloudCloudinstancesImag } /* - PcloudCloudinstancesStockimagesGet detaileds info of an available stock image +PcloudCloudinstancesStockimagesGet detaileds info of an available stock image */ func (a *Client) PcloudCloudinstancesStockimagesGet(params *PcloudCloudinstancesStockimagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesStockimagesGetOK, error) { // TODO: Validate the params before sending @@ -295,7 +299,7 @@ func (a *Client) PcloudCloudinstancesStockimagesGet(params *PcloudCloudinstances } /* - PcloudCloudinstancesStockimagesGetall lists all available stock images +PcloudCloudinstancesStockimagesGetall lists all available stock images */ func (a *Client) PcloudCloudinstancesStockimagesGetall(params *PcloudCloudinstancesStockimagesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesStockimagesGetallOK, error) { // TODO: Validate the params before sending @@ -334,7 +338,11 @@ func (a *Client) PcloudCloudinstancesStockimagesGetall(params *PcloudCloudinstan } /* - PcloudImagesGet deprecateds for pcloud v1 cloud instances cloud instance id stock images image id detailed info of an available stock image + PcloudImagesGet detaileds info of an image in the image catalog + + This API is deprecated for /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}. + +>*Note*: Support for this API will be available till 31st March 2023. */ func (a *Client) PcloudImagesGet(params *PcloudImagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudImagesGetOK, error) { // TODO: Validate the params before sending @@ -373,7 +381,11 @@ func (a *Client) PcloudImagesGet(params *PcloudImagesGetParams, authInfo runtime } /* - PcloudImagesGetall deprecateds for pcloud v1 cloud instances cloud instance id stock images list all available stock images + PcloudImagesGetall lists all the images in the image catalog + + This API is deprecated for /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images. + +>*Note*: Support for this API will be available till 31st March 2023. */ func (a *Client) PcloudImagesGetall(params *PcloudImagesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudImagesGetallOK, error) { // TODO: Validate the params before sending @@ -412,7 +424,7 @@ func (a *Client) PcloudImagesGetall(params *PcloudImagesGetallParams, authInfo r } /* - PcloudV1CloudinstancesCosimagesGet gets detail of last cos image import job +PcloudV1CloudinstancesCosimagesGet gets detail of last cos image import job */ func (a *Client) PcloudV1CloudinstancesCosimagesGet(params *PcloudV1CloudinstancesCosimagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV1CloudinstancesCosimagesGetOK, error) { // TODO: Validate the params before sending @@ -451,7 +463,7 @@ func (a *Client) PcloudV1CloudinstancesCosimagesGet(params *PcloudV1Cloudinstanc } /* - PcloudV1CloudinstancesCosimagesPost creates an cos image import job +PcloudV1CloudinstancesCosimagesPost creates an cos image import job */ func (a *Client) PcloudV1CloudinstancesCosimagesPost(params *PcloudV1CloudinstancesCosimagesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV1CloudinstancesCosimagesPostAccepted, error) { // TODO: Validate the params before sending @@ -490,7 +502,7 @@ func (a *Client) PcloudV1CloudinstancesCosimagesPost(params *PcloudV1Cloudinstan } /* - PcloudV2ImagesExportGet gets detail of last image export job +PcloudV2ImagesExportGet gets detail of last image export job */ func (a *Client) PcloudV2ImagesExportGet(params *PcloudV2ImagesExportGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2ImagesExportGetOK, error) { // TODO: Validate the params before sending @@ -529,7 +541,7 @@ func (a *Client) PcloudV2ImagesExportGet(params *PcloudV2ImagesExportGetParams, } /* - PcloudV2ImagesExportPost adds image export job to the jobs queue +PcloudV2ImagesExportPost adds image export job to the jobs queue */ func (a *Client) PcloudV2ImagesExportPost(params *PcloudV2ImagesExportPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2ImagesExportPostAccepted, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_parameters.go index 36c1a384ab1..385049943ac 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesImagesDeleteParamsWithHTTPClient(client *http.Client } } -/* PcloudCloudinstancesImagesDeleteParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances images delete operation. +/* +PcloudCloudinstancesImagesDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances images delete operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesImagesDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go index 2771980097f..5c288720849 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go @@ -41,6 +41,18 @@ func (o *PcloudCloudinstancesImagesDeleteReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesImagesDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudCloudinstancesImagesDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewPcloudCloudinstancesImagesDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +66,7 @@ func (o *PcloudCloudinstancesImagesDeleteReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}] pcloud.cloudinstances.images.delete", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudCloudinstancesImagesDeleteOK() *PcloudCloudinstancesImagesDeleteOK return &PcloudCloudinstancesImagesDeleteOK{} } -/* PcloudCloudinstancesImagesDeleteOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesImagesDeleteOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudCloudinstancesImagesDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudinstances images delete o k response has a 2xx status code +func (o *PcloudCloudinstancesImagesDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances images delete o k response has a 3xx status code +func (o *PcloudCloudinstancesImagesDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images delete o k response has a 4xx status code +func (o *PcloudCloudinstancesImagesDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images delete o k response has a 5xx status code +func (o *PcloudCloudinstancesImagesDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images delete o k response a status code equal to that given +func (o *PcloudCloudinstancesImagesDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances images delete o k response +func (o *PcloudCloudinstancesImagesDeleteOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesImagesDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesImagesDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesImagesDeleteOK) GetPayload() models.Object { return o.Payload } @@ -93,7 +141,8 @@ func NewPcloudCloudinstancesImagesDeleteBadRequest() *PcloudCloudinstancesImages return &PcloudCloudinstancesImagesDeleteBadRequest{} } -/* PcloudCloudinstancesImagesDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesImagesDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +150,44 @@ type PcloudCloudinstancesImagesDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images delete bad request response has a 2xx status code +func (o *PcloudCloudinstancesImagesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images delete bad request response has a 3xx status code +func (o *PcloudCloudinstancesImagesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images delete bad request response has a 4xx status code +func (o *PcloudCloudinstancesImagesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images delete bad request response has a 5xx status code +func (o *PcloudCloudinstancesImagesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images delete bad request response a status code equal to that given +func (o *PcloudCloudinstancesImagesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances images delete bad request response +func (o *PcloudCloudinstancesImagesDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesImagesDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesImagesDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesImagesDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -125,7 +209,8 @@ func NewPcloudCloudinstancesImagesDeleteUnauthorized() *PcloudCloudinstancesImag return &PcloudCloudinstancesImagesDeleteUnauthorized{} } -/* PcloudCloudinstancesImagesDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesImagesDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -133,9 +218,44 @@ type PcloudCloudinstancesImagesDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images delete unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images delete unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images delete unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images delete unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images delete unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances images delete unauthorized response +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesImagesDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesImagesDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesImagesDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -152,12 +272,149 @@ func (o *PcloudCloudinstancesImagesDeleteUnauthorized) readResponse(response run return nil } +// NewPcloudCloudinstancesImagesDeleteForbidden creates a PcloudCloudinstancesImagesDeleteForbidden with default headers values +func NewPcloudCloudinstancesImagesDeleteForbidden() *PcloudCloudinstancesImagesDeleteForbidden { + return &PcloudCloudinstancesImagesDeleteForbidden{} +} + +/* +PcloudCloudinstancesImagesDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesImagesDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances images delete forbidden response has a 2xx status code +func (o *PcloudCloudinstancesImagesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images delete forbidden response has a 3xx status code +func (o *PcloudCloudinstancesImagesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images delete forbidden response has a 4xx status code +func (o *PcloudCloudinstancesImagesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images delete forbidden response has a 5xx status code +func (o *PcloudCloudinstancesImagesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images delete forbidden response a status code equal to that given +func (o *PcloudCloudinstancesImagesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances images delete forbidden response +func (o *PcloudCloudinstancesImagesDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesImagesDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesImagesDeleteForbidden) 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 +} + +// NewPcloudCloudinstancesImagesDeleteNotFound creates a PcloudCloudinstancesImagesDeleteNotFound with default headers values +func NewPcloudCloudinstancesImagesDeleteNotFound() *PcloudCloudinstancesImagesDeleteNotFound { + return &PcloudCloudinstancesImagesDeleteNotFound{} +} + +/* +PcloudCloudinstancesImagesDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesImagesDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances images delete not found response has a 2xx status code +func (o *PcloudCloudinstancesImagesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images delete not found response has a 3xx status code +func (o *PcloudCloudinstancesImagesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images delete not found response has a 4xx status code +func (o *PcloudCloudinstancesImagesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images delete not found response has a 5xx status code +func (o *PcloudCloudinstancesImagesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images delete not found response a status code equal to that given +func (o *PcloudCloudinstancesImagesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances images delete not found response +func (o *PcloudCloudinstancesImagesDeleteNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesImagesDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesImagesDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesImagesDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesImagesDeleteNotFound) 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 +} + // NewPcloudCloudinstancesImagesDeleteGone creates a PcloudCloudinstancesImagesDeleteGone with default headers values func NewPcloudCloudinstancesImagesDeleteGone() *PcloudCloudinstancesImagesDeleteGone { return &PcloudCloudinstancesImagesDeleteGone{} } -/* PcloudCloudinstancesImagesDeleteGone describes a response with status code 410, with default header values. +/* +PcloudCloudinstancesImagesDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -165,9 +422,44 @@ type PcloudCloudinstancesImagesDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images delete gone response has a 2xx status code +func (o *PcloudCloudinstancesImagesDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images delete gone response has a 3xx status code +func (o *PcloudCloudinstancesImagesDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images delete gone response has a 4xx status code +func (o *PcloudCloudinstancesImagesDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images delete gone response has a 5xx status code +func (o *PcloudCloudinstancesImagesDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images delete gone response a status code equal to that given +func (o *PcloudCloudinstancesImagesDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud cloudinstances images delete gone response +func (o *PcloudCloudinstancesImagesDeleteGone) Code() int { + return 410 +} + func (o *PcloudCloudinstancesImagesDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudCloudinstancesImagesDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudCloudinstancesImagesDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -189,7 +481,8 @@ func NewPcloudCloudinstancesImagesDeleteInternalServerError() *PcloudCloudinstan return &PcloudCloudinstancesImagesDeleteInternalServerError{} } -/* PcloudCloudinstancesImagesDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesImagesDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +490,44 @@ type PcloudCloudinstancesImagesDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images delete internal server error response has a 2xx status code +func (o *PcloudCloudinstancesImagesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images delete internal server error response has a 3xx status code +func (o *PcloudCloudinstancesImagesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images delete internal server error response has a 4xx status code +func (o *PcloudCloudinstancesImagesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images delete internal server error response has a 5xx status code +func (o *PcloudCloudinstancesImagesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances images delete internal server error response a status code equal to that given +func (o *PcloudCloudinstancesImagesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances images delete internal server error response +func (o *PcloudCloudinstancesImagesDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesImagesDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesImagesDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesImagesDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_parameters.go index ec3a6247a8c..fa5916de7b5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudinstancesImagesExportPostParamsWithHTTPClient(client *http.Cl } } -/* PcloudCloudinstancesImagesExportPostParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances images export post operation. +/* +PcloudCloudinstancesImagesExportPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances images export post operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesImagesExportPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go index 0b0a6a0b005..8505c878c75 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesImagesExportPostReader) ReadResponse(response runti return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesImagesExportPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesImagesExportPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudCloudinstancesImagesExportPostReader) ReadResponse(response runti } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export] pcloud.cloudinstances.images.export.post", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudCloudinstancesImagesExportPostAccepted() *PcloudCloudinstancesImag return &PcloudCloudinstancesImagesExportPostAccepted{} } -/* PcloudCloudinstancesImagesExportPostAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudinstancesImagesExportPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +84,44 @@ type PcloudCloudinstancesImagesExportPostAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudinstances images export post accepted response has a 2xx status code +func (o *PcloudCloudinstancesImagesExportPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances images export post accepted response has a 3xx status code +func (o *PcloudCloudinstancesImagesExportPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images export post accepted response has a 4xx status code +func (o *PcloudCloudinstancesImagesExportPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images export post accepted response has a 5xx status code +func (o *PcloudCloudinstancesImagesExportPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images export post accepted response a status code equal to that given +func (o *PcloudCloudinstancesImagesExportPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudinstances images export post accepted response +func (o *PcloudCloudinstancesImagesExportPostAccepted) Code() int { + return 202 +} + func (o *PcloudCloudinstancesImagesExportPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudinstancesImagesExportPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudinstancesImagesExportPostAccepted) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudCloudinstancesImagesExportPostBadRequest() *PcloudCloudinstancesIm return &PcloudCloudinstancesImagesExportPostBadRequest{} } -/* PcloudCloudinstancesImagesExportPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesImagesExportPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudCloudinstancesImagesExportPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images export post bad request response has a 2xx status code +func (o *PcloudCloudinstancesImagesExportPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images export post bad request response has a 3xx status code +func (o *PcloudCloudinstancesImagesExportPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images export post bad request response has a 4xx status code +func (o *PcloudCloudinstancesImagesExportPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images export post bad request response has a 5xx status code +func (o *PcloudCloudinstancesImagesExportPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images export post bad request response a status code equal to that given +func (o *PcloudCloudinstancesImagesExportPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances images export post bad request response +func (o *PcloudCloudinstancesImagesExportPostBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesImagesExportPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesImagesExportPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesImagesExportPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudCloudinstancesImagesExportPostUnauthorized() *PcloudCloudinstances return &PcloudCloudinstancesImagesExportPostUnauthorized{} } -/* PcloudCloudinstancesImagesExportPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesImagesExportPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudCloudinstancesImagesExportPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images export post unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images export post unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images export post unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images export post unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images export post unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances images export post unauthorized response +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesImagesExportPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesImagesExportPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesImagesExportPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ func (o *PcloudCloudinstancesImagesExportPostUnauthorized) readResponse(response return nil } +// NewPcloudCloudinstancesImagesExportPostForbidden creates a PcloudCloudinstancesImagesExportPostForbidden with default headers values +func NewPcloudCloudinstancesImagesExportPostForbidden() *PcloudCloudinstancesImagesExportPostForbidden { + return &PcloudCloudinstancesImagesExportPostForbidden{} +} + +/* +PcloudCloudinstancesImagesExportPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesImagesExportPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances images export post forbidden response has a 2xx status code +func (o *PcloudCloudinstancesImagesExportPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images export post forbidden response has a 3xx status code +func (o *PcloudCloudinstancesImagesExportPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images export post forbidden response has a 4xx status code +func (o *PcloudCloudinstancesImagesExportPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images export post forbidden response has a 5xx status code +func (o *PcloudCloudinstancesImagesExportPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images export post forbidden response a status code equal to that given +func (o *PcloudCloudinstancesImagesExportPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances images export post forbidden response +func (o *PcloudCloudinstancesImagesExportPostForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesImagesExportPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesExportPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesExportPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesImagesExportPostForbidden) 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 +} + // NewPcloudCloudinstancesImagesExportPostNotFound creates a PcloudCloudinstancesImagesExportPostNotFound with default headers values func NewPcloudCloudinstancesImagesExportPostNotFound() *PcloudCloudinstancesImagesExportPostNotFound { return &PcloudCloudinstancesImagesExportPostNotFound{} } -/* PcloudCloudinstancesImagesExportPostNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesImagesExportPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudCloudinstancesImagesExportPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images export post not found response has a 2xx status code +func (o *PcloudCloudinstancesImagesExportPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images export post not found response has a 3xx status code +func (o *PcloudCloudinstancesImagesExportPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images export post not found response has a 4xx status code +func (o *PcloudCloudinstancesImagesExportPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images export post not found response has a 5xx status code +func (o *PcloudCloudinstancesImagesExportPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images export post not found response a status code equal to that given +func (o *PcloudCloudinstancesImagesExportPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances images export post not found response +func (o *PcloudCloudinstancesImagesExportPostNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesImagesExportPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesImagesExportPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesImagesExportPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudCloudinstancesImagesExportPostUnprocessableEntity() *PcloudCloudin return &PcloudCloudinstancesImagesExportPostUnprocessableEntity{} } -/* PcloudCloudinstancesImagesExportPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudCloudinstancesImagesExportPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -203,9 +422,44 @@ type PcloudCloudinstancesImagesExportPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images export post unprocessable entity response has a 2xx status code +func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images export post unprocessable entity response has a 3xx status code +func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images export post unprocessable entity response has a 4xx status code +func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images export post unprocessable entity response has a 5xx status code +func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images export post unprocessable entity response a status code equal to that given +func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudinstances images export post unprocessable entity response +func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudCloudinstancesImagesExportPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudCloudinstancesImagesExportPostInternalServerError() *PcloudCloudin return &PcloudCloudinstancesImagesExportPostInternalServerError{} } -/* PcloudCloudinstancesImagesExportPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesImagesExportPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudCloudinstancesImagesExportPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images export post internal server error response has a 2xx status code +func (o *PcloudCloudinstancesImagesExportPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images export post internal server error response has a 3xx status code +func (o *PcloudCloudinstancesImagesExportPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images export post internal server error response has a 4xx status code +func (o *PcloudCloudinstancesImagesExportPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images export post internal server error response has a 5xx status code +func (o *PcloudCloudinstancesImagesExportPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances images export post internal server error response a status code equal to that given +func (o *PcloudCloudinstancesImagesExportPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances images export post internal server error response +func (o *PcloudCloudinstancesImagesExportPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesImagesExportPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesImagesExportPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudCloudinstancesImagesExportPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesImagesExportPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_parameters.go index decd92c083d..f1f52276bd0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesImagesGetParamsWithHTTPClient(client *http.Client) * } } -/* PcloudCloudinstancesImagesGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances images get operation. +/* +PcloudCloudinstancesImagesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances images get operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesImagesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go index d4b52ee6e60..d652ae89d56 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesImagesGetReader) ReadResponse(response runtime.Clie return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesImagesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesImagesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesImagesGetReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}] pcloud.cloudinstances.images.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesImagesGetOK() *PcloudCloudinstancesImagesGetOK { return &PcloudCloudinstancesImagesGetOK{} } -/* PcloudCloudinstancesImagesGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesImagesGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesImagesGetOK struct { Payload *models.Image } +// IsSuccess returns true when this pcloud cloudinstances images get o k response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances images get o k response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images get o k response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images get o k response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images get o k response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances images get o k response +func (o *PcloudCloudinstancesImagesGetOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesImagesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetOK) GetPayload() *models.Image { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesImagesGetBadRequest() *PcloudCloudinstancesImagesGet return &PcloudCloudinstancesImagesGetBadRequest{} } -/* PcloudCloudinstancesImagesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesImagesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesImagesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images get bad request response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images get bad request response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images get bad request response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images get bad request response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images get bad request response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances images get bad request response +func (o *PcloudCloudinstancesImagesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesImagesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesImagesGetUnauthorized() *PcloudCloudinstancesImagesG return &PcloudCloudinstancesImagesGetUnauthorized{} } -/* PcloudCloudinstancesImagesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesImagesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesImagesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images get unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images get unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images get unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images get unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images get unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances images get unauthorized response +func (o *PcloudCloudinstancesImagesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesImagesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudCloudinstancesImagesGetUnauthorized) readResponse(response runtim return nil } +// NewPcloudCloudinstancesImagesGetForbidden creates a PcloudCloudinstancesImagesGetForbidden with default headers values +func NewPcloudCloudinstancesImagesGetForbidden() *PcloudCloudinstancesImagesGetForbidden { + return &PcloudCloudinstancesImagesGetForbidden{} +} + +/* +PcloudCloudinstancesImagesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesImagesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances images get forbidden response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images get forbidden response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images get forbidden response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images get forbidden response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images get forbidden response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances images get forbidden response +func (o *PcloudCloudinstancesImagesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesImagesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesImagesGetForbidden) 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 +} + // NewPcloudCloudinstancesImagesGetNotFound creates a PcloudCloudinstancesImagesGetNotFound with default headers values func NewPcloudCloudinstancesImagesGetNotFound() *PcloudCloudinstancesImagesGetNotFound { return &PcloudCloudinstancesImagesGetNotFound{} } -/* PcloudCloudinstancesImagesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesImagesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesImagesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images get not found response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images get not found response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images get not found response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images get not found response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images get not found response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances images get not found response +func (o *PcloudCloudinstancesImagesGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesImagesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesImagesGetInternalServerError() *PcloudCloudinstances return &PcloudCloudinstancesImagesGetInternalServerError{} } -/* PcloudCloudinstancesImagesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesImagesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesImagesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images get internal server error response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images get internal server error response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images get internal server error response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images get internal server error response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances images get internal server error response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances images get internal server error response +func (o *PcloudCloudinstancesImagesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesImagesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images/{image_id}][%d] pcloudCloudinstancesImagesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_parameters.go index a0acea17e18..267edf75930 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesImagesGetallParamsWithHTTPClient(client *http.Client } } -/* PcloudCloudinstancesImagesGetallParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances images getall operation. +/* +PcloudCloudinstancesImagesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances images getall operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesImagesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go index a06568fe256..0cfce0496f1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesImagesGetallReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesImagesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesImagesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesImagesGetallReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images] pcloud.cloudinstances.images.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesImagesGetallOK() *PcloudCloudinstancesImagesGetallOK return &PcloudCloudinstancesImagesGetallOK{} } -/* PcloudCloudinstancesImagesGetallOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesImagesGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesImagesGetallOK struct { Payload *models.Images } +// IsSuccess returns true when this pcloud cloudinstances images getall o k response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances images getall o k response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images getall o k response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images getall o k response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images getall o k response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances images getall o k response +func (o *PcloudCloudinstancesImagesGetallOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesImagesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetallOK) GetPayload() *models.Images { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesImagesGetallBadRequest() *PcloudCloudinstancesImages return &PcloudCloudinstancesImagesGetallBadRequest{} } -/* PcloudCloudinstancesImagesGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesImagesGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesImagesGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images getall bad request response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images getall bad request response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images getall bad request response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images getall bad request response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images getall bad request response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances images getall bad request response +func (o *PcloudCloudinstancesImagesGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesImagesGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesImagesGetallUnauthorized() *PcloudCloudinstancesImag return &PcloudCloudinstancesImagesGetallUnauthorized{} } -/* PcloudCloudinstancesImagesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesImagesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesImagesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images getall unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images getall unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images getall unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images getall unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images getall unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances images getall unauthorized response +func (o *PcloudCloudinstancesImagesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesImagesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudCloudinstancesImagesGetallUnauthorized) readResponse(response run return nil } +// NewPcloudCloudinstancesImagesGetallForbidden creates a PcloudCloudinstancesImagesGetallForbidden with default headers values +func NewPcloudCloudinstancesImagesGetallForbidden() *PcloudCloudinstancesImagesGetallForbidden { + return &PcloudCloudinstancesImagesGetallForbidden{} +} + +/* +PcloudCloudinstancesImagesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesImagesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances images getall forbidden response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images getall forbidden response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images getall forbidden response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images getall forbidden response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images getall forbidden response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances images getall forbidden response +func (o *PcloudCloudinstancesImagesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesImagesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesImagesGetallForbidden) 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 +} + // NewPcloudCloudinstancesImagesGetallNotFound creates a PcloudCloudinstancesImagesGetallNotFound with default headers values func NewPcloudCloudinstancesImagesGetallNotFound() *PcloudCloudinstancesImagesGetallNotFound { return &PcloudCloudinstancesImagesGetallNotFound{} } -/* PcloudCloudinstancesImagesGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesImagesGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesImagesGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images getall not found response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images getall not found response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images getall not found response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images getall not found response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images getall not found response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances images getall not found response +func (o *PcloudCloudinstancesImagesGetallNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesImagesGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesImagesGetallInternalServerError() *PcloudCloudinstan return &PcloudCloudinstancesImagesGetallInternalServerError{} } -/* PcloudCloudinstancesImagesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesImagesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesImagesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images getall internal server error response has a 2xx status code +func (o *PcloudCloudinstancesImagesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images getall internal server error response has a 3xx status code +func (o *PcloudCloudinstancesImagesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images getall internal server error response has a 4xx status code +func (o *PcloudCloudinstancesImagesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images getall internal server error response has a 5xx status code +func (o *PcloudCloudinstancesImagesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances images getall internal server error response a status code equal to that given +func (o *PcloudCloudinstancesImagesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances images getall internal server error response +func (o *PcloudCloudinstancesImagesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesImagesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesImagesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesImagesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_parameters.go index cd22b7b195b..48b37be0ee6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudinstancesImagesPostParamsWithHTTPClient(client *http.Client) } } -/* PcloudCloudinstancesImagesPostParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances images post operation. +/* +PcloudCloudinstancesImagesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances images post operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesImagesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go index 570d84672c7..1dfd822e8e4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go @@ -47,6 +47,18 @@ func (o *PcloudCloudinstancesImagesPostReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesImagesPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -66,7 +78,7 @@ func (o *PcloudCloudinstancesImagesPostReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images] pcloud.cloudinstances.images.post", response, response.Code()) } } @@ -75,7 +87,8 @@ func NewPcloudCloudinstancesImagesPostOK() *PcloudCloudinstancesImagesPostOK { return &PcloudCloudinstancesImagesPostOK{} } -/* PcloudCloudinstancesImagesPostOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesImagesPostOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +96,44 @@ type PcloudCloudinstancesImagesPostOK struct { Payload *models.Image } +// IsSuccess returns true when this pcloud cloudinstances images post o k response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances images post o k response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post o k response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images post o k response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images post o k response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances images post o k response +func (o *PcloudCloudinstancesImagesPostOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesImagesPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesImagesPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesImagesPostOK) GetPayload() *models.Image { return o.Payload } @@ -107,7 +155,8 @@ func NewPcloudCloudinstancesImagesPostCreated() *PcloudCloudinstancesImagesPostC return &PcloudCloudinstancesImagesPostCreated{} } -/* PcloudCloudinstancesImagesPostCreated describes a response with status code 201, with default header values. +/* +PcloudCloudinstancesImagesPostCreated describes a response with status code 201, with default header values. Created */ @@ -115,9 +164,44 @@ type PcloudCloudinstancesImagesPostCreated struct { Payload *models.Image } +// IsSuccess returns true when this pcloud cloudinstances images post created response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances images post created response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post created response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images post created response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images post created response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud cloudinstances images post created response +func (o *PcloudCloudinstancesImagesPostCreated) Code() int { + return 201 +} + func (o *PcloudCloudinstancesImagesPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostCreated %+v", 201, o.Payload) } + +func (o *PcloudCloudinstancesImagesPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostCreated %+v", 201, o.Payload) +} + func (o *PcloudCloudinstancesImagesPostCreated) GetPayload() *models.Image { return o.Payload } @@ -139,7 +223,8 @@ func NewPcloudCloudinstancesImagesPostBadRequest() *PcloudCloudinstancesImagesPo return &PcloudCloudinstancesImagesPostBadRequest{} } -/* PcloudCloudinstancesImagesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesImagesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -147,9 +232,44 @@ type PcloudCloudinstancesImagesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images post bad request response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images post bad request response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post bad request response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images post bad request response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images post bad request response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances images post bad request response +func (o *PcloudCloudinstancesImagesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesImagesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesImagesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesImagesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -171,7 +291,8 @@ func NewPcloudCloudinstancesImagesPostUnauthorized() *PcloudCloudinstancesImages return &PcloudCloudinstancesImagesPostUnauthorized{} } -/* PcloudCloudinstancesImagesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesImagesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -179,9 +300,44 @@ type PcloudCloudinstancesImagesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images post unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images post unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images post unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images post unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances images post unauthorized response +func (o *PcloudCloudinstancesImagesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesImagesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesImagesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesImagesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -198,12 +354,149 @@ func (o *PcloudCloudinstancesImagesPostUnauthorized) readResponse(response runti return nil } +// NewPcloudCloudinstancesImagesPostForbidden creates a PcloudCloudinstancesImagesPostForbidden with default headers values +func NewPcloudCloudinstancesImagesPostForbidden() *PcloudCloudinstancesImagesPostForbidden { + return &PcloudCloudinstancesImagesPostForbidden{} +} + +/* +PcloudCloudinstancesImagesPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesImagesPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances images post forbidden response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images post forbidden response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post forbidden response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images post forbidden response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images post forbidden response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances images post forbidden response +func (o *PcloudCloudinstancesImagesPostForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesImagesPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesImagesPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesImagesPostForbidden) 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 +} + +// 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{} } -/* PcloudCloudinstancesImagesPostConflict describes a response with status code 409, with default header values. +/* +PcloudCloudinstancesImagesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +504,44 @@ type PcloudCloudinstancesImagesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images post conflict response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images post conflict response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post conflict response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images post conflict response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images post conflict response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud cloudinstances images post conflict response +func (o *PcloudCloudinstancesImagesPostConflict) Code() int { + return 409 +} + func (o *PcloudCloudinstancesImagesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudCloudinstancesImagesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudCloudinstancesImagesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +563,8 @@ func NewPcloudCloudinstancesImagesPostUnprocessableEntity() *PcloudCloudinstance return &PcloudCloudinstancesImagesPostUnprocessableEntity{} } -/* PcloudCloudinstancesImagesPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudCloudinstancesImagesPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +572,44 @@ type PcloudCloudinstancesImagesPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images post unprocessable entity response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images post unprocessable entity response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post unprocessable entity response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances images post unprocessable entity response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances images post unprocessable entity response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudinstances images post unprocessable entity response +func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudCloudinstancesImagesPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +631,8 @@ func NewPcloudCloudinstancesImagesPostInternalServerError() *PcloudCloudinstance return &PcloudCloudinstancesImagesPostInternalServerError{} } -/* PcloudCloudinstancesImagesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesImagesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +640,44 @@ type PcloudCloudinstancesImagesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances images post internal server error response has a 2xx status code +func (o *PcloudCloudinstancesImagesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances images post internal server error response has a 3xx status code +func (o *PcloudCloudinstancesImagesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances images post internal server error response has a 4xx status code +func (o *PcloudCloudinstancesImagesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances images post internal server error response has a 5xx status code +func (o *PcloudCloudinstancesImagesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances images post internal server error response a status code equal to that given +func (o *PcloudCloudinstancesImagesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances images post internal server error response +func (o *PcloudCloudinstancesImagesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesImagesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesImagesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/images][%d] pcloudCloudinstancesImagesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesImagesPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_parameters.go index 071d73d8024..b70b19f55eb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesStockimagesGetParamsWithHTTPClient(client *http.Clie } } -/* PcloudCloudinstancesStockimagesGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances stockimages get operation. +/* +PcloudCloudinstancesStockimagesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances stockimages get operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesStockimagesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go index 2073da1cac2..0758f724f71 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesStockimagesGetReader) ReadResponse(response runtime } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}] pcloud.cloudinstances.stockimages.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesStockimagesGetOK() *PcloudCloudinstancesStockimagesG return &PcloudCloudinstancesStockimagesGetOK{} } -/* PcloudCloudinstancesStockimagesGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesStockimagesGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesStockimagesGetOK struct { Payload *models.Image } +// IsSuccess returns true when this pcloud cloudinstances stockimages get o k response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages get o k response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages get o k response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances stockimages get o k response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages get o k response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances stockimages get o k response +func (o *PcloudCloudinstancesStockimagesGetOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesStockimagesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetOK) GetPayload() *models.Image { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesStockimagesGetBadRequest() *PcloudCloudinstancesStoc return &PcloudCloudinstancesStockimagesGetBadRequest{} } -/* PcloudCloudinstancesStockimagesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesStockimagesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesStockimagesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances stockimages get bad request response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages get bad request response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages get bad request response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances stockimages get bad request response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages get bad request response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances stockimages get bad request response +func (o *PcloudCloudinstancesStockimagesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesStockimagesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesStockimagesGetUnauthorized() *PcloudCloudinstancesSt return &PcloudCloudinstancesStockimagesGetUnauthorized{} } -/* PcloudCloudinstancesStockimagesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesStockimagesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesStockimagesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances stockimages get unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages get unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages get unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances stockimages get unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages get unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances stockimages get unauthorized response +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesStockimagesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ 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{} } -/* PcloudCloudinstancesStockimagesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesStockimagesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesStockimagesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances stockimages get not found response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages get not found response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages get not found response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances stockimages get not found response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages get not found response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances stockimages get not found response +func (o *PcloudCloudinstancesStockimagesGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesStockimagesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesStockimagesGetInternalServerError() *PcloudCloudinst return &PcloudCloudinstancesStockimagesGetInternalServerError{} } -/* PcloudCloudinstancesStockimagesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesStockimagesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesStockimagesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances stockimages get internal server error response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages get internal server error response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages get internal server error response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances stockimages get internal server error response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances stockimages get internal server error response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances stockimages get internal server error response +func (o *PcloudCloudinstancesStockimagesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesStockimagesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images/{image_id}][%d] pcloudCloudinstancesStockimagesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go index cec512f7bd6..8cc0390558d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go @@ -53,10 +53,12 @@ func NewPcloudCloudinstancesStockimagesGetallParamsWithHTTPClient(client *http.C } } -/* PcloudCloudinstancesStockimagesGetallParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances stockimages getall operation. +/* +PcloudCloudinstancesStockimagesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances stockimages getall operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesStockimagesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go index b30c83880b7..f758bd3a5fe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesStockimagesGetallReader) ReadResponse(response runt } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images] pcloud.cloudinstances.stockimages.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesStockimagesGetallOK() *PcloudCloudinstancesStockimag return &PcloudCloudinstancesStockimagesGetallOK{} } -/* PcloudCloudinstancesStockimagesGetallOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesStockimagesGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesStockimagesGetallOK struct { Payload *models.Images } +// IsSuccess returns true when this pcloud cloudinstances stockimages getall o k response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages getall o k response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages getall o k response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances stockimages getall o k response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages getall o k response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances stockimages getall o k response +func (o *PcloudCloudinstancesStockimagesGetallOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesStockimagesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetallOK) GetPayload() *models.Images { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesStockimagesGetallBadRequest() *PcloudCloudinstancesS return &PcloudCloudinstancesStockimagesGetallBadRequest{} } -/* PcloudCloudinstancesStockimagesGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesStockimagesGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesStockimagesGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances stockimages getall bad request response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages getall bad request response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages getall bad request response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances stockimages getall bad request response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages getall bad request response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances stockimages getall bad request response +func (o *PcloudCloudinstancesStockimagesGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesStockimagesGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesStockimagesGetallUnauthorized() *PcloudCloudinstance return &PcloudCloudinstancesStockimagesGetallUnauthorized{} } -/* PcloudCloudinstancesStockimagesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesStockimagesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesStockimagesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances stockimages getall unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages getall unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages getall unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances stockimages getall unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages getall unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances stockimages getall unauthorized response +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ 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{} } -/* PcloudCloudinstancesStockimagesGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesStockimagesGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesStockimagesGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances stockimages getall not found response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages getall not found response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages getall not found response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances stockimages getall not found response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances stockimages getall not found response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances stockimages getall not found response +func (o *PcloudCloudinstancesStockimagesGetallNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesStockimagesGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesStockimagesGetallInternalServerError() *PcloudCloudi return &PcloudCloudinstancesStockimagesGetallInternalServerError{} } -/* PcloudCloudinstancesStockimagesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesStockimagesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesStockimagesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances stockimages getall internal server error response has a 2xx status code +func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances stockimages getall internal server error response has a 3xx status code +func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances stockimages getall internal server error response has a 4xx status code +func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances stockimages getall internal server error response has a 5xx status code +func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances stockimages getall internal server error response a status code equal to that given +func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances stockimages getall internal server error response +func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/stock-images][%d] pcloudCloudinstancesStockimagesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesStockimagesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_parameters.go index 91192f6fdcc..ce58fbc1428 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudImagesGetParamsWithHTTPClient(client *http.Client) *PcloudImagesGe } } -/* PcloudImagesGetParams contains all the parameters to send to the API endpoint - for the pcloud images get operation. +/* +PcloudImagesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud images get operation. + + Typically these are written to a http.Request. */ type PcloudImagesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go index 040e27c3fe4..3a2168754ca 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudImagesGetReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return nil, result + case 403: + result := NewPcloudImagesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudImagesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudImagesGetReader) ReadResponse(response runtime.ClientResponse, co } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/images/{image_id}] pcloud.images.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudImagesGetOK() *PcloudImagesGetOK { return &PcloudImagesGetOK{} } -/* PcloudImagesGetOK describes a response with status code 200, with default header values. +/* +PcloudImagesGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudImagesGetOK struct { Payload *models.Image } +// IsSuccess returns true when this pcloud images get o k response has a 2xx status code +func (o *PcloudImagesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud images get o k response has a 3xx status code +func (o *PcloudImagesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images get o k response has a 4xx status code +func (o *PcloudImagesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud images get o k response has a 5xx status code +func (o *PcloudImagesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images get o k response a status code equal to that given +func (o *PcloudImagesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud images get o k response +func (o *PcloudImagesGetOK) Code() int { + return 200 +} + func (o *PcloudImagesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetOK %+v", 200, o.Payload) } + +func (o *PcloudImagesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetOK %+v", 200, o.Payload) +} + func (o *PcloudImagesGetOK) GetPayload() *models.Image { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudImagesGetBadRequest() *PcloudImagesGetBadRequest { return &PcloudImagesGetBadRequest{} } -/* PcloudImagesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudImagesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudImagesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud images get bad request response has a 2xx status code +func (o *PcloudImagesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images get bad request response has a 3xx status code +func (o *PcloudImagesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images get bad request response has a 4xx status code +func (o *PcloudImagesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud images get bad request response has a 5xx status code +func (o *PcloudImagesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images get bad request response a status code equal to that given +func (o *PcloudImagesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud images get bad request response +func (o *PcloudImagesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudImagesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudImagesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudImagesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudImagesGetUnauthorized() *PcloudImagesGetUnauthorized { return &PcloudImagesGetUnauthorized{} } -/* PcloudImagesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudImagesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudImagesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud images get unauthorized response has a 2xx status code +func (o *PcloudImagesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images get unauthorized response has a 3xx status code +func (o *PcloudImagesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images get unauthorized response has a 4xx status code +func (o *PcloudImagesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud images get unauthorized response has a 5xx status code +func (o *PcloudImagesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images get unauthorized response a status code equal to that given +func (o *PcloudImagesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud images get unauthorized response +func (o *PcloudImagesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudImagesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudImagesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudImagesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudImagesGetUnauthorized) readResponse(response runtime.ClientRespon return nil } +// NewPcloudImagesGetForbidden creates a PcloudImagesGetForbidden with default headers values +func NewPcloudImagesGetForbidden() *PcloudImagesGetForbidden { + return &PcloudImagesGetForbidden{} +} + +/* +PcloudImagesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudImagesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud images get forbidden response has a 2xx status code +func (o *PcloudImagesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images get forbidden response has a 3xx status code +func (o *PcloudImagesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images get forbidden response has a 4xx status code +func (o *PcloudImagesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud images get forbidden response has a 5xx status code +func (o *PcloudImagesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images get forbidden response a status code equal to that given +func (o *PcloudImagesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud images get forbidden response +func (o *PcloudImagesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudImagesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudImagesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudImagesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudImagesGetForbidden) 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 +} + // NewPcloudImagesGetNotFound creates a PcloudImagesGetNotFound with default headers values func NewPcloudImagesGetNotFound() *PcloudImagesGetNotFound { return &PcloudImagesGetNotFound{} } -/* PcloudImagesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudImagesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudImagesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud images get not found response has a 2xx status code +func (o *PcloudImagesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images get not found response has a 3xx status code +func (o *PcloudImagesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images get not found response has a 4xx status code +func (o *PcloudImagesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud images get not found response has a 5xx status code +func (o *PcloudImagesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images get not found response a status code equal to that given +func (o *PcloudImagesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud images get not found response +func (o *PcloudImagesGetNotFound) Code() int { + return 404 +} + func (o *PcloudImagesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudImagesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudImagesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudImagesGetInternalServerError() *PcloudImagesGetInternalServerError return &PcloudImagesGetInternalServerError{} } -/* PcloudImagesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudImagesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudImagesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud images get internal server error response has a 2xx status code +func (o *PcloudImagesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images get internal server error response has a 3xx status code +func (o *PcloudImagesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images get internal server error response has a 4xx status code +func (o *PcloudImagesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud images get internal server error response has a 5xx status code +func (o *PcloudImagesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud images get internal server error response a status code equal to that given +func (o *PcloudImagesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud images get internal server error response +func (o *PcloudImagesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudImagesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudImagesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images/{image_id}][%d] pcloudImagesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudImagesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_parameters.go index cb90f6f5a67..008b8284b8a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_parameters.go @@ -53,10 +53,12 @@ func NewPcloudImagesGetallParamsWithHTTPClient(client *http.Client) *PcloudImage } } -/* PcloudImagesGetallParams contains all the parameters to send to the API endpoint - for the pcloud images getall operation. +/* +PcloudImagesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud images getall operation. + + Typically these are written to a http.Request. */ type PcloudImagesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go index 5be159bd652..6da205106b6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_images_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudImagesGetallReader) ReadResponse(response runtime.ClientResponse, return nil, err } return nil, result + case 403: + result := NewPcloudImagesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudImagesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudImagesGetallReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/images] pcloud.images.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudImagesGetallOK() *PcloudImagesGetallOK { return &PcloudImagesGetallOK{} } -/* PcloudImagesGetallOK describes a response with status code 200, with default header values. +/* +PcloudImagesGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudImagesGetallOK struct { Payload *models.Images } +// IsSuccess returns true when this pcloud images getall o k response has a 2xx status code +func (o *PcloudImagesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud images getall o k response has a 3xx status code +func (o *PcloudImagesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images getall o k response has a 4xx status code +func (o *PcloudImagesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud images getall o k response has a 5xx status code +func (o *PcloudImagesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images getall o k response a status code equal to that given +func (o *PcloudImagesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud images getall o k response +func (o *PcloudImagesGetallOK) Code() int { + return 200 +} + func (o *PcloudImagesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudImagesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudImagesGetallOK) GetPayload() *models.Images { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudImagesGetallBadRequest() *PcloudImagesGetallBadRequest { return &PcloudImagesGetallBadRequest{} } -/* PcloudImagesGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudImagesGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudImagesGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud images getall bad request response has a 2xx status code +func (o *PcloudImagesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images getall bad request response has a 3xx status code +func (o *PcloudImagesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images getall bad request response has a 4xx status code +func (o *PcloudImagesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud images getall bad request response has a 5xx status code +func (o *PcloudImagesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images getall bad request response a status code equal to that given +func (o *PcloudImagesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud images getall bad request response +func (o *PcloudImagesGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudImagesGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudImagesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudImagesGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudImagesGetallUnauthorized() *PcloudImagesGetallUnauthorized { return &PcloudImagesGetallUnauthorized{} } -/* PcloudImagesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudImagesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudImagesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud images getall unauthorized response has a 2xx status code +func (o *PcloudImagesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images getall unauthorized response has a 3xx status code +func (o *PcloudImagesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images getall unauthorized response has a 4xx status code +func (o *PcloudImagesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud images getall unauthorized response has a 5xx status code +func (o *PcloudImagesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images getall unauthorized response a status code equal to that given +func (o *PcloudImagesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud images getall unauthorized response +func (o *PcloudImagesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudImagesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudImagesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudImagesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudImagesGetallUnauthorized) readResponse(response runtime.ClientRes return nil } +// NewPcloudImagesGetallForbidden creates a PcloudImagesGetallForbidden with default headers values +func NewPcloudImagesGetallForbidden() *PcloudImagesGetallForbidden { + return &PcloudImagesGetallForbidden{} +} + +/* +PcloudImagesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudImagesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud images getall forbidden response has a 2xx status code +func (o *PcloudImagesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images getall forbidden response has a 3xx status code +func (o *PcloudImagesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images getall forbidden response has a 4xx status code +func (o *PcloudImagesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud images getall forbidden response has a 5xx status code +func (o *PcloudImagesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images getall forbidden response a status code equal to that given +func (o *PcloudImagesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud images getall forbidden response +func (o *PcloudImagesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudImagesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudImagesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudImagesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudImagesGetallForbidden) 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 +} + // NewPcloudImagesGetallNotFound creates a PcloudImagesGetallNotFound with default headers values func NewPcloudImagesGetallNotFound() *PcloudImagesGetallNotFound { return &PcloudImagesGetallNotFound{} } -/* PcloudImagesGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudImagesGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudImagesGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud images getall not found response has a 2xx status code +func (o *PcloudImagesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images getall not found response has a 3xx status code +func (o *PcloudImagesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images getall not found response has a 4xx status code +func (o *PcloudImagesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud images getall not found response has a 5xx status code +func (o *PcloudImagesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud images getall not found response a status code equal to that given +func (o *PcloudImagesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud images getall not found response +func (o *PcloudImagesGetallNotFound) Code() int { + return 404 +} + func (o *PcloudImagesGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudImagesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudImagesGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudImagesGetallInternalServerError() *PcloudImagesGetallInternalServe return &PcloudImagesGetallInternalServerError{} } -/* PcloudImagesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudImagesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudImagesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud images getall internal server error response has a 2xx status code +func (o *PcloudImagesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud images getall internal server error response has a 3xx status code +func (o *PcloudImagesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud images getall internal server error response has a 4xx status code +func (o *PcloudImagesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud images getall internal server error response has a 5xx status code +func (o *PcloudImagesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud images getall internal server error response a status code equal to that given +func (o *PcloudImagesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud images getall internal server error response +func (o *PcloudImagesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudImagesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudImagesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/images][%d] pcloudImagesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudImagesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_parameters.go index dd5a1f9ad02..4a97024dfd9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudV1CloudinstancesCosimagesGetParamsWithHTTPClient(client *http.Clie } } -/* PcloudV1CloudinstancesCosimagesGetParams contains all the parameters to send to the API endpoint - for the pcloud v1 cloudinstances cosimages get operation. +/* +PcloudV1CloudinstancesCosimagesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v1 cloudinstances cosimages get operation. + + Typically these are written to a http.Request. */ type PcloudV1CloudinstancesCosimagesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go index 54dad0dc1a2..01351d964df 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go @@ -29,12 +29,24 @@ 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 { return nil, err } return nil, result + case 403: + result := NewPcloudV1CloudinstancesCosimagesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV1CloudinstancesCosimagesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudV1CloudinstancesCosimagesGetReader) ReadResponse(response runtime } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images] pcloud.v1.cloudinstances.cosimages.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudV1CloudinstancesCosimagesGetOK() *PcloudV1CloudinstancesCosimagesG return &PcloudV1CloudinstancesCosimagesGetOK{} } -/* PcloudV1CloudinstancesCosimagesGetOK describes a response with status code 200, with default header values. +/* +PcloudV1CloudinstancesCosimagesGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudV1CloudinstancesCosimagesGetOK struct { Payload *models.Job } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages get o k response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages get o k response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages get o k response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages get o k response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages get o k response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages get o k response +func (o *PcloudV1CloudinstancesCosimagesGetOK) Code() int { + return 200 +} + func (o *PcloudV1CloudinstancesCosimagesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetOK %+v", 200, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetOK %+v", 200, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesGetOK) GetPayload() *models.Job { return o.Payload } @@ -84,12 +132,81 @@ 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{} } -/* PcloudV1CloudinstancesCosimagesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV1CloudinstancesCosimagesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudV1CloudinstancesCosimagesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages get unauthorized response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages get unauthorized response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages get unauthorized response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages get unauthorized response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages get unauthorized response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages get unauthorized response +func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ func (o *PcloudV1CloudinstancesCosimagesGetUnauthorized) readResponse(response r return nil } +// NewPcloudV1CloudinstancesCosimagesGetForbidden creates a PcloudV1CloudinstancesCosimagesGetForbidden with default headers values +func NewPcloudV1CloudinstancesCosimagesGetForbidden() *PcloudV1CloudinstancesCosimagesGetForbidden { + return &PcloudV1CloudinstancesCosimagesGetForbidden{} +} + +/* +PcloudV1CloudinstancesCosimagesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV1CloudinstancesCosimagesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages get forbidden response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages get forbidden response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages get forbidden response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages get forbidden response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages get forbidden response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages get forbidden response +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV1CloudinstancesCosimagesGetForbidden) 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 +} + // NewPcloudV1CloudinstancesCosimagesGetNotFound creates a PcloudV1CloudinstancesCosimagesGetNotFound with default headers values func NewPcloudV1CloudinstancesCosimagesGetNotFound() *PcloudV1CloudinstancesCosimagesGetNotFound { return &PcloudV1CloudinstancesCosimagesGetNotFound{} } -/* PcloudV1CloudinstancesCosimagesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudV1CloudinstancesCosimagesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudV1CloudinstancesCosimagesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages get not found response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages get not found response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages get not found response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages get not found response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages get not found response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages get not found response +func (o *PcloudV1CloudinstancesCosimagesGetNotFound) Code() int { + return 404 +} + func (o *PcloudV1CloudinstancesCosimagesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudV1CloudinstancesCosimagesGetInternalServerError() *PcloudV1Cloudin return &PcloudV1CloudinstancesCosimagesGetInternalServerError{} } -/* PcloudV1CloudinstancesCosimagesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV1CloudinstancesCosimagesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudV1CloudinstancesCosimagesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages get internal server error response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages get internal server error response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages get internal server error response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages get internal server error response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages get internal server error response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages get internal server error response +func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_parameters.go index 199d9e7a724..6a7952ce4c4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV1CloudinstancesCosimagesPostParamsWithHTTPClient(client *http.Cli } } -/* PcloudV1CloudinstancesCosimagesPostParams contains all the parameters to send to the API endpoint - for the pcloud v1 cloudinstances cosimages post operation. +/* +PcloudV1CloudinstancesCosimagesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v1 cloudinstances cosimages post operation. + + Typically these are written to a http.Request. */ type PcloudV1CloudinstancesCosimagesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go index ac1a8d0adac..4e96b47bc1d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudV1CloudinstancesCosimagesPostReader) ReadResponse(response runtim } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images] pcloud.v1.cloudinstances.cosimages.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudV1CloudinstancesCosimagesPostAccepted() *PcloudV1CloudinstancesCos return &PcloudV1CloudinstancesCosimagesPostAccepted{} } -/* PcloudV1CloudinstancesCosimagesPostAccepted describes a response with status code 202, with default header values. +/* +PcloudV1CloudinstancesCosimagesPostAccepted describes a response with status code 202, with default header values. Accepted, cos-image import successfully added to the jobs queue */ @@ -83,9 +90,44 @@ type PcloudV1CloudinstancesCosimagesPostAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages post accepted response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages post accepted response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages post accepted response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages post accepted response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages post accepted response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages post accepted response +func (o *PcloudV1CloudinstancesCosimagesPostAccepted) Code() int { + return 202 +} + func (o *PcloudV1CloudinstancesCosimagesPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesPostAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudV1CloudinstancesCosimagesPostBadRequest() *PcloudV1CloudinstancesC return &PcloudV1CloudinstancesCosimagesPostBadRequest{} } -/* PcloudV1CloudinstancesCosimagesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudV1CloudinstancesCosimagesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudV1CloudinstancesCosimagesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages post bad request response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages post bad request response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages post bad request response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages post bad request response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages post bad request response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages post bad request response +func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudV1CloudinstancesCosimagesPostUnauthorized() *PcloudV1Cloudinstance return &PcloudV1CloudinstancesCosimagesPostUnauthorized{} } -/* PcloudV1CloudinstancesCosimagesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV1CloudinstancesCosimagesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudV1CloudinstancesCosimagesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages post unauthorized response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages post unauthorized response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages post unauthorized response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages post unauthorized response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages post unauthorized response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages post unauthorized response +func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +285,8 @@ func NewPcloudV1CloudinstancesCosimagesPostForbidden() *PcloudV1CloudinstancesCo return &PcloudV1CloudinstancesCosimagesPostForbidden{} } -/* PcloudV1CloudinstancesCosimagesPostForbidden describes a response with status code 403, with default header values. +/* +PcloudV1CloudinstancesCosimagesPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +294,44 @@ type PcloudV1CloudinstancesCosimagesPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages post forbidden response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages post forbidden response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages post forbidden response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages post forbidden response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages post forbidden response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages post forbidden response +func (o *PcloudV1CloudinstancesCosimagesPostForbidden) Code() int { + return 403 +} + func (o *PcloudV1CloudinstancesCosimagesPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -198,12 +348,81 @@ 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{} } -/* PcloudV1CloudinstancesCosimagesPostConflict describes a response with status code 409, with default header values. +/* +PcloudV1CloudinstancesCosimagesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +430,44 @@ type PcloudV1CloudinstancesCosimagesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages post conflict response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages post conflict response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages post conflict response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages post conflict response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages post conflict response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages post conflict response +func (o *PcloudV1CloudinstancesCosimagesPostConflict) Code() int { + return 409 +} + func (o *PcloudV1CloudinstancesCosimagesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudV1CloudinstancesCosimagesPostUnprocessableEntity() *PcloudV1Cloudi return &PcloudV1CloudinstancesCosimagesPostUnprocessableEntity{} } -/* PcloudV1CloudinstancesCosimagesPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudV1CloudinstancesCosimagesPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudV1CloudinstancesCosimagesPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages post unprocessable entity response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages post unprocessable entity response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages post unprocessable entity response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages post unprocessable entity response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages post unprocessable entity response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages post unprocessable entity response +func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudV1CloudinstancesCosimagesPostInternalServerError() *PcloudV1Cloudi return &PcloudV1CloudinstancesCosimagesPostInternalServerError{} } -/* PcloudV1CloudinstancesCosimagesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV1CloudinstancesCosimagesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudV1CloudinstancesCosimagesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v1 cloudinstances cosimages post internal server error response has a 2xx status code +func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v1 cloudinstances cosimages post internal server error response has a 3xx status code +func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v1 cloudinstances cosimages post internal server error response has a 4xx status code +func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v1 cloudinstances cosimages post internal server error response has a 5xx status code +func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v1 cloudinstances cosimages post internal server error response a status code equal to that given +func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v1 cloudinstances cosimages post internal server error response +func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cos-images][%d] pcloudV1CloudinstancesCosimagesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV1CloudinstancesCosimagesPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_parameters.go index 6a7f12b258f..6758df1b627 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudV2ImagesExportGetParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudV2ImagesExportGetParams contains all the parameters to send to the API endpoint - for the pcloud v2 images export get operation. +/* +PcloudV2ImagesExportGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 images export get operation. + + Typically these are written to a http.Request. */ type PcloudV2ImagesExportGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go index a5c695a14bc..d1004447c3e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *PcloudV2ImagesExportGetReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export] pcloud.v2.images.export.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudV2ImagesExportGetOK() *PcloudV2ImagesExportGetOK { return &PcloudV2ImagesExportGetOK{} } -/* PcloudV2ImagesExportGetOK describes a response with status code 200, with default header values. +/* +PcloudV2ImagesExportGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudV2ImagesExportGetOK struct { Payload *models.Job } +// IsSuccess returns true when this pcloud v2 images export get o k response has a 2xx status code +func (o *PcloudV2ImagesExportGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 images export get o k response has a 3xx status code +func (o *PcloudV2ImagesExportGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export get o k response has a 4xx status code +func (o *PcloudV2ImagesExportGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 images export get o k response has a 5xx status code +func (o *PcloudV2ImagesExportGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export get o k response a status code equal to that given +func (o *PcloudV2ImagesExportGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v2 images export get o k response +func (o *PcloudV2ImagesExportGetOK) Code() int { + return 200 +} + func (o *PcloudV2ImagesExportGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetOK %+v", 200, o.Payload) } + +func (o *PcloudV2ImagesExportGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetOK %+v", 200, o.Payload) +} + func (o *PcloudV2ImagesExportGetOK) GetPayload() *models.Job { return o.Payload } @@ -84,12 +132,81 @@ 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{} } -/* PcloudV2ImagesExportGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2ImagesExportGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudV2ImagesExportGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export get unauthorized response has a 2xx status code +func (o *PcloudV2ImagesExportGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export get unauthorized response has a 3xx status code +func (o *PcloudV2ImagesExportGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export get unauthorized response has a 4xx status code +func (o *PcloudV2ImagesExportGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export get unauthorized response has a 5xx status code +func (o *PcloudV2ImagesExportGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export get unauthorized response a status code equal to that given +func (o *PcloudV2ImagesExportGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 images export get unauthorized response +func (o *PcloudV2ImagesExportGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2ImagesExportGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2ImagesExportGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2ImagesExportGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ 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{} } -/* PcloudV2ImagesExportGetNotFound describes a response with status code 404, with default header values. +/* +PcloudV2ImagesExportGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudV2ImagesExportGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export get not found response has a 2xx status code +func (o *PcloudV2ImagesExportGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export get not found response has a 3xx status code +func (o *PcloudV2ImagesExportGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export get not found response has a 4xx status code +func (o *PcloudV2ImagesExportGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export get not found response has a 5xx status code +func (o *PcloudV2ImagesExportGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export get not found response a status code equal to that given +func (o *PcloudV2ImagesExportGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 images export get not found response +func (o *PcloudV2ImagesExportGetNotFound) Code() int { + return 404 +} + func (o *PcloudV2ImagesExportGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2ImagesExportGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2ImagesExportGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudV2ImagesExportGetInternalServerError() *PcloudV2ImagesExportGetInt return &PcloudV2ImagesExportGetInternalServerError{} } -/* PcloudV2ImagesExportGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2ImagesExportGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudV2ImagesExportGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export get internal server error response has a 2xx status code +func (o *PcloudV2ImagesExportGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export get internal server error response has a 3xx status code +func (o *PcloudV2ImagesExportGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export get internal server error response has a 4xx status code +func (o *PcloudV2ImagesExportGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 images export get internal server error response has a 5xx status code +func (o *PcloudV2ImagesExportGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 images export get internal server error response a status code equal to that given +func (o *PcloudV2ImagesExportGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 images export get internal server error response +func (o *PcloudV2ImagesExportGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2ImagesExportGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2ImagesExportGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2ImagesExportGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_parameters.go index da0c0be1502..d6b4ba26ab5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV2ImagesExportPostParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudV2ImagesExportPostParams contains all the parameters to send to the API endpoint - for the pcloud v2 images export post operation. +/* +PcloudV2ImagesExportPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 images export post operation. + + Typically these are written to a http.Request. */ type PcloudV2ImagesExportPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go index 43957ae2cc2..80ba815b95a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudV2ImagesExportPostReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export] pcloud.v2.images.export.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudV2ImagesExportPostAccepted() *PcloudV2ImagesExportPostAccepted { return &PcloudV2ImagesExportPostAccepted{} } -/* PcloudV2ImagesExportPostAccepted describes a response with status code 202, with default header values. +/* +PcloudV2ImagesExportPostAccepted describes a response with status code 202, with default header values. Accepted, image export successfully added to the jobs queue */ @@ -83,9 +90,44 @@ type PcloudV2ImagesExportPostAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud v2 images export post accepted response has a 2xx status code +func (o *PcloudV2ImagesExportPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 images export post accepted response has a 3xx status code +func (o *PcloudV2ImagesExportPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export post accepted response has a 4xx status code +func (o *PcloudV2ImagesExportPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 images export post accepted response has a 5xx status code +func (o *PcloudV2ImagesExportPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export post accepted response a status code equal to that given +func (o *PcloudV2ImagesExportPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud v2 images export post accepted response +func (o *PcloudV2ImagesExportPostAccepted) Code() int { + return 202 +} + func (o *PcloudV2ImagesExportPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudV2ImagesExportPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudV2ImagesExportPostAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudV2ImagesExportPostBadRequest() *PcloudV2ImagesExportPostBadRequest return &PcloudV2ImagesExportPostBadRequest{} } -/* PcloudV2ImagesExportPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2ImagesExportPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudV2ImagesExportPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export post bad request response has a 2xx status code +func (o *PcloudV2ImagesExportPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export post bad request response has a 3xx status code +func (o *PcloudV2ImagesExportPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export post bad request response has a 4xx status code +func (o *PcloudV2ImagesExportPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export post bad request response has a 5xx status code +func (o *PcloudV2ImagesExportPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export post bad request response a status code equal to that given +func (o *PcloudV2ImagesExportPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 images export post bad request response +func (o *PcloudV2ImagesExportPostBadRequest) Code() int { + return 400 +} + func (o *PcloudV2ImagesExportPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2ImagesExportPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2ImagesExportPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudV2ImagesExportPostUnauthorized() *PcloudV2ImagesExportPostUnauthor return &PcloudV2ImagesExportPostUnauthorized{} } -/* PcloudV2ImagesExportPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2ImagesExportPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudV2ImagesExportPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export post unauthorized response has a 2xx status code +func (o *PcloudV2ImagesExportPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export post unauthorized response has a 3xx status code +func (o *PcloudV2ImagesExportPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export post unauthorized response has a 4xx status code +func (o *PcloudV2ImagesExportPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export post unauthorized response has a 5xx status code +func (o *PcloudV2ImagesExportPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export post unauthorized response a status code equal to that given +func (o *PcloudV2ImagesExportPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 images export post unauthorized response +func (o *PcloudV2ImagesExportPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2ImagesExportPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2ImagesExportPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2ImagesExportPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -166,12 +280,81 @@ 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{} } -/* PcloudV2ImagesExportPostNotFound describes a response with status code 404, with default header values. +/* +PcloudV2ImagesExportPostNotFound describes a response with status code 404, with default header values. image id not found */ @@ -179,9 +362,44 @@ type PcloudV2ImagesExportPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export post not found response has a 2xx status code +func (o *PcloudV2ImagesExportPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export post not found response has a 3xx status code +func (o *PcloudV2ImagesExportPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export post not found response has a 4xx status code +func (o *PcloudV2ImagesExportPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export post not found response has a 5xx status code +func (o *PcloudV2ImagesExportPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export post not found response a status code equal to that given +func (o *PcloudV2ImagesExportPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 images export post not found response +func (o *PcloudV2ImagesExportPostNotFound) Code() int { + return 404 +} + func (o *PcloudV2ImagesExportPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2ImagesExportPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2ImagesExportPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -203,7 +421,8 @@ func NewPcloudV2ImagesExportPostConflict() *PcloudV2ImagesExportPostConflict { return &PcloudV2ImagesExportPostConflict{} } -/* PcloudV2ImagesExportPostConflict describes a response with status code 409, with default header values. +/* +PcloudV2ImagesExportPostConflict describes a response with status code 409, with default header values. Conflict, a conflict has prevented adding image export job */ @@ -211,9 +430,44 @@ type PcloudV2ImagesExportPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export post conflict response has a 2xx status code +func (o *PcloudV2ImagesExportPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export post conflict response has a 3xx status code +func (o *PcloudV2ImagesExportPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export post conflict response has a 4xx status code +func (o *PcloudV2ImagesExportPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export post conflict response has a 5xx status code +func (o *PcloudV2ImagesExportPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export post conflict response a status code equal to that given +func (o *PcloudV2ImagesExportPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud v2 images export post conflict response +func (o *PcloudV2ImagesExportPostConflict) Code() int { + return 409 +} + func (o *PcloudV2ImagesExportPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostConflict %+v", 409, o.Payload) } + +func (o *PcloudV2ImagesExportPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostConflict %+v", 409, o.Payload) +} + func (o *PcloudV2ImagesExportPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudV2ImagesExportPostUnprocessableEntity() *PcloudV2ImagesExportPostU return &PcloudV2ImagesExportPostUnprocessableEntity{} } -/* PcloudV2ImagesExportPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudV2ImagesExportPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudV2ImagesExportPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export post unprocessable entity response has a 2xx status code +func (o *PcloudV2ImagesExportPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export post unprocessable entity response has a 3xx status code +func (o *PcloudV2ImagesExportPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export post unprocessable entity response has a 4xx status code +func (o *PcloudV2ImagesExportPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 images export post unprocessable entity response has a 5xx status code +func (o *PcloudV2ImagesExportPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 images export post unprocessable entity response a status code equal to that given +func (o *PcloudV2ImagesExportPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud v2 images export post unprocessable entity response +func (o *PcloudV2ImagesExportPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudV2ImagesExportPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudV2ImagesExportPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudV2ImagesExportPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudV2ImagesExportPostInternalServerError() *PcloudV2ImagesExportPostI return &PcloudV2ImagesExportPostInternalServerError{} } -/* PcloudV2ImagesExportPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2ImagesExportPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudV2ImagesExportPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 images export post internal server error response has a 2xx status code +func (o *PcloudV2ImagesExportPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 images export post internal server error response has a 3xx status code +func (o *PcloudV2ImagesExportPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 images export post internal server error response has a 4xx status code +func (o *PcloudV2ImagesExportPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 images export post internal server error response has a 5xx status code +func (o *PcloudV2ImagesExportPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 images export post internal server error response a status code equal to that given +func (o *PcloudV2ImagesExportPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 images export post internal server error response +func (o *PcloudV2ImagesExportPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2ImagesExportPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2ImagesExportPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/images/{image_id}/export][%d] pcloudV2ImagesExportPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2ImagesExportPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/p_cloud_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/p_cloud_instances_client.go index b8c3c3c8b1b..7a43f878b5c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/p_cloud_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/p_cloud_instances_client.go @@ -40,7 +40,7 @@ type ClientService interface { } /* - PcloudCloudinstancesDelete deletes a power cloud instance +PcloudCloudinstancesDelete deletes a power cloud instance */ func (a *Client) PcloudCloudinstancesDelete(params *PcloudCloudinstancesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesDeleteOK, error) { // TODO: Validate the params before sending @@ -79,7 +79,7 @@ func (a *Client) PcloudCloudinstancesDelete(params *PcloudCloudinstancesDeletePa } /* - PcloudCloudinstancesGet gets a cloud instance s current state information +PcloudCloudinstancesGet gets a cloud instance s current state information */ func (a *Client) PcloudCloudinstancesGet(params *PcloudCloudinstancesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesGetOK, error) { // TODO: Validate the params before sending @@ -118,7 +118,7 @@ func (a *Client) PcloudCloudinstancesGet(params *PcloudCloudinstancesGetParams, } /* - PcloudCloudinstancesPut updates upgrade a cloud instance +PcloudCloudinstancesPut updates upgrade a cloud instance */ func (a *Client) PcloudCloudinstancesPut(params *PcloudCloudinstancesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesPutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_parameters.go index e375cf1652f..69237be9d0c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesDeleteParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudCloudinstancesDeleteParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances delete operation. +/* +PcloudCloudinstancesDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances delete operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go index 6bd8adbbadf..220add32b63 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +66,7 @@ func (o *PcloudCloudinstancesDeleteReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}] pcloud.cloudinstances.delete", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudCloudinstancesDeleteOK() *PcloudCloudinstancesDeleteOK { return &PcloudCloudinstancesDeleteOK{} } -/* PcloudCloudinstancesDeleteOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesDeleteOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudCloudinstancesDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudinstances delete o k response has a 2xx status code +func (o *PcloudCloudinstancesDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances delete o k response has a 3xx status code +func (o *PcloudCloudinstancesDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances delete o k response has a 4xx status code +func (o *PcloudCloudinstancesDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances delete o k response has a 5xx status code +func (o *PcloudCloudinstancesDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances delete o k response a status code equal to that given +func (o *PcloudCloudinstancesDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances delete o k response +func (o *PcloudCloudinstancesDeleteOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesDeleteOK) GetPayload() models.Object { return o.Payload } @@ -93,7 +141,8 @@ func NewPcloudCloudinstancesDeleteBadRequest() *PcloudCloudinstancesDeleteBadReq return &PcloudCloudinstancesDeleteBadRequest{} } -/* PcloudCloudinstancesDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +150,44 @@ type PcloudCloudinstancesDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances delete bad request response has a 2xx status code +func (o *PcloudCloudinstancesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances delete bad request response has a 3xx status code +func (o *PcloudCloudinstancesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances delete bad request response has a 4xx status code +func (o *PcloudCloudinstancesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances delete bad request response has a 5xx status code +func (o *PcloudCloudinstancesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances delete bad request response a status code equal to that given +func (o *PcloudCloudinstancesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances delete bad request response +func (o *PcloudCloudinstancesDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -125,7 +209,8 @@ func NewPcloudCloudinstancesDeleteUnauthorized() *PcloudCloudinstancesDeleteUnau return &PcloudCloudinstancesDeleteUnauthorized{} } -/* PcloudCloudinstancesDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -133,9 +218,44 @@ type PcloudCloudinstancesDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances delete unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances delete unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances delete unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances delete unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances delete unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances delete unauthorized response +func (o *PcloudCloudinstancesDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -152,12 +272,149 @@ 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{} } -/* PcloudCloudinstancesDeleteGone describes a response with status code 410, with default header values. +/* +PcloudCloudinstancesDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -165,9 +422,44 @@ type PcloudCloudinstancesDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances delete gone response has a 2xx status code +func (o *PcloudCloudinstancesDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances delete gone response has a 3xx status code +func (o *PcloudCloudinstancesDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances delete gone response has a 4xx status code +func (o *PcloudCloudinstancesDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances delete gone response has a 5xx status code +func (o *PcloudCloudinstancesDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances delete gone response a status code equal to that given +func (o *PcloudCloudinstancesDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud cloudinstances delete gone response +func (o *PcloudCloudinstancesDeleteGone) Code() int { + return 410 +} + func (o *PcloudCloudinstancesDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudCloudinstancesDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudCloudinstancesDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -189,7 +481,8 @@ func NewPcloudCloudinstancesDeleteInternalServerError() *PcloudCloudinstancesDel return &PcloudCloudinstancesDeleteInternalServerError{} } -/* PcloudCloudinstancesDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +490,44 @@ type PcloudCloudinstancesDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances delete internal server error response has a 2xx status code +func (o *PcloudCloudinstancesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances delete internal server error response has a 3xx status code +func (o *PcloudCloudinstancesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances delete internal server error response has a 4xx status code +func (o *PcloudCloudinstancesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances delete internal server error response has a 5xx status code +func (o *PcloudCloudinstancesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances delete internal server error response a status code equal to that given +func (o *PcloudCloudinstancesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances delete internal server error response +func (o *PcloudCloudinstancesDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_parameters.go index 4eda9ee4e00..225bf55ddf0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesGetParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudCloudinstancesGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances get operation. +/* +PcloudCloudinstancesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances get operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go index c7056df69fe..37be0bd25b8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesGetReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}] pcloud.cloudinstances.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesGetOK() *PcloudCloudinstancesGetOK { return &PcloudCloudinstancesGetOK{} } -/* PcloudCloudinstancesGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesGetOK struct { Payload *models.CloudInstance } +// IsSuccess returns true when this pcloud cloudinstances get o k response has a 2xx status code +func (o *PcloudCloudinstancesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances get o k response has a 3xx status code +func (o *PcloudCloudinstancesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances get o k response has a 4xx status code +func (o *PcloudCloudinstancesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances get o k response has a 5xx status code +func (o *PcloudCloudinstancesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances get o k response a status code equal to that given +func (o *PcloudCloudinstancesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances get o k response +func (o *PcloudCloudinstancesGetOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesGetOK) GetPayload() *models.CloudInstance { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesGetBadRequest() *PcloudCloudinstancesGetBadRequest { return &PcloudCloudinstancesGetBadRequest{} } -/* PcloudCloudinstancesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances get bad request response has a 2xx status code +func (o *PcloudCloudinstancesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances get bad request response has a 3xx status code +func (o *PcloudCloudinstancesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances get bad request response has a 4xx status code +func (o *PcloudCloudinstancesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances get bad request response has a 5xx status code +func (o *PcloudCloudinstancesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances get bad request response a status code equal to that given +func (o *PcloudCloudinstancesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances get bad request response +func (o *PcloudCloudinstancesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesGetUnauthorized() *PcloudCloudinstancesGetUnauthoriz return &PcloudCloudinstancesGetUnauthorized{} } -/* PcloudCloudinstancesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances get unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances get unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances get unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances get unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances get unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances get unauthorized response +func (o *PcloudCloudinstancesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ 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{} } -/* PcloudCloudinstancesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances get not found response has a 2xx status code +func (o *PcloudCloudinstancesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances get not found response has a 3xx status code +func (o *PcloudCloudinstancesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances get not found response has a 4xx status code +func (o *PcloudCloudinstancesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances get not found response has a 5xx status code +func (o *PcloudCloudinstancesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances get not found response a status code equal to that given +func (o *PcloudCloudinstancesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances get not found response +func (o *PcloudCloudinstancesGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesGetInternalServerError() *PcloudCloudinstancesGetInt return &PcloudCloudinstancesGetInternalServerError{} } -/* PcloudCloudinstancesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances get internal server error response has a 2xx status code +func (o *PcloudCloudinstancesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances get internal server error response has a 3xx status code +func (o *PcloudCloudinstancesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances get internal server error response has a 4xx status code +func (o *PcloudCloudinstancesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances get internal server error response has a 5xx status code +func (o *PcloudCloudinstancesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances get internal server error response a status code equal to that given +func (o *PcloudCloudinstancesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances get internal server error response +func (o *PcloudCloudinstancesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_parameters.go index 4e47d1af78c..91a04cdfcbc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudinstancesPutParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudCloudinstancesPutParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances put operation. +/* +PcloudCloudinstancesPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances put operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go index 8d6cf4b567a..23f5465cf55 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +66,7 @@ func (o *PcloudCloudinstancesPutReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}] pcloud.cloudinstances.put", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudCloudinstancesPutOK() *PcloudCloudinstancesPutOK { return &PcloudCloudinstancesPutOK{} } -/* PcloudCloudinstancesPutOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesPutOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudCloudinstancesPutOK struct { Payload *models.CloudInstance } +// IsSuccess returns true when this pcloud cloudinstances put o k response has a 2xx status code +func (o *PcloudCloudinstancesPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances put o k response has a 3xx status code +func (o *PcloudCloudinstancesPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances put o k response has a 4xx status code +func (o *PcloudCloudinstancesPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances put o k response has a 5xx status code +func (o *PcloudCloudinstancesPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances put o k response a status code equal to that given +func (o *PcloudCloudinstancesPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances put o k response +func (o *PcloudCloudinstancesPutOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesPutOK) GetPayload() *models.CloudInstance { return o.Payload } @@ -95,7 +143,8 @@ func NewPcloudCloudinstancesPutBadRequest() *PcloudCloudinstancesPutBadRequest { return &PcloudCloudinstancesPutBadRequest{} } -/* PcloudCloudinstancesPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +152,44 @@ type PcloudCloudinstancesPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances put bad request response has a 2xx status code +func (o *PcloudCloudinstancesPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances put bad request response has a 3xx status code +func (o *PcloudCloudinstancesPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances put bad request response has a 4xx status code +func (o *PcloudCloudinstancesPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances put bad request response has a 5xx status code +func (o *PcloudCloudinstancesPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances put bad request response a status code equal to that given +func (o *PcloudCloudinstancesPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances put bad request response +func (o *PcloudCloudinstancesPutBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +211,8 @@ func NewPcloudCloudinstancesPutUnauthorized() *PcloudCloudinstancesPutUnauthoriz return &PcloudCloudinstancesPutUnauthorized{} } -/* PcloudCloudinstancesPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +220,44 @@ type PcloudCloudinstancesPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances put unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances put unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances put unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances put unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances put unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances put unauthorized response +func (o *PcloudCloudinstancesPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +274,149 @@ 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{} } -/* PcloudCloudinstancesPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudCloudinstancesPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -167,9 +424,44 @@ type PcloudCloudinstancesPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances put unprocessable entity response has a 2xx status code +func (o *PcloudCloudinstancesPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances put unprocessable entity response has a 3xx status code +func (o *PcloudCloudinstancesPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances put unprocessable entity response has a 4xx status code +func (o *PcloudCloudinstancesPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances put unprocessable entity response has a 5xx status code +func (o *PcloudCloudinstancesPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances put unprocessable entity response a status code equal to that given +func (o *PcloudCloudinstancesPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudinstances put unprocessable entity response +func (o *PcloudCloudinstancesPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudCloudinstancesPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudCloudinstancesPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudCloudinstancesPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -191,7 +483,8 @@ func NewPcloudCloudinstancesPutInternalServerError() *PcloudCloudinstancesPutInt return &PcloudCloudinstancesPutInternalServerError{} } -/* PcloudCloudinstancesPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +492,44 @@ type PcloudCloudinstancesPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances put internal server error response has a 2xx status code +func (o *PcloudCloudinstancesPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances put internal server error response has a 3xx status code +func (o *PcloudCloudinstancesPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances put internal server error response has a 4xx status code +func (o *PcloudCloudinstancesPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances put internal server error response has a 5xx status code +func (o *PcloudCloudinstancesPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances put internal server error response a status code equal to that given +func (o *PcloudCloudinstancesPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances put internal server error response +func (o *PcloudCloudinstancesPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}][%d] pcloudCloudinstancesPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/p_cloud_jobs_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/p_cloud_jobs_client.go index 0d4c362afd2..376120745e3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/p_cloud_jobs_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/p_cloud_jobs_client.go @@ -40,7 +40,7 @@ type ClientService interface { } /* - PcloudCloudinstancesJobsDelete deletes a cloud instance job +PcloudCloudinstancesJobsDelete deletes a cloud instance job */ func (a *Client) PcloudCloudinstancesJobsDelete(params *PcloudCloudinstancesJobsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesJobsDeleteOK, error) { // TODO: Validate the params before sending @@ -79,7 +79,7 @@ func (a *Client) PcloudCloudinstancesJobsDelete(params *PcloudCloudinstancesJobs } /* - PcloudCloudinstancesJobsGet lists the detail of a job +PcloudCloudinstancesJobsGet lists the detail of a job */ func (a *Client) PcloudCloudinstancesJobsGet(params *PcloudCloudinstancesJobsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesJobsGetOK, error) { // TODO: Validate the params before sending @@ -118,7 +118,7 @@ func (a *Client) PcloudCloudinstancesJobsGet(params *PcloudCloudinstancesJobsGet } /* - PcloudCloudinstancesJobsGetall lists up to the last 5 jobs initiated by the cloud instance +PcloudCloudinstancesJobsGetall lists up to the last 5 jobs initiated by the cloud instance */ func (a *Client) PcloudCloudinstancesJobsGetall(params *PcloudCloudinstancesJobsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesJobsGetallOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_parameters.go index 9e3b31e1ef7..0adff40549c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesJobsDeleteParamsWithHTTPClient(client *http.Client) } } -/* PcloudCloudinstancesJobsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances jobs delete operation. +/* +PcloudCloudinstancesJobsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances jobs delete operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesJobsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go index da6ffd992dd..eac90dc739e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesJobsDeleteReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesJobsDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesJobsDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudCloudinstancesJobsDeleteReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}] pcloud.cloudinstances.jobs.delete", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudCloudinstancesJobsDeleteOK() *PcloudCloudinstancesJobsDeleteOK { return &PcloudCloudinstancesJobsDeleteOK{} } -/* PcloudCloudinstancesJobsDeleteOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesJobsDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudCloudinstancesJobsDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudinstances jobs delete o k response has a 2xx status code +func (o *PcloudCloudinstancesJobsDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances jobs delete o k response has a 3xx status code +func (o *PcloudCloudinstancesJobsDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs delete o k response has a 4xx status code +func (o *PcloudCloudinstancesJobsDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances jobs delete o k response has a 5xx status code +func (o *PcloudCloudinstancesJobsDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs delete o k response a status code equal to that given +func (o *PcloudCloudinstancesJobsDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances jobs delete o k response +func (o *PcloudCloudinstancesJobsDeleteOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesJobsDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesJobsDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesJobsDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudCloudinstancesJobsDeleteBadRequest() *PcloudCloudinstancesJobsDele return &PcloudCloudinstancesJobsDeleteBadRequest{} } -/* PcloudCloudinstancesJobsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesJobsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudCloudinstancesJobsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs delete bad request response has a 2xx status code +func (o *PcloudCloudinstancesJobsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs delete bad request response has a 3xx status code +func (o *PcloudCloudinstancesJobsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs delete bad request response has a 4xx status code +func (o *PcloudCloudinstancesJobsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs delete bad request response has a 5xx status code +func (o *PcloudCloudinstancesJobsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs delete bad request response a status code equal to that given +func (o *PcloudCloudinstancesJobsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances jobs delete bad request response +func (o *PcloudCloudinstancesJobsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesJobsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesJobsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesJobsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudCloudinstancesJobsDeleteUnauthorized() *PcloudCloudinstancesJobsDe return &PcloudCloudinstancesJobsDeleteUnauthorized{} } -/* PcloudCloudinstancesJobsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesJobsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudCloudinstancesJobsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs delete unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesJobsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs delete unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesJobsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs delete unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesJobsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs delete unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesJobsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs delete unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesJobsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances jobs delete unauthorized response +func (o *PcloudCloudinstancesJobsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesJobsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesJobsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesJobsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ func (o *PcloudCloudinstancesJobsDeleteUnauthorized) readResponse(response runti return nil } +// NewPcloudCloudinstancesJobsDeleteForbidden creates a PcloudCloudinstancesJobsDeleteForbidden with default headers values +func NewPcloudCloudinstancesJobsDeleteForbidden() *PcloudCloudinstancesJobsDeleteForbidden { + return &PcloudCloudinstancesJobsDeleteForbidden{} +} + +/* +PcloudCloudinstancesJobsDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesJobsDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances jobs delete forbidden response has a 2xx status code +func (o *PcloudCloudinstancesJobsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs delete forbidden response has a 3xx status code +func (o *PcloudCloudinstancesJobsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs delete forbidden response has a 4xx status code +func (o *PcloudCloudinstancesJobsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs delete forbidden response has a 5xx status code +func (o *PcloudCloudinstancesJobsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs delete forbidden response a status code equal to that given +func (o *PcloudCloudinstancesJobsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances jobs delete forbidden response +func (o *PcloudCloudinstancesJobsDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesJobsDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesJobsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesJobsDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesJobsDeleteForbidden) 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 +} + // NewPcloudCloudinstancesJobsDeleteNotFound creates a PcloudCloudinstancesJobsDeleteNotFound with default headers values func NewPcloudCloudinstancesJobsDeleteNotFound() *PcloudCloudinstancesJobsDeleteNotFound { return &PcloudCloudinstancesJobsDeleteNotFound{} } -/* PcloudCloudinstancesJobsDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesJobsDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudCloudinstancesJobsDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs delete not found response has a 2xx status code +func (o *PcloudCloudinstancesJobsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs delete not found response has a 3xx status code +func (o *PcloudCloudinstancesJobsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs delete not found response has a 4xx status code +func (o *PcloudCloudinstancesJobsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs delete not found response has a 5xx status code +func (o *PcloudCloudinstancesJobsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs delete not found response a status code equal to that given +func (o *PcloudCloudinstancesJobsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances jobs delete not found response +func (o *PcloudCloudinstancesJobsDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesJobsDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesJobsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesJobsDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudCloudinstancesJobsDeleteConflict() *PcloudCloudinstancesJobsDelete return &PcloudCloudinstancesJobsDeleteConflict{} } -/* PcloudCloudinstancesJobsDeleteConflict describes a response with status code 409, with default header values. +/* +PcloudCloudinstancesJobsDeleteConflict describes a response with status code 409, with default header values. Conflict */ @@ -203,9 +422,44 @@ type PcloudCloudinstancesJobsDeleteConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs delete conflict response has a 2xx status code +func (o *PcloudCloudinstancesJobsDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs delete conflict response has a 3xx status code +func (o *PcloudCloudinstancesJobsDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs delete conflict response has a 4xx status code +func (o *PcloudCloudinstancesJobsDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs delete conflict response has a 5xx status code +func (o *PcloudCloudinstancesJobsDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs delete conflict response a status code equal to that given +func (o *PcloudCloudinstancesJobsDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud cloudinstances jobs delete conflict response +func (o *PcloudCloudinstancesJobsDeleteConflict) Code() int { + return 409 +} + func (o *PcloudCloudinstancesJobsDeleteConflict) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteConflict %+v", 409, o.Payload) } + +func (o *PcloudCloudinstancesJobsDeleteConflict) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteConflict %+v", 409, o.Payload) +} + func (o *PcloudCloudinstancesJobsDeleteConflict) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudCloudinstancesJobsDeleteInternalServerError() *PcloudCloudinstance return &PcloudCloudinstancesJobsDeleteInternalServerError{} } -/* PcloudCloudinstancesJobsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesJobsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudCloudinstancesJobsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs delete internal server error response has a 2xx status code +func (o *PcloudCloudinstancesJobsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs delete internal server error response has a 3xx status code +func (o *PcloudCloudinstancesJobsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs delete internal server error response has a 4xx status code +func (o *PcloudCloudinstancesJobsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances jobs delete internal server error response has a 5xx status code +func (o *PcloudCloudinstancesJobsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances jobs delete internal server error response a status code equal to that given +func (o *PcloudCloudinstancesJobsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances jobs delete internal server error response +func (o *PcloudCloudinstancesJobsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesJobsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesJobsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesJobsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_parameters.go index 8b584354795..8ed6f789a7e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesJobsGetParamsWithHTTPClient(client *http.Client) *Pc } } -/* PcloudCloudinstancesJobsGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances jobs get operation. +/* +PcloudCloudinstancesJobsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances jobs get operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesJobsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go index b232653f032..06a8875faf6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesJobsGetReader) ReadResponse(response runtime.Client return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesJobsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesJobsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesJobsGetReader) ReadResponse(response runtime.Client } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}] pcloud.cloudinstances.jobs.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesJobsGetOK() *PcloudCloudinstancesJobsGetOK { return &PcloudCloudinstancesJobsGetOK{} } -/* PcloudCloudinstancesJobsGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesJobsGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesJobsGetOK struct { Payload *models.Job } +// IsSuccess returns true when this pcloud cloudinstances jobs get o k response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances jobs get o k response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs get o k response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances jobs get o k response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs get o k response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances jobs get o k response +func (o *PcloudCloudinstancesJobsGetOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesJobsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetOK) GetPayload() *models.Job { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesJobsGetBadRequest() *PcloudCloudinstancesJobsGetBadR return &PcloudCloudinstancesJobsGetBadRequest{} } -/* PcloudCloudinstancesJobsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesJobsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesJobsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs get bad request response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs get bad request response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs get bad request response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs get bad request response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs get bad request response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances jobs get bad request response +func (o *PcloudCloudinstancesJobsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesJobsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesJobsGetUnauthorized() *PcloudCloudinstancesJobsGetUn return &PcloudCloudinstancesJobsGetUnauthorized{} } -/* PcloudCloudinstancesJobsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesJobsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesJobsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs get unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs get unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs get unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs get unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs get unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances jobs get unauthorized response +func (o *PcloudCloudinstancesJobsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesJobsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudCloudinstancesJobsGetUnauthorized) readResponse(response runtime. return nil } +// NewPcloudCloudinstancesJobsGetForbidden creates a PcloudCloudinstancesJobsGetForbidden with default headers values +func NewPcloudCloudinstancesJobsGetForbidden() *PcloudCloudinstancesJobsGetForbidden { + return &PcloudCloudinstancesJobsGetForbidden{} +} + +/* +PcloudCloudinstancesJobsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesJobsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances jobs get forbidden response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs get forbidden response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs get forbidden response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs get forbidden response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs get forbidden response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances jobs get forbidden response +func (o *PcloudCloudinstancesJobsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesJobsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesJobsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesJobsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesJobsGetForbidden) 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 +} + // NewPcloudCloudinstancesJobsGetNotFound creates a PcloudCloudinstancesJobsGetNotFound with default headers values func NewPcloudCloudinstancesJobsGetNotFound() *PcloudCloudinstancesJobsGetNotFound { return &PcloudCloudinstancesJobsGetNotFound{} } -/* PcloudCloudinstancesJobsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesJobsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesJobsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs get not found response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs get not found response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs get not found response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs get not found response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs get not found response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances jobs get not found response +func (o *PcloudCloudinstancesJobsGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesJobsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesJobsGetInternalServerError() *PcloudCloudinstancesJo return &PcloudCloudinstancesJobsGetInternalServerError{} } -/* PcloudCloudinstancesJobsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesJobsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesJobsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs get internal server error response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs get internal server error response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs get internal server error response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances jobs get internal server error response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances jobs get internal server error response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances jobs get internal server error response +func (o *PcloudCloudinstancesJobsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesJobsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs/{job_id}][%d] pcloudCloudinstancesJobsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_parameters.go index 50646a09eb0..6a330511918 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesJobsGetallParamsWithHTTPClient(client *http.Client) } } -/* PcloudCloudinstancesJobsGetallParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances jobs getall operation. +/* +PcloudCloudinstancesJobsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances jobs getall operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesJobsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go index d3b942e52ff..543855da37a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesJobsGetallReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesJobsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesJobsGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesJobsGetallReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs] pcloud.cloudinstances.jobs.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesJobsGetallOK() *PcloudCloudinstancesJobsGetallOK { return &PcloudCloudinstancesJobsGetallOK{} } -/* PcloudCloudinstancesJobsGetallOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesJobsGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesJobsGetallOK struct { Payload *models.Jobs } +// IsSuccess returns true when this pcloud cloudinstances jobs getall o k response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances jobs getall o k response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs getall o k response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances jobs getall o k response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs getall o k response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances jobs getall o k response +func (o *PcloudCloudinstancesJobsGetallOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesJobsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetallOK) GetPayload() *models.Jobs { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesJobsGetallBadRequest() *PcloudCloudinstancesJobsGeta return &PcloudCloudinstancesJobsGetallBadRequest{} } -/* PcloudCloudinstancesJobsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesJobsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesJobsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs getall bad request response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs getall bad request response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs getall bad request response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs getall bad request response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs getall bad request response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances jobs getall bad request response +func (o *PcloudCloudinstancesJobsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesJobsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesJobsGetallUnauthorized() *PcloudCloudinstancesJobsGe return &PcloudCloudinstancesJobsGetallUnauthorized{} } -/* PcloudCloudinstancesJobsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesJobsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesJobsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs getall unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs getall unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs getall unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs getall unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs getall unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances jobs getall unauthorized response +func (o *PcloudCloudinstancesJobsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesJobsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudCloudinstancesJobsGetallUnauthorized) readResponse(response runti return nil } +// NewPcloudCloudinstancesJobsGetallForbidden creates a PcloudCloudinstancesJobsGetallForbidden with default headers values +func NewPcloudCloudinstancesJobsGetallForbidden() *PcloudCloudinstancesJobsGetallForbidden { + return &PcloudCloudinstancesJobsGetallForbidden{} +} + +/* +PcloudCloudinstancesJobsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesJobsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances jobs getall forbidden response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs getall forbidden response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs getall forbidden response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs getall forbidden response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs getall forbidden response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances jobs getall forbidden response +func (o *PcloudCloudinstancesJobsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesJobsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesJobsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesJobsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesJobsGetallForbidden) 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 +} + // NewPcloudCloudinstancesJobsGetallNotFound creates a PcloudCloudinstancesJobsGetallNotFound with default headers values func NewPcloudCloudinstancesJobsGetallNotFound() *PcloudCloudinstancesJobsGetallNotFound { return &PcloudCloudinstancesJobsGetallNotFound{} } -/* PcloudCloudinstancesJobsGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesJobsGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesJobsGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs getall not found response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs getall not found response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs getall not found response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances jobs getall not found response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances jobs getall not found response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances jobs getall not found response +func (o *PcloudCloudinstancesJobsGetallNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesJobsGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesJobsGetallInternalServerError() *PcloudCloudinstance return &PcloudCloudinstancesJobsGetallInternalServerError{} } -/* PcloudCloudinstancesJobsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesJobsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesJobsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances jobs getall internal server error response has a 2xx status code +func (o *PcloudCloudinstancesJobsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances jobs getall internal server error response has a 3xx status code +func (o *PcloudCloudinstancesJobsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances jobs getall internal server error response has a 4xx status code +func (o *PcloudCloudinstancesJobsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances jobs getall internal server error response has a 5xx status code +func (o *PcloudCloudinstancesJobsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances jobs getall internal server error response a status code equal to that given +func (o *PcloudCloudinstancesJobsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances jobs getall internal server error response +func (o *PcloudCloudinstancesJobsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesJobsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesJobsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/jobs][%d] pcloudCloudinstancesJobsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesJobsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/p_cloud_networks_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/p_cloud_networks_client.go index 5a08ce2c9b4..438b0652eeb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/p_cloud_networks_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/p_cloud_networks_client.go @@ -54,7 +54,7 @@ type ClientService interface { } /* - PcloudNetworksDelete deletes a network +PcloudNetworksDelete deletes a network */ func (a *Client) PcloudNetworksDelete(params *PcloudNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksDeleteOK, error) { // TODO: Validate the params before sending @@ -93,7 +93,7 @@ func (a *Client) PcloudNetworksDelete(params *PcloudNetworksDeleteParams, authIn } /* - PcloudNetworksGet gets a network s current state information +PcloudNetworksGet gets a network s current state information */ func (a *Client) PcloudNetworksGet(params *PcloudNetworksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksGetOK, error) { // TODO: Validate the params before sending @@ -132,7 +132,7 @@ func (a *Client) PcloudNetworksGet(params *PcloudNetworksGetParams, authInfo run } /* - PcloudNetworksGetall gets all networks in this cloud instance +PcloudNetworksGetall gets all networks in this cloud instance */ func (a *Client) PcloudNetworksGetall(params *PcloudNetworksGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksGetallOK, error) { // TODO: Validate the params before sending @@ -171,7 +171,7 @@ func (a *Client) PcloudNetworksGetall(params *PcloudNetworksGetallParams, authIn } /* - PcloudNetworksPortsDelete deletes a network port +PcloudNetworksPortsDelete deletes a network port */ func (a *Client) PcloudNetworksPortsDelete(params *PcloudNetworksPortsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsDeleteOK, error) { // TODO: Validate the params before sending @@ -210,7 +210,7 @@ func (a *Client) PcloudNetworksPortsDelete(params *PcloudNetworksPortsDeletePara } /* - PcloudNetworksPortsGet gets a port s information +PcloudNetworksPortsGet gets a port s information */ func (a *Client) PcloudNetworksPortsGet(params *PcloudNetworksPortsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsGetOK, error) { // TODO: Validate the params before sending @@ -249,7 +249,7 @@ func (a *Client) PcloudNetworksPortsGet(params *PcloudNetworksPortsGetParams, au } /* - PcloudNetworksPortsGetall gets all ports for this network +PcloudNetworksPortsGetall gets all ports for this network */ func (a *Client) PcloudNetworksPortsGetall(params *PcloudNetworksPortsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsGetallOK, error) { // TODO: Validate the params before sending @@ -288,7 +288,7 @@ func (a *Client) PcloudNetworksPortsGetall(params *PcloudNetworksPortsGetallPara } /* - PcloudNetworksPortsPost performs port addition deletion and listing +PcloudNetworksPortsPost performs port addition deletion and listing */ func (a *Client) PcloudNetworksPortsPost(params *PcloudNetworksPortsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsPostCreated, error) { // TODO: Validate the params before sending @@ -327,7 +327,7 @@ func (a *Client) PcloudNetworksPortsPost(params *PcloudNetworksPortsPostParams, } /* - PcloudNetworksPortsPut updates a port s information +PcloudNetworksPortsPut updates a port s information */ func (a *Client) PcloudNetworksPortsPut(params *PcloudNetworksPortsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPortsPutOK, error) { // TODO: Validate the params before sending @@ -366,7 +366,7 @@ func (a *Client) PcloudNetworksPortsPut(params *PcloudNetworksPortsPutParams, au } /* - PcloudNetworksPost creates a new network +PcloudNetworksPost creates a new network */ func (a *Client) PcloudNetworksPost(params *PcloudNetworksPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPostOK, *PcloudNetworksPostCreated, error) { // TODO: Validate the params before sending @@ -406,7 +406,7 @@ func (a *Client) PcloudNetworksPost(params *PcloudNetworksPostParams, authInfo r } /* - PcloudNetworksPut updates a network +PcloudNetworksPut updates a network */ func (a *Client) PcloudNetworksPut(params *PcloudNetworksPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudNetworksPutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_parameters.go index ed9fd5e8b66..22bce1a9819 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudNetworksDeleteParamsWithHTTPClient(client *http.Client) *PcloudNet } } -/* PcloudNetworksDeleteParams contains all the parameters to send to the API endpoint - for the pcloud networks delete operation. +/* +PcloudNetworksDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks delete operation. + + Typically these are written to a http.Request. */ type PcloudNetworksDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go index 8d00b97eb43..817554ecd3f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_delete_responses.go @@ -41,6 +41,12 @@ func (o *PcloudNetworksDeleteReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 403: + result := NewPcloudNetworksDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudNetworksDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudNetworksDeleteReader) ReadResponse(response runtime.ClientRespons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}] pcloud.networks.delete", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudNetworksDeleteOK() *PcloudNetworksDeleteOK { return &PcloudNetworksDeleteOK{} } -/* PcloudNetworksDeleteOK describes a response with status code 200, with default header values. +/* +PcloudNetworksDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudNetworksDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud networks delete o k response has a 2xx status code +func (o *PcloudNetworksDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks delete o k response has a 3xx status code +func (o *PcloudNetworksDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks delete o k response has a 4xx status code +func (o *PcloudNetworksDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks delete o k response has a 5xx status code +func (o *PcloudNetworksDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks delete o k response a status code equal to that given +func (o *PcloudNetworksDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks delete o k response +func (o *PcloudNetworksDeleteOK) Code() int { + return 200 +} + func (o *PcloudNetworksDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudNetworksDeleteBadRequest() *PcloudNetworksDeleteBadRequest { return &PcloudNetworksDeleteBadRequest{} } -/* PcloudNetworksDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudNetworksDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks delete bad request response has a 2xx status code +func (o *PcloudNetworksDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks delete bad request response has a 3xx status code +func (o *PcloudNetworksDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks delete bad request response has a 4xx status code +func (o *PcloudNetworksDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks delete bad request response has a 5xx status code +func (o *PcloudNetworksDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks delete bad request response a status code equal to that given +func (o *PcloudNetworksDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks delete bad request response +func (o *PcloudNetworksDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudNetworksDeleteUnauthorized() *PcloudNetworksDeleteUnauthorized { return &PcloudNetworksDeleteUnauthorized{} } -/* PcloudNetworksDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudNetworksDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks delete unauthorized response has a 2xx status code +func (o *PcloudNetworksDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks delete unauthorized response has a 3xx status code +func (o *PcloudNetworksDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks delete unauthorized response has a 4xx status code +func (o *PcloudNetworksDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks delete unauthorized response has a 5xx status code +func (o *PcloudNetworksDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks delete unauthorized response a status code equal to that given +func (o *PcloudNetworksDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks delete unauthorized response +func (o *PcloudNetworksDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ func (o *PcloudNetworksDeleteUnauthorized) readResponse(response runtime.ClientR return nil } +// NewPcloudNetworksDeleteForbidden creates a PcloudNetworksDeleteForbidden with default headers values +func NewPcloudNetworksDeleteForbidden() *PcloudNetworksDeleteForbidden { + return &PcloudNetworksDeleteForbidden{} +} + +/* +PcloudNetworksDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks delete forbidden response has a 2xx status code +func (o *PcloudNetworksDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks delete forbidden response has a 3xx status code +func (o *PcloudNetworksDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks delete forbidden response has a 4xx status code +func (o *PcloudNetworksDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks delete forbidden response has a 5xx status code +func (o *PcloudNetworksDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks delete forbidden response a status code equal to that given +func (o *PcloudNetworksDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks delete forbidden response +func (o *PcloudNetworksDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksDeleteForbidden) 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 +} + // NewPcloudNetworksDeleteNotFound creates a PcloudNetworksDeleteNotFound with default headers values func NewPcloudNetworksDeleteNotFound() *PcloudNetworksDeleteNotFound { return &PcloudNetworksDeleteNotFound{} } -/* PcloudNetworksDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudNetworksDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudNetworksDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks delete not found response has a 2xx status code +func (o *PcloudNetworksDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks delete not found response has a 3xx status code +func (o *PcloudNetworksDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks delete not found response has a 4xx status code +func (o *PcloudNetworksDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks delete not found response has a 5xx status code +func (o *PcloudNetworksDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks delete not found response a status code equal to that given +func (o *PcloudNetworksDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks delete not found response +func (o *PcloudNetworksDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudNetworksDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudNetworksDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudNetworksDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudNetworksDeleteGone() *PcloudNetworksDeleteGone { return &PcloudNetworksDeleteGone{} } -/* PcloudNetworksDeleteGone describes a response with status code 410, with default header values. +/* +PcloudNetworksDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -203,9 +422,44 @@ type PcloudNetworksDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks delete gone response has a 2xx status code +func (o *PcloudNetworksDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks delete gone response has a 3xx status code +func (o *PcloudNetworksDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks delete gone response has a 4xx status code +func (o *PcloudNetworksDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks delete gone response has a 5xx status code +func (o *PcloudNetworksDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks delete gone response a status code equal to that given +func (o *PcloudNetworksDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud networks delete gone response +func (o *PcloudNetworksDeleteGone) Code() int { + return 410 +} + func (o *PcloudNetworksDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudNetworksDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudNetworksDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudNetworksDeleteInternalServerError() *PcloudNetworksDeleteInternalS return &PcloudNetworksDeleteInternalServerError{} } -/* PcloudNetworksDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudNetworksDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks delete internal server error response has a 2xx status code +func (o *PcloudNetworksDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks delete internal server error response has a 3xx status code +func (o *PcloudNetworksDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks delete internal server error response has a 4xx status code +func (o *PcloudNetworksDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks delete internal server error response has a 5xx status code +func (o *PcloudNetworksDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks delete internal server error response a status code equal to that given +func (o *PcloudNetworksDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks delete internal server error response +func (o *PcloudNetworksDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_parameters.go index a9694c898a4..f5ce21af40c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudNetworksGetParamsWithHTTPClient(client *http.Client) *PcloudNetwor } } -/* PcloudNetworksGetParams contains all the parameters to send to the API endpoint - for the pcloud networks get operation. +/* +PcloudNetworksGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks get operation. + + Typically these are written to a http.Request. */ type PcloudNetworksGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go index d66f5f1b203..246ae8e307b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudNetworksGetReader) ReadResponse(response runtime.ClientResponse, return nil, err } return nil, result + case 403: + result := NewPcloudNetworksGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudNetworksGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudNetworksGetReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}] pcloud.networks.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudNetworksGetOK() *PcloudNetworksGetOK { return &PcloudNetworksGetOK{} } -/* PcloudNetworksGetOK describes a response with status code 200, with default header values. +/* +PcloudNetworksGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudNetworksGetOK struct { Payload *models.Network } +// IsSuccess returns true when this pcloud networks get o k response has a 2xx status code +func (o *PcloudNetworksGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks get o k response has a 3xx status code +func (o *PcloudNetworksGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks get o k response has a 4xx status code +func (o *PcloudNetworksGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks get o k response has a 5xx status code +func (o *PcloudNetworksGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks get o k response a status code equal to that given +func (o *PcloudNetworksGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks get o k response +func (o *PcloudNetworksGetOK) Code() int { + return 200 +} + func (o *PcloudNetworksGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksGetOK) GetPayload() *models.Network { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudNetworksGetBadRequest() *PcloudNetworksGetBadRequest { return &PcloudNetworksGetBadRequest{} } -/* PcloudNetworksGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudNetworksGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks get bad request response has a 2xx status code +func (o *PcloudNetworksGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks get bad request response has a 3xx status code +func (o *PcloudNetworksGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks get bad request response has a 4xx status code +func (o *PcloudNetworksGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks get bad request response has a 5xx status code +func (o *PcloudNetworksGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks get bad request response a status code equal to that given +func (o *PcloudNetworksGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks get bad request response +func (o *PcloudNetworksGetBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudNetworksGetUnauthorized() *PcloudNetworksGetUnauthorized { return &PcloudNetworksGetUnauthorized{} } -/* PcloudNetworksGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudNetworksGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks get unauthorized response has a 2xx status code +func (o *PcloudNetworksGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks get unauthorized response has a 3xx status code +func (o *PcloudNetworksGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks get unauthorized response has a 4xx status code +func (o *PcloudNetworksGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks get unauthorized response has a 5xx status code +func (o *PcloudNetworksGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks get unauthorized response a status code equal to that given +func (o *PcloudNetworksGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks get unauthorized response +func (o *PcloudNetworksGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudNetworksGetUnauthorized) readResponse(response runtime.ClientResp return nil } +// NewPcloudNetworksGetForbidden creates a PcloudNetworksGetForbidden with default headers values +func NewPcloudNetworksGetForbidden() *PcloudNetworksGetForbidden { + return &PcloudNetworksGetForbidden{} +} + +/* +PcloudNetworksGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks get forbidden response has a 2xx status code +func (o *PcloudNetworksGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks get forbidden response has a 3xx status code +func (o *PcloudNetworksGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks get forbidden response has a 4xx status code +func (o *PcloudNetworksGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks get forbidden response has a 5xx status code +func (o *PcloudNetworksGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks get forbidden response a status code equal to that given +func (o *PcloudNetworksGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks get forbidden response +func (o *PcloudNetworksGetForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksGetForbidden) 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 +} + // NewPcloudNetworksGetNotFound creates a PcloudNetworksGetNotFound with default headers values func NewPcloudNetworksGetNotFound() *PcloudNetworksGetNotFound { return &PcloudNetworksGetNotFound{} } -/* PcloudNetworksGetNotFound describes a response with status code 404, with default header values. +/* +PcloudNetworksGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudNetworksGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks get not found response has a 2xx status code +func (o *PcloudNetworksGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks get not found response has a 3xx status code +func (o *PcloudNetworksGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks get not found response has a 4xx status code +func (o *PcloudNetworksGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks get not found response has a 5xx status code +func (o *PcloudNetworksGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks get not found response a status code equal to that given +func (o *PcloudNetworksGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks get not found response +func (o *PcloudNetworksGetNotFound) Code() int { + return 404 +} + func (o *PcloudNetworksGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudNetworksGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudNetworksGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudNetworksGetInternalServerError() *PcloudNetworksGetInternalServerE return &PcloudNetworksGetInternalServerError{} } -/* PcloudNetworksGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudNetworksGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks get internal server error response has a 2xx status code +func (o *PcloudNetworksGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks get internal server error response has a 3xx status code +func (o *PcloudNetworksGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks get internal server error response has a 4xx status code +func (o *PcloudNetworksGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks get internal server error response has a 5xx status code +func (o *PcloudNetworksGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks get internal server error response a status code equal to that given +func (o *PcloudNetworksGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks get internal server error response +func (o *PcloudNetworksGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_parameters.go index 3ec2e1b918a..a1d644b55ab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudNetworksGetallParamsWithHTTPClient(client *http.Client) *PcloudNet } } -/* PcloudNetworksGetallParams contains all the parameters to send to the API endpoint - for the pcloud networks getall operation. +/* +PcloudNetworksGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks getall operation. + + Typically these are written to a http.Request. */ type PcloudNetworksGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go index fd07134b23a..4be69f487d2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudNetworksGetallReader) ReadResponse(response runtime.ClientRespons return nil, err } return nil, result + case 403: + result := NewPcloudNetworksGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -48,7 +60,7 @@ func (o *PcloudNetworksGetallReader) ReadResponse(response runtime.ClientRespons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks] pcloud.networks.getall", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudNetworksGetallOK() *PcloudNetworksGetallOK { return &PcloudNetworksGetallOK{} } -/* PcloudNetworksGetallOK describes a response with status code 200, with default header values. +/* +PcloudNetworksGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudNetworksGetallOK struct { Payload *models.Networks } +// IsSuccess returns true when this pcloud networks getall o k response has a 2xx status code +func (o *PcloudNetworksGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks getall o k response has a 3xx status code +func (o *PcloudNetworksGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks getall o k response has a 4xx status code +func (o *PcloudNetworksGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks getall o k response has a 5xx status code +func (o *PcloudNetworksGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks getall o k response a status code equal to that given +func (o *PcloudNetworksGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks getall o k response +func (o *PcloudNetworksGetallOK) Code() int { + return 200 +} + func (o *PcloudNetworksGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksGetallOK) GetPayload() *models.Networks { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudNetworksGetallBadRequest() *PcloudNetworksGetallBadRequest { return &PcloudNetworksGetallBadRequest{} } -/* PcloudNetworksGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudNetworksGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks getall bad request response has a 2xx status code +func (o *PcloudNetworksGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks getall bad request response has a 3xx status code +func (o *PcloudNetworksGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks getall bad request response has a 4xx status code +func (o *PcloudNetworksGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks getall bad request response has a 5xx status code +func (o *PcloudNetworksGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks getall bad request response a status code equal to that given +func (o *PcloudNetworksGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks getall bad request response +func (o *PcloudNetworksGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudNetworksGetallUnauthorized() *PcloudNetworksGetallUnauthorized { return &PcloudNetworksGetallUnauthorized{} } -/* PcloudNetworksGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudNetworksGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks getall unauthorized response has a 2xx status code +func (o *PcloudNetworksGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks getall unauthorized response has a 3xx status code +func (o *PcloudNetworksGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks getall unauthorized response has a 4xx status code +func (o *PcloudNetworksGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks getall unauthorized response has a 5xx status code +func (o *PcloudNetworksGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks getall unauthorized response a status code equal to that given +func (o *PcloudNetworksGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks getall unauthorized response +func (o *PcloudNetworksGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudNetworksGetallUnauthorized) readResponse(response runtime.ClientR return nil } +// NewPcloudNetworksGetallForbidden creates a PcloudNetworksGetallForbidden with default headers values +func NewPcloudNetworksGetallForbidden() *PcloudNetworksGetallForbidden { + return &PcloudNetworksGetallForbidden{} +} + +/* +PcloudNetworksGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks getall forbidden response has a 2xx status code +func (o *PcloudNetworksGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks getall forbidden response has a 3xx status code +func (o *PcloudNetworksGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks getall forbidden response has a 4xx status code +func (o *PcloudNetworksGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks getall forbidden response has a 5xx status code +func (o *PcloudNetworksGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks getall forbidden response a status code equal to that given +func (o *PcloudNetworksGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks getall forbidden response +func (o *PcloudNetworksGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksGetallForbidden) 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 +} + +// 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{} } -/* PcloudNetworksGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudNetworksGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks getall internal server error response has a 2xx status code +func (o *PcloudNetworksGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks getall internal server error response has a 3xx status code +func (o *PcloudNetworksGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks getall internal server error response has a 4xx status code +func (o *PcloudNetworksGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks getall internal server error response has a 5xx status code +func (o *PcloudNetworksGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks getall internal server error response a status code equal to that given +func (o *PcloudNetworksGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks getall internal server error response +func (o *PcloudNetworksGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_parameters.go index 2782cd9eb0d..89b04912c3b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudNetworksPortsDeleteParamsWithHTTPClient(client *http.Client) *Pclo } } -/* PcloudNetworksPortsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud networks ports delete operation. +/* +PcloudNetworksPortsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks ports delete operation. + + Typically these are written to a http.Request. */ type PcloudNetworksPortsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go index 45c94b0225b..fbfd8646605 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go @@ -41,6 +41,18 @@ func (o *PcloudNetworksPortsDeleteReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 403: + result := NewPcloudNetworksPortsDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudNetworksPortsDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewPcloudNetworksPortsDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +66,7 @@ func (o *PcloudNetworksPortsDeleteReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}] pcloud.networks.ports.delete", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudNetworksPortsDeleteOK() *PcloudNetworksPortsDeleteOK { return &PcloudNetworksPortsDeleteOK{} } -/* PcloudNetworksPortsDeleteOK describes a response with status code 200, with default header values. +/* +PcloudNetworksPortsDeleteOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudNetworksPortsDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud networks ports delete o k response has a 2xx status code +func (o *PcloudNetworksPortsDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks ports delete o k response has a 3xx status code +func (o *PcloudNetworksPortsDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports delete o k response has a 4xx status code +func (o *PcloudNetworksPortsDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports delete o k response has a 5xx status code +func (o *PcloudNetworksPortsDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports delete o k response a status code equal to that given +func (o *PcloudNetworksPortsDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks ports delete o k response +func (o *PcloudNetworksPortsDeleteOK) Code() int { + return 200 +} + func (o *PcloudNetworksPortsDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksPortsDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksPortsDeleteOK) GetPayload() models.Object { return o.Payload } @@ -93,7 +141,8 @@ func NewPcloudNetworksPortsDeleteBadRequest() *PcloudNetworksPortsDeleteBadReque return &PcloudNetworksPortsDeleteBadRequest{} } -/* PcloudNetworksPortsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksPortsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +150,44 @@ type PcloudNetworksPortsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports delete bad request response has a 2xx status code +func (o *PcloudNetworksPortsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports delete bad request response has a 3xx status code +func (o *PcloudNetworksPortsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports delete bad request response has a 4xx status code +func (o *PcloudNetworksPortsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports delete bad request response has a 5xx status code +func (o *PcloudNetworksPortsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports delete bad request response a status code equal to that given +func (o *PcloudNetworksPortsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks ports delete bad request response +func (o *PcloudNetworksPortsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksPortsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksPortsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksPortsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -125,7 +209,8 @@ func NewPcloudNetworksPortsDeleteUnauthorized() *PcloudNetworksPortsDeleteUnauth return &PcloudNetworksPortsDeleteUnauthorized{} } -/* PcloudNetworksPortsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksPortsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -133,9 +218,44 @@ type PcloudNetworksPortsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports delete unauthorized response has a 2xx status code +func (o *PcloudNetworksPortsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports delete unauthorized response has a 3xx status code +func (o *PcloudNetworksPortsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports delete unauthorized response has a 4xx status code +func (o *PcloudNetworksPortsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports delete unauthorized response has a 5xx status code +func (o *PcloudNetworksPortsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports delete unauthorized response a status code equal to that given +func (o *PcloudNetworksPortsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks ports delete unauthorized response +func (o *PcloudNetworksPortsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksPortsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksPortsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksPortsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -152,12 +272,149 @@ func (o *PcloudNetworksPortsDeleteUnauthorized) readResponse(response runtime.Cl return nil } +// NewPcloudNetworksPortsDeleteForbidden creates a PcloudNetworksPortsDeleteForbidden with default headers values +func NewPcloudNetworksPortsDeleteForbidden() *PcloudNetworksPortsDeleteForbidden { + return &PcloudNetworksPortsDeleteForbidden{} +} + +/* +PcloudNetworksPortsDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksPortsDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports delete forbidden response has a 2xx status code +func (o *PcloudNetworksPortsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports delete forbidden response has a 3xx status code +func (o *PcloudNetworksPortsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports delete forbidden response has a 4xx status code +func (o *PcloudNetworksPortsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports delete forbidden response has a 5xx status code +func (o *PcloudNetworksPortsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports delete forbidden response a status code equal to that given +func (o *PcloudNetworksPortsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks ports delete forbidden response +func (o *PcloudNetworksPortsDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksPortsDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsDeleteForbidden) 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 +} + +// NewPcloudNetworksPortsDeleteNotFound creates a PcloudNetworksPortsDeleteNotFound with default headers values +func NewPcloudNetworksPortsDeleteNotFound() *PcloudNetworksPortsDeleteNotFound { + return &PcloudNetworksPortsDeleteNotFound{} +} + +/* +PcloudNetworksPortsDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudNetworksPortsDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports delete not found response has a 2xx status code +func (o *PcloudNetworksPortsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports delete not found response has a 3xx status code +func (o *PcloudNetworksPortsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports delete not found response has a 4xx status code +func (o *PcloudNetworksPortsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports delete not found response has a 5xx status code +func (o *PcloudNetworksPortsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports delete not found response a status code equal to that given +func (o *PcloudNetworksPortsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks ports delete not found response +func (o *PcloudNetworksPortsDeleteNotFound) Code() int { + return 404 +} + +func (o *PcloudNetworksPortsDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPortsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPortsDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsDeleteNotFound) 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 +} + // NewPcloudNetworksPortsDeleteGone creates a PcloudNetworksPortsDeleteGone with default headers values func NewPcloudNetworksPortsDeleteGone() *PcloudNetworksPortsDeleteGone { return &PcloudNetworksPortsDeleteGone{} } -/* PcloudNetworksPortsDeleteGone describes a response with status code 410, with default header values. +/* +PcloudNetworksPortsDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -165,9 +422,44 @@ type PcloudNetworksPortsDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports delete gone response has a 2xx status code +func (o *PcloudNetworksPortsDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports delete gone response has a 3xx status code +func (o *PcloudNetworksPortsDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports delete gone response has a 4xx status code +func (o *PcloudNetworksPortsDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports delete gone response has a 5xx status code +func (o *PcloudNetworksPortsDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports delete gone response a status code equal to that given +func (o *PcloudNetworksPortsDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud networks ports delete gone response +func (o *PcloudNetworksPortsDeleteGone) Code() int { + return 410 +} + func (o *PcloudNetworksPortsDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudNetworksPortsDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudNetworksPortsDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -189,7 +481,8 @@ func NewPcloudNetworksPortsDeleteInternalServerError() *PcloudNetworksPortsDelet return &PcloudNetworksPortsDeleteInternalServerError{} } -/* PcloudNetworksPortsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksPortsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +490,44 @@ type PcloudNetworksPortsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports delete internal server error response has a 2xx status code +func (o *PcloudNetworksPortsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports delete internal server error response has a 3xx status code +func (o *PcloudNetworksPortsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports delete internal server error response has a 4xx status code +func (o *PcloudNetworksPortsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports delete internal server error response has a 5xx status code +func (o *PcloudNetworksPortsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks ports delete internal server error response a status code equal to that given +func (o *PcloudNetworksPortsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks ports delete internal server error response +func (o *PcloudNetworksPortsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksPortsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksPortsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksPortsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_parameters.go index cced0387781..032ff418a8c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudNetworksPortsGetParamsWithHTTPClient(client *http.Client) *PcloudN } } -/* PcloudNetworksPortsGetParams contains all the parameters to send to the API endpoint - for the pcloud networks ports get operation. +/* +PcloudNetworksPortsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks ports get operation. + + Typically these are written to a http.Request. */ type PcloudNetworksPortsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go index 70ff78c3f8a..23eef77d451 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go @@ -29,12 +29,24 @@ 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 { return nil, err } return nil, result + case 403: + result := NewPcloudNetworksPortsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudNetworksPortsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudNetworksPortsGetReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}] pcloud.networks.ports.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudNetworksPortsGetOK() *PcloudNetworksPortsGetOK { return &PcloudNetworksPortsGetOK{} } -/* PcloudNetworksPortsGetOK describes a response with status code 200, with default header values. +/* +PcloudNetworksPortsGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudNetworksPortsGetOK struct { Payload *models.NetworkPort } +// IsSuccess returns true when this pcloud networks ports get o k response has a 2xx status code +func (o *PcloudNetworksPortsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks ports get o k response has a 3xx status code +func (o *PcloudNetworksPortsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports get o k response has a 4xx status code +func (o *PcloudNetworksPortsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports get o k response has a 5xx status code +func (o *PcloudNetworksPortsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports get o k response a status code equal to that given +func (o *PcloudNetworksPortsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks ports get o k response +func (o *PcloudNetworksPortsGetOK) Code() int { + return 200 +} + func (o *PcloudNetworksPortsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksPortsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksPortsGetOK) GetPayload() *models.NetworkPort { return o.Payload } @@ -84,12 +132,81 @@ 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{} } -/* PcloudNetworksPortsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksPortsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudNetworksPortsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports get unauthorized response has a 2xx status code +func (o *PcloudNetworksPortsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports get unauthorized response has a 3xx status code +func (o *PcloudNetworksPortsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports get unauthorized response has a 4xx status code +func (o *PcloudNetworksPortsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports get unauthorized response has a 5xx status code +func (o *PcloudNetworksPortsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports get unauthorized response a status code equal to that given +func (o *PcloudNetworksPortsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks ports get unauthorized response +func (o *PcloudNetworksPortsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksPortsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksPortsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksPortsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ func (o *PcloudNetworksPortsGetUnauthorized) readResponse(response runtime.Clien return nil } +// NewPcloudNetworksPortsGetForbidden creates a PcloudNetworksPortsGetForbidden with default headers values +func NewPcloudNetworksPortsGetForbidden() *PcloudNetworksPortsGetForbidden { + return &PcloudNetworksPortsGetForbidden{} +} + +/* +PcloudNetworksPortsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksPortsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports get forbidden response has a 2xx status code +func (o *PcloudNetworksPortsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports get forbidden response has a 3xx status code +func (o *PcloudNetworksPortsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports get forbidden response has a 4xx status code +func (o *PcloudNetworksPortsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports get forbidden response has a 5xx status code +func (o *PcloudNetworksPortsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports get forbidden response a status code equal to that given +func (o *PcloudNetworksPortsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks ports get forbidden response +func (o *PcloudNetworksPortsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksPortsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsGetForbidden) 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 +} + // NewPcloudNetworksPortsGetNotFound creates a PcloudNetworksPortsGetNotFound with default headers values func NewPcloudNetworksPortsGetNotFound() *PcloudNetworksPortsGetNotFound { return &PcloudNetworksPortsGetNotFound{} } -/* PcloudNetworksPortsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudNetworksPortsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudNetworksPortsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports get not found response has a 2xx status code +func (o *PcloudNetworksPortsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports get not found response has a 3xx status code +func (o *PcloudNetworksPortsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports get not found response has a 4xx status code +func (o *PcloudNetworksPortsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports get not found response has a 5xx status code +func (o *PcloudNetworksPortsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports get not found response a status code equal to that given +func (o *PcloudNetworksPortsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks ports get not found response +func (o *PcloudNetworksPortsGetNotFound) Code() int { + return 404 +} + func (o *PcloudNetworksPortsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudNetworksPortsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudNetworksPortsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudNetworksPortsGetInternalServerError() *PcloudNetworksPortsGetInter return &PcloudNetworksPortsGetInternalServerError{} } -/* PcloudNetworksPortsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksPortsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudNetworksPortsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports get internal server error response has a 2xx status code +func (o *PcloudNetworksPortsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports get internal server error response has a 3xx status code +func (o *PcloudNetworksPortsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports get internal server error response has a 4xx status code +func (o *PcloudNetworksPortsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports get internal server error response has a 5xx status code +func (o *PcloudNetworksPortsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks ports get internal server error response a status code equal to that given +func (o *PcloudNetworksPortsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks ports get internal server error response +func (o *PcloudNetworksPortsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksPortsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksPortsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksPortsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_parameters.go index bae1e68171f..6197e3c6c29 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudNetworksPortsGetallParamsWithHTTPClient(client *http.Client) *Pclo } } -/* PcloudNetworksPortsGetallParams contains all the parameters to send to the API endpoint - for the pcloud networks ports getall operation. +/* +PcloudNetworksPortsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks ports getall operation. + + Typically these are written to a http.Request. */ type PcloudNetworksPortsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go index 4c5a21006cf..ffe3498ce91 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudNetworksPortsGetallReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 403: + result := NewPcloudNetworksPortsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudNetworksPortsGetallNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudNetworksPortsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudNetworksPortsGetallReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports] pcloud.networks.ports.getall", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudNetworksPortsGetallOK() *PcloudNetworksPortsGetallOK { return &PcloudNetworksPortsGetallOK{} } -/* PcloudNetworksPortsGetallOK describes a response with status code 200, with default header values. +/* +PcloudNetworksPortsGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudNetworksPortsGetallOK struct { Payload *models.NetworkPorts } +// IsSuccess returns true when this pcloud networks ports getall o k response has a 2xx status code +func (o *PcloudNetworksPortsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks ports getall o k response has a 3xx status code +func (o *PcloudNetworksPortsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports getall o k response has a 4xx status code +func (o *PcloudNetworksPortsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports getall o k response has a 5xx status code +func (o *PcloudNetworksPortsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports getall o k response a status code equal to that given +func (o *PcloudNetworksPortsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks ports getall o k response +func (o *PcloudNetworksPortsGetallOK) Code() int { + return 200 +} + func (o *PcloudNetworksPortsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksPortsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksPortsGetallOK) GetPayload() *models.NetworkPorts { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudNetworksPortsGetallBadRequest() *PcloudNetworksPortsGetallBadReque return &PcloudNetworksPortsGetallBadRequest{} } -/* PcloudNetworksPortsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksPortsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudNetworksPortsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports getall bad request response has a 2xx status code +func (o *PcloudNetworksPortsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports getall bad request response has a 3xx status code +func (o *PcloudNetworksPortsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports getall bad request response has a 4xx status code +func (o *PcloudNetworksPortsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports getall bad request response has a 5xx status code +func (o *PcloudNetworksPortsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports getall bad request response a status code equal to that given +func (o *PcloudNetworksPortsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks ports getall bad request response +func (o *PcloudNetworksPortsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksPortsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksPortsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksPortsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudNetworksPortsGetallUnauthorized() *PcloudNetworksPortsGetallUnauth return &PcloudNetworksPortsGetallUnauthorized{} } -/* PcloudNetworksPortsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksPortsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudNetworksPortsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports getall unauthorized response has a 2xx status code +func (o *PcloudNetworksPortsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports getall unauthorized response has a 3xx status code +func (o *PcloudNetworksPortsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports getall unauthorized response has a 4xx status code +func (o *PcloudNetworksPortsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports getall unauthorized response has a 5xx status code +func (o *PcloudNetworksPortsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports getall unauthorized response a status code equal to that given +func (o *PcloudNetworksPortsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks ports getall unauthorized response +func (o *PcloudNetworksPortsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksPortsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksPortsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksPortsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudNetworksPortsGetallUnauthorized) readResponse(response runtime.Cl return nil } +// NewPcloudNetworksPortsGetallForbidden creates a PcloudNetworksPortsGetallForbidden with default headers values +func NewPcloudNetworksPortsGetallForbidden() *PcloudNetworksPortsGetallForbidden { + return &PcloudNetworksPortsGetallForbidden{} +} + +/* +PcloudNetworksPortsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksPortsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports getall forbidden response has a 2xx status code +func (o *PcloudNetworksPortsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports getall forbidden response has a 3xx status code +func (o *PcloudNetworksPortsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports getall forbidden response has a 4xx status code +func (o *PcloudNetworksPortsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports getall forbidden response has a 5xx status code +func (o *PcloudNetworksPortsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports getall forbidden response a status code equal to that given +func (o *PcloudNetworksPortsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks ports getall forbidden response +func (o *PcloudNetworksPortsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksPortsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsGetallForbidden) 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 +} + +// NewPcloudNetworksPortsGetallNotFound creates a PcloudNetworksPortsGetallNotFound with default headers values +func NewPcloudNetworksPortsGetallNotFound() *PcloudNetworksPortsGetallNotFound { + return &PcloudNetworksPortsGetallNotFound{} +} + +/* +PcloudNetworksPortsGetallNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudNetworksPortsGetallNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports getall not found response has a 2xx status code +func (o *PcloudNetworksPortsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports getall not found response has a 3xx status code +func (o *PcloudNetworksPortsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports getall not found response has a 4xx status code +func (o *PcloudNetworksPortsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports getall not found response has a 5xx status code +func (o *PcloudNetworksPortsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports getall not found response a status code equal to that given +func (o *PcloudNetworksPortsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks ports getall not found response +func (o *PcloudNetworksPortsGetallNotFound) Code() int { + return 404 +} + +func (o *PcloudNetworksPortsGetallNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPortsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPortsGetallNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsGetallNotFound) 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 +} + // NewPcloudNetworksPortsGetallInternalServerError creates a PcloudNetworksPortsGetallInternalServerError with default headers values func NewPcloudNetworksPortsGetallInternalServerError() *PcloudNetworksPortsGetallInternalServerError { return &PcloudNetworksPortsGetallInternalServerError{} } -/* PcloudNetworksPortsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksPortsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudNetworksPortsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports getall internal server error response has a 2xx status code +func (o *PcloudNetworksPortsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports getall internal server error response has a 3xx status code +func (o *PcloudNetworksPortsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports getall internal server error response has a 4xx status code +func (o *PcloudNetworksPortsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports getall internal server error response has a 5xx status code +func (o *PcloudNetworksPortsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks ports getall internal server error response a status code equal to that given +func (o *PcloudNetworksPortsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks ports getall internal server error response +func (o *PcloudNetworksPortsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksPortsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksPortsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksPortsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_parameters.go index ffeb93590c3..886acd02fa7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudNetworksPortsPostParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudNetworksPortsPostParams contains all the parameters to send to the API endpoint - for the pcloud networks ports post operation. +/* +PcloudNetworksPortsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks ports post operation. + + Typically these are written to a http.Request. */ type PcloudNetworksPortsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go index a284e8b3ac2..05a8818df16 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go @@ -41,6 +41,18 @@ func (o *PcloudNetworksPortsPostReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 403: + result := NewPcloudNetworksPortsPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudNetworksPortsPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudNetworksPortsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +72,7 @@ func (o *PcloudNetworksPortsPostReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports] pcloud.networks.ports.post", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewPcloudNetworksPortsPostCreated() *PcloudNetworksPortsPostCreated { return &PcloudNetworksPortsPostCreated{} } -/* PcloudNetworksPortsPostCreated describes a response with status code 201, with default header values. +/* +PcloudNetworksPortsPostCreated describes a response with status code 201, with default header values. Created */ @@ -77,9 +90,44 @@ type PcloudNetworksPortsPostCreated struct { Payload *models.NetworkPort } +// IsSuccess returns true when this pcloud networks ports post created response has a 2xx status code +func (o *PcloudNetworksPortsPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks ports post created response has a 3xx status code +func (o *PcloudNetworksPortsPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports post created response has a 4xx status code +func (o *PcloudNetworksPortsPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports post created response has a 5xx status code +func (o *PcloudNetworksPortsPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports post created response a status code equal to that given +func (o *PcloudNetworksPortsPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud networks ports post created response +func (o *PcloudNetworksPortsPostCreated) Code() int { + return 201 +} + func (o *PcloudNetworksPortsPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostCreated %+v", 201, o.Payload) } + +func (o *PcloudNetworksPortsPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostCreated %+v", 201, o.Payload) +} + func (o *PcloudNetworksPortsPostCreated) GetPayload() *models.NetworkPort { return o.Payload } @@ -101,7 +149,8 @@ func NewPcloudNetworksPortsPostBadRequest() *PcloudNetworksPortsPostBadRequest { return &PcloudNetworksPortsPostBadRequest{} } -/* PcloudNetworksPortsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksPortsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +158,44 @@ type PcloudNetworksPortsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports post bad request response has a 2xx status code +func (o *PcloudNetworksPortsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports post bad request response has a 3xx status code +func (o *PcloudNetworksPortsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports post bad request response has a 4xx status code +func (o *PcloudNetworksPortsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports post bad request response has a 5xx status code +func (o *PcloudNetworksPortsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports post bad request response a status code equal to that given +func (o *PcloudNetworksPortsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks ports post bad request response +func (o *PcloudNetworksPortsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksPortsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksPortsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksPortsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +217,8 @@ func NewPcloudNetworksPortsPostUnauthorized() *PcloudNetworksPortsPostUnauthoriz return &PcloudNetworksPortsPostUnauthorized{} } -/* PcloudNetworksPortsPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksPortsPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +226,44 @@ type PcloudNetworksPortsPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports post unauthorized response has a 2xx status code +func (o *PcloudNetworksPortsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports post unauthorized response has a 3xx status code +func (o *PcloudNetworksPortsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports post unauthorized response has a 4xx status code +func (o *PcloudNetworksPortsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports post unauthorized response has a 5xx status code +func (o *PcloudNetworksPortsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports post unauthorized response a status code equal to that given +func (o *PcloudNetworksPortsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks ports post unauthorized response +func (o *PcloudNetworksPortsPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksPortsPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksPortsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksPortsPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +280,149 @@ func (o *PcloudNetworksPortsPostUnauthorized) readResponse(response runtime.Clie return nil } +// NewPcloudNetworksPortsPostForbidden creates a PcloudNetworksPortsPostForbidden with default headers values +func NewPcloudNetworksPortsPostForbidden() *PcloudNetworksPortsPostForbidden { + return &PcloudNetworksPortsPostForbidden{} +} + +/* +PcloudNetworksPortsPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksPortsPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports post forbidden response has a 2xx status code +func (o *PcloudNetworksPortsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports post forbidden response has a 3xx status code +func (o *PcloudNetworksPortsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports post forbidden response has a 4xx status code +func (o *PcloudNetworksPortsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports post forbidden response has a 5xx status code +func (o *PcloudNetworksPortsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports post forbidden response a status code equal to that given +func (o *PcloudNetworksPortsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks ports post forbidden response +func (o *PcloudNetworksPortsPostForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksPortsPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsPostForbidden) 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 +} + +// NewPcloudNetworksPortsPostNotFound creates a PcloudNetworksPortsPostNotFound with default headers values +func NewPcloudNetworksPortsPostNotFound() *PcloudNetworksPortsPostNotFound { + return &PcloudNetworksPortsPostNotFound{} +} + +/* +PcloudNetworksPortsPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudNetworksPortsPostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports post not found response has a 2xx status code +func (o *PcloudNetworksPortsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports post not found response has a 3xx status code +func (o *PcloudNetworksPortsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports post not found response has a 4xx status code +func (o *PcloudNetworksPortsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports post not found response has a 5xx status code +func (o *PcloudNetworksPortsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports post not found response a status code equal to that given +func (o *PcloudNetworksPortsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks ports post not found response +func (o *PcloudNetworksPortsPostNotFound) Code() int { + return 404 +} + +func (o *PcloudNetworksPortsPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPortsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPortsPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsPostNotFound) 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 +} + // NewPcloudNetworksPortsPostConflict creates a PcloudNetworksPortsPostConflict with default headers values func NewPcloudNetworksPortsPostConflict() *PcloudNetworksPortsPostConflict { return &PcloudNetworksPortsPostConflict{} } -/* PcloudNetworksPortsPostConflict describes a response with status code 409, with default header values. +/* +PcloudNetworksPortsPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -173,9 +430,44 @@ type PcloudNetworksPortsPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports post conflict response has a 2xx status code +func (o *PcloudNetworksPortsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports post conflict response has a 3xx status code +func (o *PcloudNetworksPortsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports post conflict response has a 4xx status code +func (o *PcloudNetworksPortsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports post conflict response has a 5xx status code +func (o *PcloudNetworksPortsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports post conflict response a status code equal to that given +func (o *PcloudNetworksPortsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud networks ports post conflict response +func (o *PcloudNetworksPortsPostConflict) Code() int { + return 409 +} + func (o *PcloudNetworksPortsPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostConflict %+v", 409, o.Payload) } + +func (o *PcloudNetworksPortsPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostConflict %+v", 409, o.Payload) +} + func (o *PcloudNetworksPortsPostConflict) GetPayload() *models.Error { return o.Payload } @@ -197,7 +489,8 @@ func NewPcloudNetworksPortsPostUnprocessableEntity() *PcloudNetworksPortsPostUnp return &PcloudNetworksPortsPostUnprocessableEntity{} } -/* PcloudNetworksPortsPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudNetworksPortsPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +498,44 @@ type PcloudNetworksPortsPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports post unprocessable entity response has a 2xx status code +func (o *PcloudNetworksPortsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports post unprocessable entity response has a 3xx status code +func (o *PcloudNetworksPortsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports post unprocessable entity response has a 4xx status code +func (o *PcloudNetworksPortsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports post unprocessable entity response has a 5xx status code +func (o *PcloudNetworksPortsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports post unprocessable entity response a status code equal to that given +func (o *PcloudNetworksPortsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud networks ports post unprocessable entity response +func (o *PcloudNetworksPortsPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudNetworksPortsPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudNetworksPortsPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudNetworksPortsPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +557,8 @@ func NewPcloudNetworksPortsPostInternalServerError() *PcloudNetworksPortsPostInt return &PcloudNetworksPortsPostInternalServerError{} } -/* PcloudNetworksPortsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksPortsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +566,44 @@ type PcloudNetworksPortsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports post internal server error response has a 2xx status code +func (o *PcloudNetworksPortsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports post internal server error response has a 3xx status code +func (o *PcloudNetworksPortsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports post internal server error response has a 4xx status code +func (o *PcloudNetworksPortsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports post internal server error response has a 5xx status code +func (o *PcloudNetworksPortsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks ports post internal server error response a status code equal to that given +func (o *PcloudNetworksPortsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks ports post internal server error response +func (o *PcloudNetworksPortsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksPortsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksPortsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports][%d] pcloudNetworksPortsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksPortsPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_parameters.go index fce7c87e67f..d29caefc3e7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudNetworksPortsPutParamsWithHTTPClient(client *http.Client) *PcloudN } } -/* PcloudNetworksPortsPutParams contains all the parameters to send to the API endpoint - for the pcloud networks ports put operation. +/* +PcloudNetworksPortsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks ports put operation. + + Typically these are written to a http.Request. */ type PcloudNetworksPortsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go index 4fc8e47d290..0d18d785bcc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go @@ -41,6 +41,18 @@ func (o *PcloudNetworksPortsPutReader) ReadResponse(response runtime.ClientRespo return nil, err } return nil, result + case 403: + result := NewPcloudNetworksPortsPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudNetworksPortsPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudNetworksPortsPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +66,7 @@ func (o *PcloudNetworksPortsPutReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}] pcloud.networks.ports.put", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudNetworksPortsPutOK() *PcloudNetworksPortsPutOK { return &PcloudNetworksPortsPutOK{} } -/* PcloudNetworksPortsPutOK describes a response with status code 200, with default header values. +/* +PcloudNetworksPortsPutOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudNetworksPortsPutOK struct { Payload *models.NetworkPort } +// IsSuccess returns true when this pcloud networks ports put o k response has a 2xx status code +func (o *PcloudNetworksPortsPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks ports put o k response has a 3xx status code +func (o *PcloudNetworksPortsPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports put o k response has a 4xx status code +func (o *PcloudNetworksPortsPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports put o k response has a 5xx status code +func (o *PcloudNetworksPortsPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports put o k response a status code equal to that given +func (o *PcloudNetworksPortsPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks ports put o k response +func (o *PcloudNetworksPortsPutOK) Code() int { + return 200 +} + func (o *PcloudNetworksPortsPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksPortsPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksPortsPutOK) GetPayload() *models.NetworkPort { return o.Payload } @@ -95,7 +143,8 @@ func NewPcloudNetworksPortsPutBadRequest() *PcloudNetworksPortsPutBadRequest { return &PcloudNetworksPortsPutBadRequest{} } -/* PcloudNetworksPortsPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksPortsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +152,44 @@ type PcloudNetworksPortsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports put bad request response has a 2xx status code +func (o *PcloudNetworksPortsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports put bad request response has a 3xx status code +func (o *PcloudNetworksPortsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports put bad request response has a 4xx status code +func (o *PcloudNetworksPortsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports put bad request response has a 5xx status code +func (o *PcloudNetworksPortsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports put bad request response a status code equal to that given +func (o *PcloudNetworksPortsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks ports put bad request response +func (o *PcloudNetworksPortsPutBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksPortsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksPortsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksPortsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +211,8 @@ func NewPcloudNetworksPortsPutUnauthorized() *PcloudNetworksPortsPutUnauthorized return &PcloudNetworksPortsPutUnauthorized{} } -/* PcloudNetworksPortsPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksPortsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +220,44 @@ type PcloudNetworksPortsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports put unauthorized response has a 2xx status code +func (o *PcloudNetworksPortsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports put unauthorized response has a 3xx status code +func (o *PcloudNetworksPortsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports put unauthorized response has a 4xx status code +func (o *PcloudNetworksPortsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports put unauthorized response has a 5xx status code +func (o *PcloudNetworksPortsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports put unauthorized response a status code equal to that given +func (o *PcloudNetworksPortsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks ports put unauthorized response +func (o *PcloudNetworksPortsPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksPortsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksPortsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksPortsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +274,149 @@ func (o *PcloudNetworksPortsPutUnauthorized) readResponse(response runtime.Clien return nil } +// NewPcloudNetworksPortsPutForbidden creates a PcloudNetworksPortsPutForbidden with default headers values +func NewPcloudNetworksPortsPutForbidden() *PcloudNetworksPortsPutForbidden { + return &PcloudNetworksPortsPutForbidden{} +} + +/* +PcloudNetworksPortsPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksPortsPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports put forbidden response has a 2xx status code +func (o *PcloudNetworksPortsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports put forbidden response has a 3xx status code +func (o *PcloudNetworksPortsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports put forbidden response has a 4xx status code +func (o *PcloudNetworksPortsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports put forbidden response has a 5xx status code +func (o *PcloudNetworksPortsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports put forbidden response a status code equal to that given +func (o *PcloudNetworksPortsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks ports put forbidden response +func (o *PcloudNetworksPortsPutForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksPortsPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPortsPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsPutForbidden) 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 +} + +// NewPcloudNetworksPortsPutNotFound creates a PcloudNetworksPortsPutNotFound with default headers values +func NewPcloudNetworksPortsPutNotFound() *PcloudNetworksPortsPutNotFound { + return &PcloudNetworksPortsPutNotFound{} +} + +/* +PcloudNetworksPortsPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudNetworksPortsPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks ports put not found response has a 2xx status code +func (o *PcloudNetworksPortsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports put not found response has a 3xx status code +func (o *PcloudNetworksPortsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports put not found response has a 4xx status code +func (o *PcloudNetworksPortsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports put not found response has a 5xx status code +func (o *PcloudNetworksPortsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports put not found response a status code equal to that given +func (o *PcloudNetworksPortsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks ports put not found response +func (o *PcloudNetworksPortsPutNotFound) Code() int { + return 404 +} + +func (o *PcloudNetworksPortsPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPortsPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudNetworksPortsPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPortsPutNotFound) 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 +} + // NewPcloudNetworksPortsPutUnprocessableEntity creates a PcloudNetworksPortsPutUnprocessableEntity with default headers values func NewPcloudNetworksPortsPutUnprocessableEntity() *PcloudNetworksPortsPutUnprocessableEntity { return &PcloudNetworksPortsPutUnprocessableEntity{} } -/* PcloudNetworksPortsPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudNetworksPortsPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -167,9 +424,44 @@ type PcloudNetworksPortsPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports put unprocessable entity response has a 2xx status code +func (o *PcloudNetworksPortsPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports put unprocessable entity response has a 3xx status code +func (o *PcloudNetworksPortsPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports put unprocessable entity response has a 4xx status code +func (o *PcloudNetworksPortsPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks ports put unprocessable entity response has a 5xx status code +func (o *PcloudNetworksPortsPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks ports put unprocessable entity response a status code equal to that given +func (o *PcloudNetworksPortsPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud networks ports put unprocessable entity response +func (o *PcloudNetworksPortsPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudNetworksPortsPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudNetworksPortsPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudNetworksPortsPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -191,7 +483,8 @@ func NewPcloudNetworksPortsPutInternalServerError() *PcloudNetworksPortsPutInter return &PcloudNetworksPortsPutInternalServerError{} } -/* PcloudNetworksPortsPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksPortsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +492,44 @@ type PcloudNetworksPortsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks ports put internal server error response has a 2xx status code +func (o *PcloudNetworksPortsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks ports put internal server error response has a 3xx status code +func (o *PcloudNetworksPortsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks ports put internal server error response has a 4xx status code +func (o *PcloudNetworksPortsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks ports put internal server error response has a 5xx status code +func (o *PcloudNetworksPortsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks ports put internal server error response a status code equal to that given +func (o *PcloudNetworksPortsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks ports put internal server error response +func (o *PcloudNetworksPortsPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksPortsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksPortsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}/ports/{port_id}][%d] pcloudNetworksPortsPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksPortsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_parameters.go index dea14d36adf..aca2c975333 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudNetworksPostParamsWithHTTPClient(client *http.Client) *PcloudNetwo } } -/* PcloudNetworksPostParams contains all the parameters to send to the API endpoint - for the pcloud networks post operation. +/* +PcloudNetworksPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks post operation. + + Typically these are written to a http.Request. */ type PcloudNetworksPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go index 27a0da33a61..a71af6efe7b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_post_responses.go @@ -47,6 +47,18 @@ func (o *PcloudNetworksPostReader) ReadResponse(response runtime.ClientResponse, return nil, err } return nil, result + case 403: + result := NewPcloudNetworksPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -65,8 +77,14 @@ func (o *PcloudNetworksPostReader) ReadResponse(response runtime.ClientResponse, return nil, err } return nil, result + case 550: + result := NewPcloudNetworksPostStatus550() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks] pcloud.networks.post", response, response.Code()) } } @@ -75,7 +93,8 @@ func NewPcloudNetworksPostOK() *PcloudNetworksPostOK { return &PcloudNetworksPostOK{} } -/* PcloudNetworksPostOK describes a response with status code 200, with default header values. +/* +PcloudNetworksPostOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +102,44 @@ type PcloudNetworksPostOK struct { Payload *models.Network } +// IsSuccess returns true when this pcloud networks post o k response has a 2xx status code +func (o *PcloudNetworksPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks post o k response has a 3xx status code +func (o *PcloudNetworksPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post o k response has a 4xx status code +func (o *PcloudNetworksPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks post o k response has a 5xx status code +func (o *PcloudNetworksPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks post o k response a status code equal to that given +func (o *PcloudNetworksPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks post o k response +func (o *PcloudNetworksPostOK) Code() int { + return 200 +} + func (o *PcloudNetworksPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksPostOK) GetPayload() *models.Network { return o.Payload } @@ -107,7 +161,8 @@ func NewPcloudNetworksPostCreated() *PcloudNetworksPostCreated { return &PcloudNetworksPostCreated{} } -/* PcloudNetworksPostCreated describes a response with status code 201, with default header values. +/* +PcloudNetworksPostCreated describes a response with status code 201, with default header values. Created */ @@ -115,9 +170,44 @@ type PcloudNetworksPostCreated struct { Payload *models.Network } +// IsSuccess returns true when this pcloud networks post created response has a 2xx status code +func (o *PcloudNetworksPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks post created response has a 3xx status code +func (o *PcloudNetworksPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post created response has a 4xx status code +func (o *PcloudNetworksPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks post created response has a 5xx status code +func (o *PcloudNetworksPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks post created response a status code equal to that given +func (o *PcloudNetworksPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud networks post created response +func (o *PcloudNetworksPostCreated) Code() int { + return 201 +} + func (o *PcloudNetworksPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostCreated %+v", 201, o.Payload) } + +func (o *PcloudNetworksPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostCreated %+v", 201, o.Payload) +} + func (o *PcloudNetworksPostCreated) GetPayload() *models.Network { return o.Payload } @@ -139,7 +229,8 @@ func NewPcloudNetworksPostBadRequest() *PcloudNetworksPostBadRequest { return &PcloudNetworksPostBadRequest{} } -/* PcloudNetworksPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -147,9 +238,44 @@ type PcloudNetworksPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks post bad request response has a 2xx status code +func (o *PcloudNetworksPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks post bad request response has a 3xx status code +func (o *PcloudNetworksPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post bad request response has a 4xx status code +func (o *PcloudNetworksPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks post bad request response has a 5xx status code +func (o *PcloudNetworksPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks post bad request response a status code equal to that given +func (o *PcloudNetworksPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks post bad request response +func (o *PcloudNetworksPostBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -171,7 +297,8 @@ func NewPcloudNetworksPostUnauthorized() *PcloudNetworksPostUnauthorized { return &PcloudNetworksPostUnauthorized{} } -/* PcloudNetworksPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -179,9 +306,44 @@ type PcloudNetworksPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks post unauthorized response has a 2xx status code +func (o *PcloudNetworksPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks post unauthorized response has a 3xx status code +func (o *PcloudNetworksPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post unauthorized response has a 4xx status code +func (o *PcloudNetworksPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks post unauthorized response has a 5xx status code +func (o *PcloudNetworksPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks post unauthorized response a status code equal to that given +func (o *PcloudNetworksPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks post unauthorized response +func (o *PcloudNetworksPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -198,12 +360,149 @@ func (o *PcloudNetworksPostUnauthorized) readResponse(response runtime.ClientRes return nil } +// NewPcloudNetworksPostForbidden creates a PcloudNetworksPostForbidden with default headers values +func NewPcloudNetworksPostForbidden() *PcloudNetworksPostForbidden { + return &PcloudNetworksPostForbidden{} +} + +/* +PcloudNetworksPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks post forbidden response has a 2xx status code +func (o *PcloudNetworksPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks post forbidden response has a 3xx status code +func (o *PcloudNetworksPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post forbidden response has a 4xx status code +func (o *PcloudNetworksPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks post forbidden response has a 5xx status code +func (o *PcloudNetworksPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks post forbidden response a status code equal to that given +func (o *PcloudNetworksPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks post forbidden response +func (o *PcloudNetworksPostForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPostForbidden) 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 +} + +// 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{} } -/* PcloudNetworksPostConflict describes a response with status code 409, with default header values. +/* +PcloudNetworksPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +510,44 @@ type PcloudNetworksPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks post conflict response has a 2xx status code +func (o *PcloudNetworksPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks post conflict response has a 3xx status code +func (o *PcloudNetworksPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post conflict response has a 4xx status code +func (o *PcloudNetworksPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks post conflict response has a 5xx status code +func (o *PcloudNetworksPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks post conflict response a status code equal to that given +func (o *PcloudNetworksPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud networks post conflict response +func (o *PcloudNetworksPostConflict) Code() int { + return 409 +} + func (o *PcloudNetworksPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostConflict %+v", 409, o.Payload) } + +func (o *PcloudNetworksPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostConflict %+v", 409, o.Payload) +} + func (o *PcloudNetworksPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +569,8 @@ func NewPcloudNetworksPostUnprocessableEntity() *PcloudNetworksPostUnprocessable return &PcloudNetworksPostUnprocessableEntity{} } -/* PcloudNetworksPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudNetworksPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +578,44 @@ type PcloudNetworksPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks post unprocessable entity response has a 2xx status code +func (o *PcloudNetworksPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks post unprocessable entity response has a 3xx status code +func (o *PcloudNetworksPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post unprocessable entity response has a 4xx status code +func (o *PcloudNetworksPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks post unprocessable entity response has a 5xx status code +func (o *PcloudNetworksPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks post unprocessable entity response a status code equal to that given +func (o *PcloudNetworksPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud networks post unprocessable entity response +func (o *PcloudNetworksPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudNetworksPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudNetworksPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudNetworksPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +637,8 @@ func NewPcloudNetworksPostInternalServerError() *PcloudNetworksPostInternalServe return &PcloudNetworksPostInternalServerError{} } -/* PcloudNetworksPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +646,44 @@ type PcloudNetworksPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks post internal server error response has a 2xx status code +func (o *PcloudNetworksPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks post internal server error response has a 3xx status code +func (o *PcloudNetworksPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post internal server error response has a 4xx status code +func (o *PcloudNetworksPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks post internal server error response has a 5xx status code +func (o *PcloudNetworksPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks post internal server error response a status code equal to that given +func (o *PcloudNetworksPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks post internal server error response +func (o *PcloudNetworksPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksPostInternalServerError) GetPayload() *models.Error { return o.Payload } @@ -293,3 +699,71 @@ func (o *PcloudNetworksPostInternalServerError) readResponse(response runtime.Cl return nil } + +// NewPcloudNetworksPostStatus550 creates a PcloudNetworksPostStatus550 with default headers values +func NewPcloudNetworksPostStatus550() *PcloudNetworksPostStatus550 { + return &PcloudNetworksPostStatus550{} +} + +/* +PcloudNetworksPostStatus550 describes a response with status code 550, with default header values. + +Workspace Status Error +*/ +type PcloudNetworksPostStatus550 struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks post status550 response has a 2xx status code +func (o *PcloudNetworksPostStatus550) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks post status550 response has a 3xx status code +func (o *PcloudNetworksPostStatus550) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks post status550 response has a 4xx status code +func (o *PcloudNetworksPostStatus550) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks post status550 response has a 5xx status code +func (o *PcloudNetworksPostStatus550) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks post status550 response a status code equal to that given +func (o *PcloudNetworksPostStatus550) IsCode(code int) bool { + return code == 550 +} + +// Code gets the status code for the pcloud networks post status550 response +func (o *PcloudNetworksPostStatus550) Code() int { + return 550 +} + +func (o *PcloudNetworksPostStatus550) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostStatus550 %+v", 550, o.Payload) +} + +func (o *PcloudNetworksPostStatus550) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/networks][%d] pcloudNetworksPostStatus550 %+v", 550, o.Payload) +} + +func (o *PcloudNetworksPostStatus550) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPostStatus550) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_parameters.go index 00ef70f90f8..7bf87fc4eab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudNetworksPutParamsWithHTTPClient(client *http.Client) *PcloudNetwor } } -/* PcloudNetworksPutParams contains all the parameters to send to the API endpoint - for the pcloud networks put operation. +/* +PcloudNetworksPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud networks put operation. + + Typically these are written to a http.Request. */ type PcloudNetworksPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go index 72797dcda6d..5fe0c1fa395 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks/pcloud_networks_put_responses.go @@ -41,6 +41,12 @@ func (o *PcloudNetworksPutReader) ReadResponse(response runtime.ClientResponse, return nil, err } return nil, result + case 403: + result := NewPcloudNetworksPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudNetworksPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudNetworksPutReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}] pcloud.networks.put", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudNetworksPutOK() *PcloudNetworksPutOK { return &PcloudNetworksPutOK{} } -/* PcloudNetworksPutOK describes a response with status code 200, with default header values. +/* +PcloudNetworksPutOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudNetworksPutOK struct { Payload *models.Network } +// IsSuccess returns true when this pcloud networks put o k response has a 2xx status code +func (o *PcloudNetworksPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud networks put o k response has a 3xx status code +func (o *PcloudNetworksPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks put o k response has a 4xx status code +func (o *PcloudNetworksPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks put o k response has a 5xx status code +func (o *PcloudNetworksPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks put o k response a status code equal to that given +func (o *PcloudNetworksPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud networks put o k response +func (o *PcloudNetworksPutOK) Code() int { + return 200 +} + func (o *PcloudNetworksPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutOK %+v", 200, o.Payload) } + +func (o *PcloudNetworksPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutOK %+v", 200, o.Payload) +} + func (o *PcloudNetworksPutOK) GetPayload() *models.Network { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudNetworksPutBadRequest() *PcloudNetworksPutBadRequest { return &PcloudNetworksPutBadRequest{} } -/* PcloudNetworksPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudNetworksPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudNetworksPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks put bad request response has a 2xx status code +func (o *PcloudNetworksPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks put bad request response has a 3xx status code +func (o *PcloudNetworksPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks put bad request response has a 4xx status code +func (o *PcloudNetworksPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks put bad request response has a 5xx status code +func (o *PcloudNetworksPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks put bad request response a status code equal to that given +func (o *PcloudNetworksPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud networks put bad request response +func (o *PcloudNetworksPutBadRequest) Code() int { + return 400 +} + func (o *PcloudNetworksPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudNetworksPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudNetworksPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudNetworksPutUnauthorized() *PcloudNetworksPutUnauthorized { return &PcloudNetworksPutUnauthorized{} } -/* PcloudNetworksPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudNetworksPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudNetworksPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks put unauthorized response has a 2xx status code +func (o *PcloudNetworksPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks put unauthorized response has a 3xx status code +func (o *PcloudNetworksPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks put unauthorized response has a 4xx status code +func (o *PcloudNetworksPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks put unauthorized response has a 5xx status code +func (o *PcloudNetworksPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks put unauthorized response a status code equal to that given +func (o *PcloudNetworksPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud networks put unauthorized response +func (o *PcloudNetworksPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudNetworksPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudNetworksPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudNetworksPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +274,81 @@ func (o *PcloudNetworksPutUnauthorized) readResponse(response runtime.ClientResp return nil } +// NewPcloudNetworksPutForbidden creates a PcloudNetworksPutForbidden with default headers values +func NewPcloudNetworksPutForbidden() *PcloudNetworksPutForbidden { + return &PcloudNetworksPutForbidden{} +} + +/* +PcloudNetworksPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudNetworksPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud networks put forbidden response has a 2xx status code +func (o *PcloudNetworksPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks put forbidden response has a 3xx status code +func (o *PcloudNetworksPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks put forbidden response has a 4xx status code +func (o *PcloudNetworksPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks put forbidden response has a 5xx status code +func (o *PcloudNetworksPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks put forbidden response a status code equal to that given +func (o *PcloudNetworksPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud networks put forbidden response +func (o *PcloudNetworksPutForbidden) Code() int { + return 403 +} + +func (o *PcloudNetworksPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudNetworksPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudNetworksPutForbidden) 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 +} + // NewPcloudNetworksPutNotFound creates a PcloudNetworksPutNotFound with default headers values func NewPcloudNetworksPutNotFound() *PcloudNetworksPutNotFound { return &PcloudNetworksPutNotFound{} } -/* PcloudNetworksPutNotFound describes a response with status code 404, with default header values. +/* +PcloudNetworksPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -173,9 +356,44 @@ type PcloudNetworksPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks put not found response has a 2xx status code +func (o *PcloudNetworksPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks put not found response has a 3xx status code +func (o *PcloudNetworksPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks put not found response has a 4xx status code +func (o *PcloudNetworksPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks put not found response has a 5xx status code +func (o *PcloudNetworksPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks put not found response a status code equal to that given +func (o *PcloudNetworksPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud networks put not found response +func (o *PcloudNetworksPutNotFound) Code() int { + return 404 +} + func (o *PcloudNetworksPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudNetworksPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudNetworksPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -197,7 +415,8 @@ func NewPcloudNetworksPutUnprocessableEntity() *PcloudNetworksPutUnprocessableEn return &PcloudNetworksPutUnprocessableEntity{} } -/* PcloudNetworksPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudNetworksPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +424,44 @@ type PcloudNetworksPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks put unprocessable entity response has a 2xx status code +func (o *PcloudNetworksPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks put unprocessable entity response has a 3xx status code +func (o *PcloudNetworksPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks put unprocessable entity response has a 4xx status code +func (o *PcloudNetworksPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud networks put unprocessable entity response has a 5xx status code +func (o *PcloudNetworksPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud networks put unprocessable entity response a status code equal to that given +func (o *PcloudNetworksPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud networks put unprocessable entity response +func (o *PcloudNetworksPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudNetworksPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudNetworksPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudNetworksPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudNetworksPutInternalServerError() *PcloudNetworksPutInternalServerE return &PcloudNetworksPutInternalServerError{} } -/* PcloudNetworksPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudNetworksPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudNetworksPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud networks put internal server error response has a 2xx status code +func (o *PcloudNetworksPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud networks put internal server error response has a 3xx status code +func (o *PcloudNetworksPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud networks put internal server error response has a 4xx status code +func (o *PcloudNetworksPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud networks put internal server error response has a 5xx status code +func (o *PcloudNetworksPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud networks put internal server error response a status code equal to that given +func (o *PcloudNetworksPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud networks put internal server error response +func (o *PcloudNetworksPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudNetworksPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudNetworksPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/networks/{network_id}][%d] pcloudNetworksPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudNetworksPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go index 197fa4cf9f5..f21fbd2d3be 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go @@ -72,11 +72,13 @@ type ClientService interface { PcloudV2PvminstancesCapturePost(params *PcloudV2PvminstancesCapturePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesCapturePostAccepted, error) + PcloudV2PvminstancesGetall(params *PcloudV2PvminstancesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesGetallOK, error) + SetTransport(transport runtime.ClientTransport) } /* - PcloudPvminstancesActionPost performs an action start stop reboot immediate shutdown reset on a p VM instance +PcloudPvminstancesActionPost performs an action start stop reboot immediate shutdown reset on a p VM instance */ func (a *Client) PcloudPvminstancesActionPost(params *PcloudPvminstancesActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesActionPostOK, error) { // TODO: Validate the params before sending @@ -115,7 +117,11 @@ func (a *Client) PcloudPvminstancesActionPost(params *PcloudPvminstancesActionPo } /* - PcloudPvminstancesCapturePost captures a p VM instance and create a deployable image + PcloudPvminstancesCapturePost captures a p VM instance and create a deployable image + + This API is deprecated for /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture. + +>*Note*: Support for this API is available till Oct 2022. */ func (a *Client) PcloudPvminstancesCapturePost(params *PcloudPvminstancesCapturePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesCapturePostOK, *PcloudPvminstancesCapturePostAccepted, error) { // TODO: Validate the params before sending @@ -155,7 +161,7 @@ func (a *Client) PcloudPvminstancesCapturePost(params *PcloudPvminstancesCapture } /* - PcloudPvminstancesClonePost clones a p VM instance +PcloudPvminstancesClonePost clones a p VM instance */ func (a *Client) PcloudPvminstancesClonePost(params *PcloudPvminstancesClonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesClonePostAccepted, error) { // TODO: Validate the params before sending @@ -194,7 +200,7 @@ func (a *Client) PcloudPvminstancesClonePost(params *PcloudPvminstancesClonePost } /* - PcloudPvminstancesConsoleGet lists all console languages +PcloudPvminstancesConsoleGet lists all console languages */ func (a *Client) PcloudPvminstancesConsoleGet(params *PcloudPvminstancesConsoleGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesConsoleGetOK, error) { // TODO: Validate the params before sending @@ -233,7 +239,7 @@ func (a *Client) PcloudPvminstancesConsoleGet(params *PcloudPvminstancesConsoleG } /* - PcloudPvminstancesConsolePost generates the no v n c console URL +PcloudPvminstancesConsolePost generates the no v n c console URL */ func (a *Client) PcloudPvminstancesConsolePost(params *PcloudPvminstancesConsolePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesConsolePostCreated, error) { // TODO: Validate the params before sending @@ -272,7 +278,7 @@ func (a *Client) PcloudPvminstancesConsolePost(params *PcloudPvminstancesConsole } /* - PcloudPvminstancesConsolePut updates p VM instance console laguage code +PcloudPvminstancesConsolePut updates p VM instance console laguage code */ func (a *Client) PcloudPvminstancesConsolePut(params *PcloudPvminstancesConsolePutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesConsolePutOK, error) { // TODO: Validate the params before sending @@ -311,7 +317,7 @@ func (a *Client) PcloudPvminstancesConsolePut(params *PcloudPvminstancesConsoleP } /* - PcloudPvminstancesDelete deletes a p cloud p VM instance +PcloudPvminstancesDelete deletes a p cloud p VM instance */ func (a *Client) PcloudPvminstancesDelete(params *PcloudPvminstancesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesDeleteOK, error) { // TODO: Validate the params before sending @@ -350,7 +356,7 @@ func (a *Client) PcloudPvminstancesDelete(params *PcloudPvminstancesDeleteParams } /* - PcloudPvminstancesGet gets a p VM instance s current state or information +PcloudPvminstancesGet gets a p VM instance s current state or information */ func (a *Client) PcloudPvminstancesGet(params *PcloudPvminstancesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesGetOK, error) { // TODO: Validate the params before sending @@ -389,7 +395,7 @@ func (a *Client) PcloudPvminstancesGet(params *PcloudPvminstancesGetParams, auth } /* - PcloudPvminstancesGetall gets all the pvm instances for this cloud instance +PcloudPvminstancesGetall gets all the pvm instances for this cloud instance */ func (a *Client) PcloudPvminstancesGetall(params *PcloudPvminstancesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesGetallOK, error) { // TODO: Validate the params before sending @@ -428,7 +434,7 @@ func (a *Client) PcloudPvminstancesGetall(params *PcloudPvminstancesGetallParams } /* - PcloudPvminstancesNetworksDelete removes all address of network from a p VM instance +PcloudPvminstancesNetworksDelete removes all address of network from a p VM instance */ func (a *Client) PcloudPvminstancesNetworksDelete(params *PcloudPvminstancesNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesNetworksDeleteOK, error) { // TODO: Validate the params before sending @@ -467,7 +473,7 @@ func (a *Client) PcloudPvminstancesNetworksDelete(params *PcloudPvminstancesNetw } /* - PcloudPvminstancesNetworksGet gets a p VM instance s network information +PcloudPvminstancesNetworksGet gets a p VM instance s network information */ func (a *Client) PcloudPvminstancesNetworksGet(params *PcloudPvminstancesNetworksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesNetworksGetOK, error) { // TODO: Validate the params before sending @@ -506,7 +512,7 @@ func (a *Client) PcloudPvminstancesNetworksGet(params *PcloudPvminstancesNetwork } /* - PcloudPvminstancesNetworksGetall gets all networks for this p VM instance +PcloudPvminstancesNetworksGetall gets all networks for this p VM instance */ func (a *Client) PcloudPvminstancesNetworksGetall(params *PcloudPvminstancesNetworksGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesNetworksGetallOK, error) { // TODO: Validate the params before sending @@ -545,7 +551,7 @@ func (a *Client) PcloudPvminstancesNetworksGetall(params *PcloudPvminstancesNetw } /* - PcloudPvminstancesNetworksPost performs network addition +PcloudPvminstancesNetworksPost performs network addition */ func (a *Client) PcloudPvminstancesNetworksPost(params *PcloudPvminstancesNetworksPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesNetworksPostCreated, error) { // TODO: Validate the params before sending @@ -584,7 +590,7 @@ func (a *Client) PcloudPvminstancesNetworksPost(params *PcloudPvminstancesNetwor } /* - PcloudPvminstancesOperationsPost performs an operation on a p VM instance +PcloudPvminstancesOperationsPost performs an operation on a p VM instance */ func (a *Client) PcloudPvminstancesOperationsPost(params *PcloudPvminstancesOperationsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesOperationsPostOK, error) { // TODO: Validate the params before sending @@ -623,7 +629,7 @@ func (a *Client) PcloudPvminstancesOperationsPost(params *PcloudPvminstancesOper } /* - PcloudPvminstancesPost creates a new power VM instance +PcloudPvminstancesPost creates a new power VM instance */ func (a *Client) PcloudPvminstancesPost(params *PcloudPvminstancesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesPostOK, *PcloudPvminstancesPostCreated, *PcloudPvminstancesPostAccepted, error) { // TODO: Validate the params before sending @@ -665,7 +671,7 @@ func (a *Client) PcloudPvminstancesPost(params *PcloudPvminstancesPostParams, au } /* - PcloudPvminstancesPut updates a p cloud p VM instance +PcloudPvminstancesPut updates a p cloud p VM instance */ func (a *Client) PcloudPvminstancesPut(params *PcloudPvminstancesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesPutAccepted, error) { // TODO: Validate the params before sending @@ -704,7 +710,7 @@ func (a *Client) PcloudPvminstancesPut(params *PcloudPvminstancesPutParams, auth } /* - PcloudPvminstancesSnapshotsGetall gets all snapshots for this p VM instance +PcloudPvminstancesSnapshotsGetall gets all snapshots for this p VM instance */ func (a *Client) PcloudPvminstancesSnapshotsGetall(params *PcloudPvminstancesSnapshotsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesSnapshotsGetallOK, error) { // TODO: Validate the params before sending @@ -743,7 +749,7 @@ func (a *Client) PcloudPvminstancesSnapshotsGetall(params *PcloudPvminstancesSna } /* - PcloudPvminstancesSnapshotsPost creates a p VM instance snapshot +PcloudPvminstancesSnapshotsPost creates a p VM instance snapshot */ func (a *Client) PcloudPvminstancesSnapshotsPost(params *PcloudPvminstancesSnapshotsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesSnapshotsPostAccepted, error) { // TODO: Validate the params before sending @@ -782,7 +788,7 @@ func (a *Client) PcloudPvminstancesSnapshotsPost(params *PcloudPvminstancesSnaps } /* - PcloudPvminstancesSnapshotsRestorePost restores a p VM instance snapshot +PcloudPvminstancesSnapshotsRestorePost restores a p VM instance snapshot */ func (a *Client) PcloudPvminstancesSnapshotsRestorePost(params *PcloudPvminstancesSnapshotsRestorePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesSnapshotsRestorePostAccepted, error) { // TODO: Validate the params before sending @@ -821,7 +827,7 @@ func (a *Client) PcloudPvminstancesSnapshotsRestorePost(params *PcloudPvminstanc } /* - PcloudV2PvminstancesCaptureGet gets detail of last capture job +PcloudV2PvminstancesCaptureGet gets detail of last capture job */ func (a *Client) PcloudV2PvminstancesCaptureGet(params *PcloudV2PvminstancesCaptureGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesCaptureGetOK, error) { // TODO: Validate the params before sending @@ -860,7 +866,7 @@ func (a *Client) PcloudV2PvminstancesCaptureGet(params *PcloudV2PvminstancesCapt } /* - PcloudV2PvminstancesCapturePost adds a capture pvm instance to the jobs queue +PcloudV2PvminstancesCapturePost adds a capture pvm instance to the jobs queue */ func (a *Client) PcloudV2PvminstancesCapturePost(params *PcloudV2PvminstancesCapturePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesCapturePostAccepted, error) { // TODO: Validate the params before sending @@ -898,6 +904,45 @@ func (a *Client) PcloudV2PvminstancesCapturePost(params *PcloudV2PvminstancesCap panic(msg) } +/* +PcloudV2PvminstancesGetall gets all the pvm instances for this cloud instance +*/ +func (a *Client) PcloudV2PvminstancesGetall(params *PcloudV2PvminstancesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesGetallOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudV2PvminstancesGetallParams() + } + op := &runtime.ClientOperation{ + ID: "pcloud.v2.pvminstances.getall", + Method: "GET", + PathPattern: "/pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudV2PvminstancesGetallReader{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.(*PcloudV2PvminstancesGetallOK) + 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 pcloud.v2.pvminstances.getall: 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_parameters.go index 27ae8aa3274..9aed1ab01a3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesActionPostParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudPvminstancesActionPostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances action post operation. +/* +PcloudPvminstancesActionPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances action post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesActionPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go index 52184b01611..88ba6f9a541 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesActionPostReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesActionPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesActionPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudPvminstancesActionPostReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action] pcloud.pvminstances.action.post", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudPvminstancesActionPostOK() *PcloudPvminstancesActionPostOK { return &PcloudPvminstancesActionPostOK{} } -/* PcloudPvminstancesActionPostOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesActionPostOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudPvminstancesActionPostOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances action post o k response has a 2xx status code +func (o *PcloudPvminstancesActionPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances action post o k response has a 3xx status code +func (o *PcloudPvminstancesActionPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances action post o k response has a 4xx status code +func (o *PcloudPvminstancesActionPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances action post o k response has a 5xx status code +func (o *PcloudPvminstancesActionPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances action post o k response a status code equal to that given +func (o *PcloudPvminstancesActionPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances action post o k response +func (o *PcloudPvminstancesActionPostOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesActionPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesActionPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesActionPostOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudPvminstancesActionPostBadRequest() *PcloudPvminstancesActionPostBa return &PcloudPvminstancesActionPostBadRequest{} } -/* PcloudPvminstancesActionPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesActionPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudPvminstancesActionPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances action post bad request response has a 2xx status code +func (o *PcloudPvminstancesActionPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances action post bad request response has a 3xx status code +func (o *PcloudPvminstancesActionPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances action post bad request response has a 4xx status code +func (o *PcloudPvminstancesActionPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances action post bad request response has a 5xx status code +func (o *PcloudPvminstancesActionPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances action post bad request response a status code equal to that given +func (o *PcloudPvminstancesActionPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances action post bad request response +func (o *PcloudPvminstancesActionPostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesActionPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesActionPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesActionPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudPvminstancesActionPostUnauthorized() *PcloudPvminstancesActionPost return &PcloudPvminstancesActionPostUnauthorized{} } -/* PcloudPvminstancesActionPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesActionPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudPvminstancesActionPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances action post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesActionPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances action post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesActionPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances action post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesActionPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances action post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesActionPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances action post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesActionPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances action post unauthorized response +func (o *PcloudPvminstancesActionPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesActionPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesActionPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesActionPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ func (o *PcloudPvminstancesActionPostUnauthorized) readResponse(response runtime return nil } +// NewPcloudPvminstancesActionPostForbidden creates a PcloudPvminstancesActionPostForbidden with default headers values +func NewPcloudPvminstancesActionPostForbidden() *PcloudPvminstancesActionPostForbidden { + return &PcloudPvminstancesActionPostForbidden{} +} + +/* +PcloudPvminstancesActionPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesActionPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances action post forbidden response has a 2xx status code +func (o *PcloudPvminstancesActionPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances action post forbidden response has a 3xx status code +func (o *PcloudPvminstancesActionPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances action post forbidden response has a 4xx status code +func (o *PcloudPvminstancesActionPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances action post forbidden response has a 5xx status code +func (o *PcloudPvminstancesActionPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances action post forbidden response a status code equal to that given +func (o *PcloudPvminstancesActionPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances action post forbidden response +func (o *PcloudPvminstancesActionPostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesActionPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesActionPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesActionPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesActionPostForbidden) 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 +} + // NewPcloudPvminstancesActionPostNotFound creates a PcloudPvminstancesActionPostNotFound with default headers values func NewPcloudPvminstancesActionPostNotFound() *PcloudPvminstancesActionPostNotFound { return &PcloudPvminstancesActionPostNotFound{} } -/* PcloudPvminstancesActionPostNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesActionPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudPvminstancesActionPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances action post not found response has a 2xx status code +func (o *PcloudPvminstancesActionPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances action post not found response has a 3xx status code +func (o *PcloudPvminstancesActionPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances action post not found response has a 4xx status code +func (o *PcloudPvminstancesActionPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances action post not found response has a 5xx status code +func (o *PcloudPvminstancesActionPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances action post not found response a status code equal to that given +func (o *PcloudPvminstancesActionPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances action post not found response +func (o *PcloudPvminstancesActionPostNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesActionPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesActionPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesActionPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudPvminstancesActionPostConflict() *PcloudPvminstancesActionPostConf return &PcloudPvminstancesActionPostConflict{} } -/* PcloudPvminstancesActionPostConflict describes a response with status code 409, with default header values. +/* +PcloudPvminstancesActionPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -203,9 +422,44 @@ type PcloudPvminstancesActionPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances action post conflict response has a 2xx status code +func (o *PcloudPvminstancesActionPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances action post conflict response has a 3xx status code +func (o *PcloudPvminstancesActionPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances action post conflict response has a 4xx status code +func (o *PcloudPvminstancesActionPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances action post conflict response has a 5xx status code +func (o *PcloudPvminstancesActionPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances action post conflict response a status code equal to that given +func (o *PcloudPvminstancesActionPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances action post conflict response +func (o *PcloudPvminstancesActionPostConflict) Code() int { + return 409 +} + func (o *PcloudPvminstancesActionPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostConflict %+v", 409, o.Payload) } + +func (o *PcloudPvminstancesActionPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostConflict %+v", 409, o.Payload) +} + func (o *PcloudPvminstancesActionPostConflict) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudPvminstancesActionPostInternalServerError() *PcloudPvminstancesAct return &PcloudPvminstancesActionPostInternalServerError{} } -/* PcloudPvminstancesActionPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesActionPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudPvminstancesActionPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances action post internal server error response has a 2xx status code +func (o *PcloudPvminstancesActionPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances action post internal server error response has a 3xx status code +func (o *PcloudPvminstancesActionPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances action post internal server error response has a 4xx status code +func (o *PcloudPvminstancesActionPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances action post internal server error response has a 5xx status code +func (o *PcloudPvminstancesActionPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances action post internal server error response a status code equal to that given +func (o *PcloudPvminstancesActionPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances action post internal server error response +func (o *PcloudPvminstancesActionPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesActionPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesActionPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action][%d] pcloudPvminstancesActionPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesActionPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_parameters.go index 501695e66b3..84668e1b945 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesCapturePostParamsWithHTTPClient(client *http.Client) * } } -/* PcloudPvminstancesCapturePostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances capture post operation. +/* +PcloudPvminstancesCapturePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances capture post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesCapturePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go index 436187f56ac..01c675d586c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go @@ -47,6 +47,18 @@ func (o *PcloudPvminstancesCapturePostReader) ReadResponse(response runtime.Clie return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesCapturePostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesCapturePostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudPvminstancesCapturePostUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +72,7 @@ func (o *PcloudPvminstancesCapturePostReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture] pcloud.pvminstances.capture.post", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewPcloudPvminstancesCapturePostOK() *PcloudPvminstancesCapturePostOK { return &PcloudPvminstancesCapturePostOK{} } -/* PcloudPvminstancesCapturePostOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesCapturePostOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +90,44 @@ type PcloudPvminstancesCapturePostOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances capture post o k response has a 2xx status code +func (o *PcloudPvminstancesCapturePostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances capture post o k response has a 3xx status code +func (o *PcloudPvminstancesCapturePostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances capture post o k response has a 4xx status code +func (o *PcloudPvminstancesCapturePostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances capture post o k response has a 5xx status code +func (o *PcloudPvminstancesCapturePostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances capture post o k response a status code equal to that given +func (o *PcloudPvminstancesCapturePostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances capture post o k response +func (o *PcloudPvminstancesCapturePostOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesCapturePostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesCapturePostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesCapturePostOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +147,8 @@ func NewPcloudPvminstancesCapturePostAccepted() *PcloudPvminstancesCapturePostAc return &PcloudPvminstancesCapturePostAccepted{} } -/* PcloudPvminstancesCapturePostAccepted describes a response with status code 202, with default header values. +/* +PcloudPvminstancesCapturePostAccepted describes a response with status code 202, with default header values. Accepted, upload to cloud storage in progress */ @@ -107,9 +156,44 @@ type PcloudPvminstancesCapturePostAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances capture post accepted response has a 2xx status code +func (o *PcloudPvminstancesCapturePostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances capture post accepted response has a 3xx status code +func (o *PcloudPvminstancesCapturePostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances capture post accepted response has a 4xx status code +func (o *PcloudPvminstancesCapturePostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances capture post accepted response has a 5xx status code +func (o *PcloudPvminstancesCapturePostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances capture post accepted response a status code equal to that given +func (o *PcloudPvminstancesCapturePostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances capture post accepted response +func (o *PcloudPvminstancesCapturePostAccepted) Code() int { + return 202 +} + func (o *PcloudPvminstancesCapturePostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostAccepted %+v", 202, o.Payload) } + +func (o *PcloudPvminstancesCapturePostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostAccepted %+v", 202, o.Payload) +} + func (o *PcloudPvminstancesCapturePostAccepted) GetPayload() models.Object { return o.Payload } @@ -129,7 +213,8 @@ func NewPcloudPvminstancesCapturePostBadRequest() *PcloudPvminstancesCapturePost return &PcloudPvminstancesCapturePostBadRequest{} } -/* PcloudPvminstancesCapturePostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesCapturePostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -137,9 +222,44 @@ type PcloudPvminstancesCapturePostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances capture post bad request response has a 2xx status code +func (o *PcloudPvminstancesCapturePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances capture post bad request response has a 3xx status code +func (o *PcloudPvminstancesCapturePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances capture post bad request response has a 4xx status code +func (o *PcloudPvminstancesCapturePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances capture post bad request response has a 5xx status code +func (o *PcloudPvminstancesCapturePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances capture post bad request response a status code equal to that given +func (o *PcloudPvminstancesCapturePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances capture post bad request response +func (o *PcloudPvminstancesCapturePostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesCapturePostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesCapturePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesCapturePostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -161,7 +281,8 @@ func NewPcloudPvminstancesCapturePostUnauthorized() *PcloudPvminstancesCapturePo return &PcloudPvminstancesCapturePostUnauthorized{} } -/* PcloudPvminstancesCapturePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesCapturePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -169,9 +290,44 @@ type PcloudPvminstancesCapturePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances capture post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesCapturePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances capture post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesCapturePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances capture post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesCapturePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances capture post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesCapturePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances capture post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesCapturePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances capture post unauthorized response +func (o *PcloudPvminstancesCapturePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesCapturePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesCapturePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesCapturePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -188,12 +344,149 @@ func (o *PcloudPvminstancesCapturePostUnauthorized) readResponse(response runtim return nil } +// NewPcloudPvminstancesCapturePostForbidden creates a PcloudPvminstancesCapturePostForbidden with default headers values +func NewPcloudPvminstancesCapturePostForbidden() *PcloudPvminstancesCapturePostForbidden { + return &PcloudPvminstancesCapturePostForbidden{} +} + +/* +PcloudPvminstancesCapturePostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesCapturePostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances capture post forbidden response has a 2xx status code +func (o *PcloudPvminstancesCapturePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances capture post forbidden response has a 3xx status code +func (o *PcloudPvminstancesCapturePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances capture post forbidden response has a 4xx status code +func (o *PcloudPvminstancesCapturePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances capture post forbidden response has a 5xx status code +func (o *PcloudPvminstancesCapturePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances capture post forbidden response a status code equal to that given +func (o *PcloudPvminstancesCapturePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances capture post forbidden response +func (o *PcloudPvminstancesCapturePostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesCapturePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesCapturePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesCapturePostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesCapturePostForbidden) 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 +} + +// NewPcloudPvminstancesCapturePostNotFound creates a PcloudPvminstancesCapturePostNotFound with default headers values +func NewPcloudPvminstancesCapturePostNotFound() *PcloudPvminstancesCapturePostNotFound { + return &PcloudPvminstancesCapturePostNotFound{} +} + +/* +PcloudPvminstancesCapturePostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesCapturePostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances capture post not found response has a 2xx status code +func (o *PcloudPvminstancesCapturePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances capture post not found response has a 3xx status code +func (o *PcloudPvminstancesCapturePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances capture post not found response has a 4xx status code +func (o *PcloudPvminstancesCapturePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances capture post not found response has a 5xx status code +func (o *PcloudPvminstancesCapturePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances capture post not found response a status code equal to that given +func (o *PcloudPvminstancesCapturePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances capture post not found response +func (o *PcloudPvminstancesCapturePostNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesCapturePostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesCapturePostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesCapturePostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesCapturePostNotFound) 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 +} + // NewPcloudPvminstancesCapturePostUnprocessableEntity creates a PcloudPvminstancesCapturePostUnprocessableEntity with default headers values func NewPcloudPvminstancesCapturePostUnprocessableEntity() *PcloudPvminstancesCapturePostUnprocessableEntity { return &PcloudPvminstancesCapturePostUnprocessableEntity{} } -/* PcloudPvminstancesCapturePostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPvminstancesCapturePostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -201,9 +494,44 @@ type PcloudPvminstancesCapturePostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances capture post unprocessable entity response has a 2xx status code +func (o *PcloudPvminstancesCapturePostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances capture post unprocessable entity response has a 3xx status code +func (o *PcloudPvminstancesCapturePostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances capture post unprocessable entity response has a 4xx status code +func (o *PcloudPvminstancesCapturePostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances capture post unprocessable entity response has a 5xx status code +func (o *PcloudPvminstancesCapturePostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances capture post unprocessable entity response a status code equal to that given +func (o *PcloudPvminstancesCapturePostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud pvminstances capture post unprocessable entity response +func (o *PcloudPvminstancesCapturePostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPvminstancesCapturePostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPvminstancesCapturePostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPvminstancesCapturePostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -225,7 +553,8 @@ func NewPcloudPvminstancesCapturePostInternalServerError() *PcloudPvminstancesCa return &PcloudPvminstancesCapturePostInternalServerError{} } -/* PcloudPvminstancesCapturePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesCapturePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -233,9 +562,44 @@ type PcloudPvminstancesCapturePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances capture post internal server error response has a 2xx status code +func (o *PcloudPvminstancesCapturePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances capture post internal server error response has a 3xx status code +func (o *PcloudPvminstancesCapturePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances capture post internal server error response has a 4xx status code +func (o *PcloudPvminstancesCapturePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances capture post internal server error response has a 5xx status code +func (o *PcloudPvminstancesCapturePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances capture post internal server error response a status code equal to that given +func (o *PcloudPvminstancesCapturePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances capture post internal server error response +func (o *PcloudPvminstancesCapturePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesCapturePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesCapturePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudPvminstancesCapturePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesCapturePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_parameters.go index b51625f4cec..021f4c3990f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesClonePostParamsWithHTTPClient(client *http.Client) *Pc } } -/* PcloudPvminstancesClonePostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances clone post operation. +/* +PcloudPvminstancesClonePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances clone post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesClonePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go index 4d4e0510a68..c7ded07d412 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +72,7 @@ func (o *PcloudPvminstancesClonePostReader) ReadResponse(response runtime.Client } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone] pcloud.pvminstances.clone.post", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewPcloudPvminstancesClonePostAccepted() *PcloudPvminstancesClonePostAccept return &PcloudPvminstancesClonePostAccepted{} } -/* PcloudPvminstancesClonePostAccepted describes a response with status code 202, with default header values. +/* +PcloudPvminstancesClonePostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +90,44 @@ type PcloudPvminstancesClonePostAccepted struct { Payload *models.PVMInstance } +// IsSuccess returns true when this pcloud pvminstances clone post accepted response has a 2xx status code +func (o *PcloudPvminstancesClonePostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances clone post accepted response has a 3xx status code +func (o *PcloudPvminstancesClonePostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances clone post accepted response has a 4xx status code +func (o *PcloudPvminstancesClonePostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances clone post accepted response has a 5xx status code +func (o *PcloudPvminstancesClonePostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances clone post accepted response a status code equal to that given +func (o *PcloudPvminstancesClonePostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances clone post accepted response +func (o *PcloudPvminstancesClonePostAccepted) Code() int { + return 202 +} + func (o *PcloudPvminstancesClonePostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostAccepted %+v", 202, o.Payload) } + +func (o *PcloudPvminstancesClonePostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostAccepted %+v", 202, o.Payload) +} + func (o *PcloudPvminstancesClonePostAccepted) GetPayload() *models.PVMInstance { return o.Payload } @@ -101,7 +149,8 @@ func NewPcloudPvminstancesClonePostBadRequest() *PcloudPvminstancesClonePostBadR return &PcloudPvminstancesClonePostBadRequest{} } -/* PcloudPvminstancesClonePostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesClonePostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +158,44 @@ type PcloudPvminstancesClonePostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances clone post bad request response has a 2xx status code +func (o *PcloudPvminstancesClonePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances clone post bad request response has a 3xx status code +func (o *PcloudPvminstancesClonePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances clone post bad request response has a 4xx status code +func (o *PcloudPvminstancesClonePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances clone post bad request response has a 5xx status code +func (o *PcloudPvminstancesClonePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances clone post bad request response a status code equal to that given +func (o *PcloudPvminstancesClonePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances clone post bad request response +func (o *PcloudPvminstancesClonePostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesClonePostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesClonePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesClonePostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +217,8 @@ func NewPcloudPvminstancesClonePostUnauthorized() *PcloudPvminstancesClonePostUn return &PcloudPvminstancesClonePostUnauthorized{} } -/* PcloudPvminstancesClonePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesClonePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +226,44 @@ type PcloudPvminstancesClonePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances clone post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesClonePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances clone post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesClonePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances clone post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesClonePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances clone post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesClonePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances clone post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesClonePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances clone post unauthorized response +func (o *PcloudPvminstancesClonePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesClonePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesClonePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesClonePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +280,149 @@ 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{} } -/* PcloudPvminstancesClonePostConflict describes a response with status code 409, with default header values. +/* +PcloudPvminstancesClonePostConflict describes a response with status code 409, with default header values. Conflict */ @@ -173,9 +430,44 @@ type PcloudPvminstancesClonePostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances clone post conflict response has a 2xx status code +func (o *PcloudPvminstancesClonePostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances clone post conflict response has a 3xx status code +func (o *PcloudPvminstancesClonePostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances clone post conflict response has a 4xx status code +func (o *PcloudPvminstancesClonePostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances clone post conflict response has a 5xx status code +func (o *PcloudPvminstancesClonePostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances clone post conflict response a status code equal to that given +func (o *PcloudPvminstancesClonePostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances clone post conflict response +func (o *PcloudPvminstancesClonePostConflict) Code() int { + return 409 +} + func (o *PcloudPvminstancesClonePostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostConflict %+v", 409, o.Payload) } + +func (o *PcloudPvminstancesClonePostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostConflict %+v", 409, o.Payload) +} + func (o *PcloudPvminstancesClonePostConflict) GetPayload() *models.Error { return o.Payload } @@ -197,7 +489,8 @@ func NewPcloudPvminstancesClonePostUnprocessableEntity() *PcloudPvminstancesClon return &PcloudPvminstancesClonePostUnprocessableEntity{} } -/* PcloudPvminstancesClonePostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPvminstancesClonePostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +498,44 @@ type PcloudPvminstancesClonePostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances clone post unprocessable entity response has a 2xx status code +func (o *PcloudPvminstancesClonePostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances clone post unprocessable entity response has a 3xx status code +func (o *PcloudPvminstancesClonePostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances clone post unprocessable entity response has a 4xx status code +func (o *PcloudPvminstancesClonePostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances clone post unprocessable entity response has a 5xx status code +func (o *PcloudPvminstancesClonePostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances clone post unprocessable entity response a status code equal to that given +func (o *PcloudPvminstancesClonePostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud pvminstances clone post unprocessable entity response +func (o *PcloudPvminstancesClonePostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPvminstancesClonePostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPvminstancesClonePostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPvminstancesClonePostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +557,8 @@ func NewPcloudPvminstancesClonePostInternalServerError() *PcloudPvminstancesClon return &PcloudPvminstancesClonePostInternalServerError{} } -/* PcloudPvminstancesClonePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesClonePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +566,44 @@ type PcloudPvminstancesClonePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances clone post internal server error response has a 2xx status code +func (o *PcloudPvminstancesClonePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances clone post internal server error response has a 3xx status code +func (o *PcloudPvminstancesClonePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances clone post internal server error response has a 4xx status code +func (o *PcloudPvminstancesClonePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances clone post internal server error response has a 5xx status code +func (o *PcloudPvminstancesClonePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances clone post internal server error response a status code equal to that given +func (o *PcloudPvminstancesClonePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances clone post internal server error response +func (o *PcloudPvminstancesClonePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesClonePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesClonePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/clone][%d] pcloudPvminstancesClonePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesClonePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_parameters.go index 80d994b2c28..a0c8cc639fd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesConsoleGetParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudPvminstancesConsoleGetParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances console get operation. +/* +PcloudPvminstancesConsoleGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances console get operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesConsoleGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go index 1caf34981c1..77ef3346507 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go @@ -41,6 +41,18 @@ func (o *PcloudPvminstancesConsoleGetReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesConsoleGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesConsoleGetNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudPvminstancesConsoleGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudPvminstancesConsoleGetReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console] pcloud.pvminstances.console.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudPvminstancesConsoleGetOK() *PcloudPvminstancesConsoleGetOK { return &PcloudPvminstancesConsoleGetOK{} } -/* PcloudPvminstancesConsoleGetOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesConsoleGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudPvminstancesConsoleGetOK struct { Payload *models.ConsoleLanguages } +// IsSuccess returns true when this pcloud pvminstances console get o k response has a 2xx status code +func (o *PcloudPvminstancesConsoleGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances console get o k response has a 3xx status code +func (o *PcloudPvminstancesConsoleGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console get o k response has a 4xx status code +func (o *PcloudPvminstancesConsoleGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances console get o k response has a 5xx status code +func (o *PcloudPvminstancesConsoleGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console get o k response a status code equal to that given +func (o *PcloudPvminstancesConsoleGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances console get o k response +func (o *PcloudPvminstancesConsoleGetOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesConsoleGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesConsoleGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesConsoleGetOK) GetPayload() *models.ConsoleLanguages { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudPvminstancesConsoleGetBadRequest() *PcloudPvminstancesConsoleGetBa return &PcloudPvminstancesConsoleGetBadRequest{} } -/* PcloudPvminstancesConsoleGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesConsoleGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudPvminstancesConsoleGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console get bad request response has a 2xx status code +func (o *PcloudPvminstancesConsoleGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console get bad request response has a 3xx status code +func (o *PcloudPvminstancesConsoleGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console get bad request response has a 4xx status code +func (o *PcloudPvminstancesConsoleGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console get bad request response has a 5xx status code +func (o *PcloudPvminstancesConsoleGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console get bad request response a status code equal to that given +func (o *PcloudPvminstancesConsoleGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances console get bad request response +func (o *PcloudPvminstancesConsoleGetBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesConsoleGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesConsoleGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesConsoleGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudPvminstancesConsoleGetUnauthorized() *PcloudPvminstancesConsoleGet return &PcloudPvminstancesConsoleGetUnauthorized{} } -/* PcloudPvminstancesConsoleGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesConsoleGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudPvminstancesConsoleGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console get unauthorized response has a 2xx status code +func (o *PcloudPvminstancesConsoleGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console get unauthorized response has a 3xx status code +func (o *PcloudPvminstancesConsoleGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console get unauthorized response has a 4xx status code +func (o *PcloudPvminstancesConsoleGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console get unauthorized response has a 5xx status code +func (o *PcloudPvminstancesConsoleGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console get unauthorized response a status code equal to that given +func (o *PcloudPvminstancesConsoleGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances console get unauthorized response +func (o *PcloudPvminstancesConsoleGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesConsoleGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesConsoleGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesConsoleGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudPvminstancesConsoleGetUnauthorized) readResponse(response runtime return nil } +// NewPcloudPvminstancesConsoleGetForbidden creates a PcloudPvminstancesConsoleGetForbidden with default headers values +func NewPcloudPvminstancesConsoleGetForbidden() *PcloudPvminstancesConsoleGetForbidden { + return &PcloudPvminstancesConsoleGetForbidden{} +} + +/* +PcloudPvminstancesConsoleGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesConsoleGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances console get forbidden response has a 2xx status code +func (o *PcloudPvminstancesConsoleGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console get forbidden response has a 3xx status code +func (o *PcloudPvminstancesConsoleGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console get forbidden response has a 4xx status code +func (o *PcloudPvminstancesConsoleGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console get forbidden response has a 5xx status code +func (o *PcloudPvminstancesConsoleGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console get forbidden response a status code equal to that given +func (o *PcloudPvminstancesConsoleGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances console get forbidden response +func (o *PcloudPvminstancesConsoleGetForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesConsoleGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesConsoleGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesConsoleGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesConsoleGetForbidden) 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 +} + +// NewPcloudPvminstancesConsoleGetNotFound creates a PcloudPvminstancesConsoleGetNotFound with default headers values +func NewPcloudPvminstancesConsoleGetNotFound() *PcloudPvminstancesConsoleGetNotFound { + return &PcloudPvminstancesConsoleGetNotFound{} +} + +/* +PcloudPvminstancesConsoleGetNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesConsoleGetNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances console get not found response has a 2xx status code +func (o *PcloudPvminstancesConsoleGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console get not found response has a 3xx status code +func (o *PcloudPvminstancesConsoleGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console get not found response has a 4xx status code +func (o *PcloudPvminstancesConsoleGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console get not found response has a 5xx status code +func (o *PcloudPvminstancesConsoleGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console get not found response a status code equal to that given +func (o *PcloudPvminstancesConsoleGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances console get not found response +func (o *PcloudPvminstancesConsoleGetNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesConsoleGetNotFound) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesConsoleGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesConsoleGetNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesConsoleGetNotFound) 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 +} + // NewPcloudPvminstancesConsoleGetInternalServerError creates a PcloudPvminstancesConsoleGetInternalServerError with default headers values func NewPcloudPvminstancesConsoleGetInternalServerError() *PcloudPvminstancesConsoleGetInternalServerError { return &PcloudPvminstancesConsoleGetInternalServerError{} } -/* PcloudPvminstancesConsoleGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesConsoleGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudPvminstancesConsoleGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console get internal server error response has a 2xx status code +func (o *PcloudPvminstancesConsoleGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console get internal server error response has a 3xx status code +func (o *PcloudPvminstancesConsoleGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console get internal server error response has a 4xx status code +func (o *PcloudPvminstancesConsoleGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances console get internal server error response has a 5xx status code +func (o *PcloudPvminstancesConsoleGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances console get internal server error response a status code equal to that given +func (o *PcloudPvminstancesConsoleGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances console get internal server error response +func (o *PcloudPvminstancesConsoleGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesConsoleGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesConsoleGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsoleGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesConsoleGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_parameters.go index 86a27e66340..3566f8bd116 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesConsolePostParamsWithHTTPClient(client *http.Client) * } } -/* PcloudPvminstancesConsolePostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances console post operation. +/* +PcloudPvminstancesConsolePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances console post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesConsolePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go index 590e7f5b1eb..dab7e80c518 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go @@ -29,12 +29,30 @@ 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 { return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesConsolePostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesConsolePostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudPvminstancesConsolePostUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +66,7 @@ func (o *PcloudPvminstancesConsolePostReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console] pcloud.pvminstances.console.post", response, response.Code()) } } @@ -57,7 +75,8 @@ func NewPcloudPvminstancesConsolePostCreated() *PcloudPvminstancesConsolePostCre return &PcloudPvminstancesConsolePostCreated{} } -/* PcloudPvminstancesConsolePostCreated describes a response with status code 201, with default header values. +/* +PcloudPvminstancesConsolePostCreated describes a response with status code 201, with default header values. Created */ @@ -65,9 +84,44 @@ type PcloudPvminstancesConsolePostCreated struct { Payload *models.PVMInstanceConsole } +// IsSuccess returns true when this pcloud pvminstances console post created response has a 2xx status code +func (o *PcloudPvminstancesConsolePostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances console post created response has a 3xx status code +func (o *PcloudPvminstancesConsolePostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console post created response has a 4xx status code +func (o *PcloudPvminstancesConsolePostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances console post created response has a 5xx status code +func (o *PcloudPvminstancesConsolePostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console post created response a status code equal to that given +func (o *PcloudPvminstancesConsolePostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud pvminstances console post created response +func (o *PcloudPvminstancesConsolePostCreated) Code() int { + return 201 +} + func (o *PcloudPvminstancesConsolePostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostCreated %+v", 201, o.Payload) } + +func (o *PcloudPvminstancesConsolePostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostCreated %+v", 201, o.Payload) +} + func (o *PcloudPvminstancesConsolePostCreated) GetPayload() *models.PVMInstanceConsole { return o.Payload } @@ -84,12 +138,81 @@ 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{} } -/* PcloudPvminstancesConsolePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesConsolePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +220,44 @@ type PcloudPvminstancesConsolePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesConsolePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesConsolePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesConsolePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesConsolePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesConsolePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances console post unauthorized response +func (o *PcloudPvminstancesConsolePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesConsolePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesConsolePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesConsolePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +274,149 @@ func (o *PcloudPvminstancesConsolePostUnauthorized) readResponse(response runtim return nil } +// NewPcloudPvminstancesConsolePostForbidden creates a PcloudPvminstancesConsolePostForbidden with default headers values +func NewPcloudPvminstancesConsolePostForbidden() *PcloudPvminstancesConsolePostForbidden { + return &PcloudPvminstancesConsolePostForbidden{} +} + +/* +PcloudPvminstancesConsolePostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesConsolePostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances console post forbidden response has a 2xx status code +func (o *PcloudPvminstancesConsolePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console post forbidden response has a 3xx status code +func (o *PcloudPvminstancesConsolePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console post forbidden response has a 4xx status code +func (o *PcloudPvminstancesConsolePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console post forbidden response has a 5xx status code +func (o *PcloudPvminstancesConsolePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console post forbidden response a status code equal to that given +func (o *PcloudPvminstancesConsolePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances console post forbidden response +func (o *PcloudPvminstancesConsolePostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesConsolePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesConsolePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesConsolePostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesConsolePostForbidden) 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 +} + +// NewPcloudPvminstancesConsolePostNotFound creates a PcloudPvminstancesConsolePostNotFound with default headers values +func NewPcloudPvminstancesConsolePostNotFound() *PcloudPvminstancesConsolePostNotFound { + return &PcloudPvminstancesConsolePostNotFound{} +} + +/* +PcloudPvminstancesConsolePostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesConsolePostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances console post not found response has a 2xx status code +func (o *PcloudPvminstancesConsolePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console post not found response has a 3xx status code +func (o *PcloudPvminstancesConsolePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console post not found response has a 4xx status code +func (o *PcloudPvminstancesConsolePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console post not found response has a 5xx status code +func (o *PcloudPvminstancesConsolePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console post not found response a status code equal to that given +func (o *PcloudPvminstancesConsolePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances console post not found response +func (o *PcloudPvminstancesConsolePostNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesConsolePostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesConsolePostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesConsolePostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesConsolePostNotFound) 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 +} + // NewPcloudPvminstancesConsolePostUnprocessableEntity creates a PcloudPvminstancesConsolePostUnprocessableEntity with default headers values func NewPcloudPvminstancesConsolePostUnprocessableEntity() *PcloudPvminstancesConsolePostUnprocessableEntity { return &PcloudPvminstancesConsolePostUnprocessableEntity{} } -/* PcloudPvminstancesConsolePostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPvminstancesConsolePostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -129,9 +424,44 @@ type PcloudPvminstancesConsolePostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console post unprocessable entity response has a 2xx status code +func (o *PcloudPvminstancesConsolePostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console post unprocessable entity response has a 3xx status code +func (o *PcloudPvminstancesConsolePostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console post unprocessable entity response has a 4xx status code +func (o *PcloudPvminstancesConsolePostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console post unprocessable entity response has a 5xx status code +func (o *PcloudPvminstancesConsolePostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console post unprocessable entity response a status code equal to that given +func (o *PcloudPvminstancesConsolePostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud pvminstances console post unprocessable entity response +func (o *PcloudPvminstancesConsolePostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPvminstancesConsolePostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPvminstancesConsolePostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPvminstancesConsolePostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -153,7 +483,8 @@ func NewPcloudPvminstancesConsolePostInternalServerError() *PcloudPvminstancesCo return &PcloudPvminstancesConsolePostInternalServerError{} } -/* PcloudPvminstancesConsolePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesConsolePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +492,44 @@ type PcloudPvminstancesConsolePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console post internal server error response has a 2xx status code +func (o *PcloudPvminstancesConsolePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console post internal server error response has a 3xx status code +func (o *PcloudPvminstancesConsolePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console post internal server error response has a 4xx status code +func (o *PcloudPvminstancesConsolePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances console post internal server error response has a 5xx status code +func (o *PcloudPvminstancesConsolePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances console post internal server error response a status code equal to that given +func (o *PcloudPvminstancesConsolePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances console post internal server error response +func (o *PcloudPvminstancesConsolePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesConsolePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesConsolePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesConsolePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_parameters.go index a6f703784f5..bffe725ee3a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesConsolePutParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudPvminstancesConsolePutParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances console put operation. +/* +PcloudPvminstancesConsolePutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances console put operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesConsolePutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go index c3331bef565..bd5a3f1d57e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go @@ -41,6 +41,18 @@ func (o *PcloudPvminstancesConsolePutReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesConsolePutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesConsolePutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudPvminstancesConsolePutInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudPvminstancesConsolePutReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console] pcloud.pvminstances.console.put", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudPvminstancesConsolePutOK() *PcloudPvminstancesConsolePutOK { return &PcloudPvminstancesConsolePutOK{} } -/* PcloudPvminstancesConsolePutOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesConsolePutOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudPvminstancesConsolePutOK struct { Payload *models.ConsoleLanguage } +// IsSuccess returns true when this pcloud pvminstances console put o k response has a 2xx status code +func (o *PcloudPvminstancesConsolePutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances console put o k response has a 3xx status code +func (o *PcloudPvminstancesConsolePutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console put o k response has a 4xx status code +func (o *PcloudPvminstancesConsolePutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances console put o k response has a 5xx status code +func (o *PcloudPvminstancesConsolePutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console put o k response a status code equal to that given +func (o *PcloudPvminstancesConsolePutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances console put o k response +func (o *PcloudPvminstancesConsolePutOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesConsolePutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesConsolePutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesConsolePutOK) GetPayload() *models.ConsoleLanguage { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudPvminstancesConsolePutBadRequest() *PcloudPvminstancesConsolePutBa return &PcloudPvminstancesConsolePutBadRequest{} } -/* PcloudPvminstancesConsolePutBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesConsolePutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudPvminstancesConsolePutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console put bad request response has a 2xx status code +func (o *PcloudPvminstancesConsolePutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console put bad request response has a 3xx status code +func (o *PcloudPvminstancesConsolePutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console put bad request response has a 4xx status code +func (o *PcloudPvminstancesConsolePutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console put bad request response has a 5xx status code +func (o *PcloudPvminstancesConsolePutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console put bad request response a status code equal to that given +func (o *PcloudPvminstancesConsolePutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances console put bad request response +func (o *PcloudPvminstancesConsolePutBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesConsolePutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesConsolePutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesConsolePutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudPvminstancesConsolePutUnauthorized() *PcloudPvminstancesConsolePut return &PcloudPvminstancesConsolePutUnauthorized{} } -/* PcloudPvminstancesConsolePutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesConsolePutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudPvminstancesConsolePutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console put unauthorized response has a 2xx status code +func (o *PcloudPvminstancesConsolePutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console put unauthorized response has a 3xx status code +func (o *PcloudPvminstancesConsolePutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console put unauthorized response has a 4xx status code +func (o *PcloudPvminstancesConsolePutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console put unauthorized response has a 5xx status code +func (o *PcloudPvminstancesConsolePutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console put unauthorized response a status code equal to that given +func (o *PcloudPvminstancesConsolePutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances console put unauthorized response +func (o *PcloudPvminstancesConsolePutUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesConsolePutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesConsolePutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesConsolePutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudPvminstancesConsolePutUnauthorized) readResponse(response runtime return nil } +// NewPcloudPvminstancesConsolePutForbidden creates a PcloudPvminstancesConsolePutForbidden with default headers values +func NewPcloudPvminstancesConsolePutForbidden() *PcloudPvminstancesConsolePutForbidden { + return &PcloudPvminstancesConsolePutForbidden{} +} + +/* +PcloudPvminstancesConsolePutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesConsolePutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances console put forbidden response has a 2xx status code +func (o *PcloudPvminstancesConsolePutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console put forbidden response has a 3xx status code +func (o *PcloudPvminstancesConsolePutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console put forbidden response has a 4xx status code +func (o *PcloudPvminstancesConsolePutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console put forbidden response has a 5xx status code +func (o *PcloudPvminstancesConsolePutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console put forbidden response a status code equal to that given +func (o *PcloudPvminstancesConsolePutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances console put forbidden response +func (o *PcloudPvminstancesConsolePutForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesConsolePutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesConsolePutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesConsolePutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesConsolePutForbidden) 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 +} + +// NewPcloudPvminstancesConsolePutNotFound creates a PcloudPvminstancesConsolePutNotFound with default headers values +func NewPcloudPvminstancesConsolePutNotFound() *PcloudPvminstancesConsolePutNotFound { + return &PcloudPvminstancesConsolePutNotFound{} +} + +/* +PcloudPvminstancesConsolePutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesConsolePutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances console put not found response has a 2xx status code +func (o *PcloudPvminstancesConsolePutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console put not found response has a 3xx status code +func (o *PcloudPvminstancesConsolePutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console put not found response has a 4xx status code +func (o *PcloudPvminstancesConsolePutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances console put not found response has a 5xx status code +func (o *PcloudPvminstancesConsolePutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances console put not found response a status code equal to that given +func (o *PcloudPvminstancesConsolePutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances console put not found response +func (o *PcloudPvminstancesConsolePutNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesConsolePutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesConsolePutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesConsolePutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesConsolePutNotFound) 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 +} + // NewPcloudPvminstancesConsolePutInternalServerError creates a PcloudPvminstancesConsolePutInternalServerError with default headers values func NewPcloudPvminstancesConsolePutInternalServerError() *PcloudPvminstancesConsolePutInternalServerError { return &PcloudPvminstancesConsolePutInternalServerError{} } -/* PcloudPvminstancesConsolePutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesConsolePutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudPvminstancesConsolePutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances console put internal server error response has a 2xx status code +func (o *PcloudPvminstancesConsolePutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances console put internal server error response has a 3xx status code +func (o *PcloudPvminstancesConsolePutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances console put internal server error response has a 4xx status code +func (o *PcloudPvminstancesConsolePutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances console put internal server error response has a 5xx status code +func (o *PcloudPvminstancesConsolePutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances console put internal server error response a status code equal to that given +func (o *PcloudPvminstancesConsolePutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances console put internal server error response +func (o *PcloudPvminstancesConsolePutInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesConsolePutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesConsolePutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console][%d] pcloudPvminstancesConsolePutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesConsolePutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_parameters.go index 8c369a0106d..6198133323c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_parameters.go @@ -53,10 +53,12 @@ func NewPcloudPvminstancesDeleteParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudPvminstancesDeleteParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances delete operation. +/* +PcloudPvminstancesDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances delete operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go index 18189dcdeb9..cd3481f07ef 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesDeleteReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudPvminstancesDeleteReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}] pcloud.pvminstances.delete", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudPvminstancesDeleteOK() *PcloudPvminstancesDeleteOK { return &PcloudPvminstancesDeleteOK{} } -/* PcloudPvminstancesDeleteOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudPvminstancesDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances delete o k response has a 2xx status code +func (o *PcloudPvminstancesDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances delete o k response has a 3xx status code +func (o *PcloudPvminstancesDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances delete o k response has a 4xx status code +func (o *PcloudPvminstancesDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances delete o k response has a 5xx status code +func (o *PcloudPvminstancesDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances delete o k response a status code equal to that given +func (o *PcloudPvminstancesDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances delete o k response +func (o *PcloudPvminstancesDeleteOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudPvminstancesDeleteBadRequest() *PcloudPvminstancesDeleteBadRequest return &PcloudPvminstancesDeleteBadRequest{} } -/* PcloudPvminstancesDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudPvminstancesDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances delete bad request response has a 2xx status code +func (o *PcloudPvminstancesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances delete bad request response has a 3xx status code +func (o *PcloudPvminstancesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances delete bad request response has a 4xx status code +func (o *PcloudPvminstancesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances delete bad request response has a 5xx status code +func (o *PcloudPvminstancesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances delete bad request response a status code equal to that given +func (o *PcloudPvminstancesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances delete bad request response +func (o *PcloudPvminstancesDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudPvminstancesDeleteUnauthorized() *PcloudPvminstancesDeleteUnauthor return &PcloudPvminstancesDeleteUnauthorized{} } -/* PcloudPvminstancesDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudPvminstancesDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances delete unauthorized response has a 2xx status code +func (o *PcloudPvminstancesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances delete unauthorized response has a 3xx status code +func (o *PcloudPvminstancesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances delete unauthorized response has a 4xx status code +func (o *PcloudPvminstancesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances delete unauthorized response has a 5xx status code +func (o *PcloudPvminstancesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances delete unauthorized response a status code equal to that given +func (o *PcloudPvminstancesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances delete unauthorized response +func (o *PcloudPvminstancesDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ func (o *PcloudPvminstancesDeleteUnauthorized) readResponse(response runtime.Cli return nil } +// NewPcloudPvminstancesDeleteForbidden creates a PcloudPvminstancesDeleteForbidden with default headers values +func NewPcloudPvminstancesDeleteForbidden() *PcloudPvminstancesDeleteForbidden { + return &PcloudPvminstancesDeleteForbidden{} +} + +/* +PcloudPvminstancesDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances delete forbidden response has a 2xx status code +func (o *PcloudPvminstancesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances delete forbidden response has a 3xx status code +func (o *PcloudPvminstancesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances delete forbidden response has a 4xx status code +func (o *PcloudPvminstancesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances delete forbidden response has a 5xx status code +func (o *PcloudPvminstancesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances delete forbidden response a status code equal to that given +func (o *PcloudPvminstancesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances delete forbidden response +func (o *PcloudPvminstancesDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesDeleteForbidden) 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 +} + // NewPcloudPvminstancesDeleteNotFound creates a PcloudPvminstancesDeleteNotFound with default headers values func NewPcloudPvminstancesDeleteNotFound() *PcloudPvminstancesDeleteNotFound { return &PcloudPvminstancesDeleteNotFound{} } -/* PcloudPvminstancesDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudPvminstancesDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances delete not found response has a 2xx status code +func (o *PcloudPvminstancesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances delete not found response has a 3xx status code +func (o *PcloudPvminstancesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances delete not found response has a 4xx status code +func (o *PcloudPvminstancesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances delete not found response has a 5xx status code +func (o *PcloudPvminstancesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances delete not found response a status code equal to that given +func (o *PcloudPvminstancesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances delete not found response +func (o *PcloudPvminstancesDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudPvminstancesDeleteGone() *PcloudPvminstancesDeleteGone { return &PcloudPvminstancesDeleteGone{} } -/* PcloudPvminstancesDeleteGone describes a response with status code 410, with default header values. +/* +PcloudPvminstancesDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -203,9 +422,44 @@ type PcloudPvminstancesDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances delete gone response has a 2xx status code +func (o *PcloudPvminstancesDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances delete gone response has a 3xx status code +func (o *PcloudPvminstancesDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances delete gone response has a 4xx status code +func (o *PcloudPvminstancesDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances delete gone response has a 5xx status code +func (o *PcloudPvminstancesDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances delete gone response a status code equal to that given +func (o *PcloudPvminstancesDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud pvminstances delete gone response +func (o *PcloudPvminstancesDeleteGone) Code() int { + return 410 +} + func (o *PcloudPvminstancesDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudPvminstancesDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudPvminstancesDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudPvminstancesDeleteInternalServerError() *PcloudPvminstancesDeleteI return &PcloudPvminstancesDeleteInternalServerError{} } -/* PcloudPvminstancesDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudPvminstancesDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances delete internal server error response has a 2xx status code +func (o *PcloudPvminstancesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances delete internal server error response has a 3xx status code +func (o *PcloudPvminstancesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances delete internal server error response has a 4xx status code +func (o *PcloudPvminstancesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances delete internal server error response has a 5xx status code +func (o *PcloudPvminstancesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances delete internal server error response a status code equal to that given +func (o *PcloudPvminstancesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances delete internal server error response +func (o *PcloudPvminstancesDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_parameters.go index ebbc6f4a779..da6e9ea3732 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesGetParamsWithHTTPClient(client *http.Client) *PcloudPv } } -/* PcloudPvminstancesGetParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances get operation. +/* +PcloudPvminstancesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances get operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go index ddd375ee49b..e651c345a33 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesGetReader) ReadResponse(response runtime.ClientRespon return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudPvminstancesGetReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}] pcloud.pvminstances.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudPvminstancesGetOK() *PcloudPvminstancesGetOK { return &PcloudPvminstancesGetOK{} } -/* PcloudPvminstancesGetOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudPvminstancesGetOK struct { Payload *models.PVMInstance } +// IsSuccess returns true when this pcloud pvminstances get o k response has a 2xx status code +func (o *PcloudPvminstancesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances get o k response has a 3xx status code +func (o *PcloudPvminstancesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances get o k response has a 4xx status code +func (o *PcloudPvminstancesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances get o k response has a 5xx status code +func (o *PcloudPvminstancesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances get o k response a status code equal to that given +func (o *PcloudPvminstancesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances get o k response +func (o *PcloudPvminstancesGetOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesGetOK) GetPayload() *models.PVMInstance { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudPvminstancesGetBadRequest() *PcloudPvminstancesGetBadRequest { return &PcloudPvminstancesGetBadRequest{} } -/* PcloudPvminstancesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudPvminstancesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances get bad request response has a 2xx status code +func (o *PcloudPvminstancesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances get bad request response has a 3xx status code +func (o *PcloudPvminstancesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances get bad request response has a 4xx status code +func (o *PcloudPvminstancesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances get bad request response has a 5xx status code +func (o *PcloudPvminstancesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances get bad request response a status code equal to that given +func (o *PcloudPvminstancesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances get bad request response +func (o *PcloudPvminstancesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudPvminstancesGetUnauthorized() *PcloudPvminstancesGetUnauthorized { return &PcloudPvminstancesGetUnauthorized{} } -/* PcloudPvminstancesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudPvminstancesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances get unauthorized response has a 2xx status code +func (o *PcloudPvminstancesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances get unauthorized response has a 3xx status code +func (o *PcloudPvminstancesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances get unauthorized response has a 4xx status code +func (o *PcloudPvminstancesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances get unauthorized response has a 5xx status code +func (o *PcloudPvminstancesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances get unauthorized response a status code equal to that given +func (o *PcloudPvminstancesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances get unauthorized response +func (o *PcloudPvminstancesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudPvminstancesGetUnauthorized) readResponse(response runtime.Client return nil } +// NewPcloudPvminstancesGetForbidden creates a PcloudPvminstancesGetForbidden with default headers values +func NewPcloudPvminstancesGetForbidden() *PcloudPvminstancesGetForbidden { + return &PcloudPvminstancesGetForbidden{} +} + +/* +PcloudPvminstancesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances get forbidden response has a 2xx status code +func (o *PcloudPvminstancesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances get forbidden response has a 3xx status code +func (o *PcloudPvminstancesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances get forbidden response has a 4xx status code +func (o *PcloudPvminstancesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances get forbidden response has a 5xx status code +func (o *PcloudPvminstancesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances get forbidden response a status code equal to that given +func (o *PcloudPvminstancesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances get forbidden response +func (o *PcloudPvminstancesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesGetForbidden) 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 +} + // NewPcloudPvminstancesGetNotFound creates a PcloudPvminstancesGetNotFound with default headers values func NewPcloudPvminstancesGetNotFound() *PcloudPvminstancesGetNotFound { return &PcloudPvminstancesGetNotFound{} } -/* PcloudPvminstancesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudPvminstancesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances get not found response has a 2xx status code +func (o *PcloudPvminstancesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances get not found response has a 3xx status code +func (o *PcloudPvminstancesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances get not found response has a 4xx status code +func (o *PcloudPvminstancesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances get not found response has a 5xx status code +func (o *PcloudPvminstancesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances get not found response a status code equal to that given +func (o *PcloudPvminstancesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances get not found response +func (o *PcloudPvminstancesGetNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudPvminstancesGetInternalServerError() *PcloudPvminstancesGetInterna return &PcloudPvminstancesGetInternalServerError{} } -/* PcloudPvminstancesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudPvminstancesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances get internal server error response has a 2xx status code +func (o *PcloudPvminstancesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances get internal server error response has a 3xx status code +func (o *PcloudPvminstancesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances get internal server error response has a 4xx status code +func (o *PcloudPvminstancesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances get internal server error response has a 5xx status code +func (o *PcloudPvminstancesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances get internal server error response a status code equal to that given +func (o *PcloudPvminstancesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances get internal server error response +func (o *PcloudPvminstancesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_parameters.go index 88205d338e5..9aea7e829f3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesGetallParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudPvminstancesGetallParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances getall operation. +/* +PcloudPvminstancesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances getall operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go index f55d76239f3..02ff99af194 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go @@ -41,6 +41,24 @@ func (o *PcloudPvminstancesGetallReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { + return nil, err + } + return nil, result case 500: result := NewPcloudPvminstancesGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +66,7 @@ func (o *PcloudPvminstancesGetallReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances] pcloud.pvminstances.getall", response, response.Code()) } } @@ -57,7 +75,8 @@ func NewPcloudPvminstancesGetallOK() *PcloudPvminstancesGetallOK { return &PcloudPvminstancesGetallOK{} } -/* PcloudPvminstancesGetallOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +84,44 @@ type PcloudPvminstancesGetallOK struct { Payload *models.PVMInstances } +// IsSuccess returns true when this pcloud pvminstances getall o k response has a 2xx status code +func (o *PcloudPvminstancesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances getall o k response has a 3xx status code +func (o *PcloudPvminstancesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances getall o k response has a 4xx status code +func (o *PcloudPvminstancesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances getall o k response has a 5xx status code +func (o *PcloudPvminstancesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances getall o k response a status code equal to that given +func (o *PcloudPvminstancesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances getall o k response +func (o *PcloudPvminstancesGetallOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesGetallOK) GetPayload() *models.PVMInstances { return o.Payload } @@ -89,7 +143,8 @@ func NewPcloudPvminstancesGetallBadRequest() *PcloudPvminstancesGetallBadRequest return &PcloudPvminstancesGetallBadRequest{} } -/* PcloudPvminstancesGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +152,44 @@ type PcloudPvminstancesGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances getall bad request response has a 2xx status code +func (o *PcloudPvminstancesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances getall bad request response has a 3xx status code +func (o *PcloudPvminstancesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances getall bad request response has a 4xx status code +func (o *PcloudPvminstancesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances getall bad request response has a 5xx status code +func (o *PcloudPvminstancesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances getall bad request response a status code equal to that given +func (o *PcloudPvminstancesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances getall bad request response +func (o *PcloudPvminstancesGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +211,8 @@ func NewPcloudPvminstancesGetallUnauthorized() *PcloudPvminstancesGetallUnauthor return &PcloudPvminstancesGetallUnauthorized{} } -/* PcloudPvminstancesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +220,44 @@ type PcloudPvminstancesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances getall unauthorized response has a 2xx status code +func (o *PcloudPvminstancesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances getall unauthorized response has a 3xx status code +func (o *PcloudPvminstancesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances getall unauthorized response has a 4xx status code +func (o *PcloudPvminstancesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances getall unauthorized response has a 5xx status code +func (o *PcloudPvminstancesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances getall unauthorized response a status code equal to that given +func (o *PcloudPvminstancesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances getall unauthorized response +func (o *PcloudPvminstancesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +274,217 @@ func (o *PcloudPvminstancesGetallUnauthorized) readResponse(response runtime.Cli return nil } +// NewPcloudPvminstancesGetallForbidden creates a PcloudPvminstancesGetallForbidden with default headers values +func NewPcloudPvminstancesGetallForbidden() *PcloudPvminstancesGetallForbidden { + return &PcloudPvminstancesGetallForbidden{} +} + +/* +PcloudPvminstancesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances getall forbidden response has a 2xx status code +func (o *PcloudPvminstancesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances getall forbidden response has a 3xx status code +func (o *PcloudPvminstancesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances getall forbidden response has a 4xx status code +func (o *PcloudPvminstancesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances getall forbidden response has a 5xx status code +func (o *PcloudPvminstancesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances getall forbidden response a status code equal to that given +func (o *PcloudPvminstancesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances getall forbidden response +func (o *PcloudPvminstancesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesGetallForbidden) 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 +} + +// 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{} +} + +/* +PcloudPvminstancesGetallRequestTimeout describes a response with status code 408, with default header values. + +Request Timeout +*/ +type PcloudPvminstancesGetallRequestTimeout struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances getall request timeout response has a 2xx status code +func (o *PcloudPvminstancesGetallRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances getall request timeout response has a 3xx status code +func (o *PcloudPvminstancesGetallRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances getall request timeout response has a 4xx status code +func (o *PcloudPvminstancesGetallRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances getall request timeout response has a 5xx status code +func (o *PcloudPvminstancesGetallRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances getall request timeout response a status code equal to that given +func (o *PcloudPvminstancesGetallRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud pvminstances getall request timeout response +func (o *PcloudPvminstancesGetallRequestTimeout) Code() int { + return 408 +} + +func (o *PcloudPvminstancesGetallRequestTimeout) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallRequestTimeout %+v", 408, o.Payload) +} + +func (o *PcloudPvminstancesGetallRequestTimeout) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallRequestTimeout %+v", 408, o.Payload) +} + +func (o *PcloudPvminstancesGetallRequestTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesGetallRequestTimeout) 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 +} + // NewPcloudPvminstancesGetallInternalServerError creates a PcloudPvminstancesGetallInternalServerError with default headers values func NewPcloudPvminstancesGetallInternalServerError() *PcloudPvminstancesGetallInternalServerError { return &PcloudPvminstancesGetallInternalServerError{} } -/* PcloudPvminstancesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +492,44 @@ type PcloudPvminstancesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances getall internal server error response has a 2xx status code +func (o *PcloudPvminstancesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances getall internal server error response has a 3xx status code +func (o *PcloudPvminstancesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances getall internal server error response has a 4xx status code +func (o *PcloudPvminstancesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances getall internal server error response has a 5xx status code +func (o *PcloudPvminstancesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances getall internal server error response a status code equal to that given +func (o *PcloudPvminstancesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances getall internal server error response +func (o *PcloudPvminstancesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_parameters.go index 5b6b0ee46c5..cb8531804eb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesNetworksDeleteParamsWithHTTPClient(client *http.Client } } -/* PcloudPvminstancesNetworksDeleteParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances networks delete operation. +/* +PcloudPvminstancesNetworksDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances networks delete operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesNetworksDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go index 38648bbb788..8cab7f44d8c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudPvminstancesNetworksDeleteReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}] pcloud.pvminstances.networks.delete", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudPvminstancesNetworksDeleteOK() *PcloudPvminstancesNetworksDeleteOK return &PcloudPvminstancesNetworksDeleteOK{} } -/* PcloudPvminstancesNetworksDeleteOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesNetworksDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudPvminstancesNetworksDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances networks delete o k response has a 2xx status code +func (o *PcloudPvminstancesNetworksDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances networks delete o k response has a 3xx status code +func (o *PcloudPvminstancesNetworksDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks delete o k response has a 4xx status code +func (o *PcloudPvminstancesNetworksDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances networks delete o k response has a 5xx status code +func (o *PcloudPvminstancesNetworksDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks delete o k response a status code equal to that given +func (o *PcloudPvminstancesNetworksDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances networks delete o k response +func (o *PcloudPvminstancesNetworksDeleteOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesNetworksDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesNetworksDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesNetworksDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudPvminstancesNetworksDeleteBadRequest() *PcloudPvminstancesNetworks return &PcloudPvminstancesNetworksDeleteBadRequest{} } -/* PcloudPvminstancesNetworksDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesNetworksDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudPvminstancesNetworksDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks delete bad request response has a 2xx status code +func (o *PcloudPvminstancesNetworksDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks delete bad request response has a 3xx status code +func (o *PcloudPvminstancesNetworksDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks delete bad request response has a 4xx status code +func (o *PcloudPvminstancesNetworksDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks delete bad request response has a 5xx status code +func (o *PcloudPvminstancesNetworksDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks delete bad request response a status code equal to that given +func (o *PcloudPvminstancesNetworksDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances networks delete bad request response +func (o *PcloudPvminstancesNetworksDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesNetworksDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesNetworksDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesNetworksDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudPvminstancesNetworksDeleteUnauthorized() *PcloudPvminstancesNetwor return &PcloudPvminstancesNetworksDeleteUnauthorized{} } -/* PcloudPvminstancesNetworksDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesNetworksDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudPvminstancesNetworksDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks delete unauthorized response has a 2xx status code +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks delete unauthorized response has a 3xx status code +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks delete unauthorized response has a 4xx status code +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks delete unauthorized response has a 5xx status code +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks delete unauthorized response a status code equal to that given +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances networks delete unauthorized response +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesNetworksDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesNetworksDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesNetworksDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ 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{} } -/* PcloudPvminstancesNetworksDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesNetworksDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudPvminstancesNetworksDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks delete not found response has a 2xx status code +func (o *PcloudPvminstancesNetworksDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks delete not found response has a 3xx status code +func (o *PcloudPvminstancesNetworksDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks delete not found response has a 4xx status code +func (o *PcloudPvminstancesNetworksDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks delete not found response has a 5xx status code +func (o *PcloudPvminstancesNetworksDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks delete not found response a status code equal to that given +func (o *PcloudPvminstancesNetworksDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances networks delete not found response +func (o *PcloudPvminstancesNetworksDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesNetworksDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesNetworksDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesNetworksDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudPvminstancesNetworksDeleteGone() *PcloudPvminstancesNetworksDelete return &PcloudPvminstancesNetworksDeleteGone{} } -/* PcloudPvminstancesNetworksDeleteGone describes a response with status code 410, with default header values. +/* +PcloudPvminstancesNetworksDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -203,9 +422,44 @@ type PcloudPvminstancesNetworksDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks delete gone response has a 2xx status code +func (o *PcloudPvminstancesNetworksDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks delete gone response has a 3xx status code +func (o *PcloudPvminstancesNetworksDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks delete gone response has a 4xx status code +func (o *PcloudPvminstancesNetworksDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks delete gone response has a 5xx status code +func (o *PcloudPvminstancesNetworksDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks delete gone response a status code equal to that given +func (o *PcloudPvminstancesNetworksDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud pvminstances networks delete gone response +func (o *PcloudPvminstancesNetworksDeleteGone) Code() int { + return 410 +} + func (o *PcloudPvminstancesNetworksDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudPvminstancesNetworksDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudPvminstancesNetworksDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudPvminstancesNetworksDeleteInternalServerError() *PcloudPvminstance return &PcloudPvminstancesNetworksDeleteInternalServerError{} } -/* PcloudPvminstancesNetworksDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesNetworksDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudPvminstancesNetworksDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks delete internal server error response has a 2xx status code +func (o *PcloudPvminstancesNetworksDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks delete internal server error response has a 3xx status code +func (o *PcloudPvminstancesNetworksDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks delete internal server error response has a 4xx status code +func (o *PcloudPvminstancesNetworksDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances networks delete internal server error response has a 5xx status code +func (o *PcloudPvminstancesNetworksDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances networks delete internal server error response a status code equal to that given +func (o *PcloudPvminstancesNetworksDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances networks delete internal server error response +func (o *PcloudPvminstancesNetworksDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesNetworksDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesNetworksDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesNetworksDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_parameters.go index c9a444ef56d..c9903222915 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesNetworksGetParamsWithHTTPClient(client *http.Client) * } } -/* PcloudPvminstancesNetworksGetParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances networks get operation. +/* +PcloudPvminstancesNetworksGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances networks get operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesNetworksGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go index 1587866e424..531951a048a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *PcloudPvminstancesNetworksGetReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}] pcloud.pvminstances.networks.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudPvminstancesNetworksGetOK() *PcloudPvminstancesNetworksGetOK { return &PcloudPvminstancesNetworksGetOK{} } -/* PcloudPvminstancesNetworksGetOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesNetworksGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudPvminstancesNetworksGetOK struct { Payload *models.PVMInstanceNetworks } +// IsSuccess returns true when this pcloud pvminstances networks get o k response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances networks get o k response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks get o k response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances networks get o k response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks get o k response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances networks get o k response +func (o *PcloudPvminstancesNetworksGetOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesNetworksGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesNetworksGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesNetworksGetOK) GetPayload() *models.PVMInstanceNetworks { return o.Payload } @@ -84,12 +132,81 @@ 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{} } -/* PcloudPvminstancesNetworksGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesNetworksGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudPvminstancesNetworksGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks get unauthorized response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks get unauthorized response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks get unauthorized response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks get unauthorized response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks get unauthorized response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances networks get unauthorized response +func (o *PcloudPvminstancesNetworksGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesNetworksGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesNetworksGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesNetworksGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ 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{} } -/* PcloudPvminstancesNetworksGetNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesNetworksGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudPvminstancesNetworksGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks get not found response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks get not found response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks get not found response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks get not found response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks get not found response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances networks get not found response +func (o *PcloudPvminstancesNetworksGetNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesNetworksGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesNetworksGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesNetworksGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudPvminstancesNetworksGetInternalServerError() *PcloudPvminstancesNe return &PcloudPvminstancesNetworksGetInternalServerError{} } -/* PcloudPvminstancesNetworksGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesNetworksGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudPvminstancesNetworksGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks get internal server error response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks get internal server error response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks get internal server error response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances networks get internal server error response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances networks get internal server error response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances networks get internal server error response +func (o *PcloudPvminstancesNetworksGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesNetworksGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesNetworksGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}][%d] pcloudPvminstancesNetworksGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesNetworksGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_parameters.go index 97fe7898ddb..6871438eb59 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesNetworksGetallParamsWithHTTPClient(client *http.Client } } -/* PcloudPvminstancesNetworksGetallParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances networks getall operation. +/* +PcloudPvminstancesNetworksGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances networks getall operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesNetworksGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go index 79103867be2..5ec15c718c7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *PcloudPvminstancesNetworksGetallReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks] pcloud.pvminstances.networks.getall", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudPvminstancesNetworksGetallOK() *PcloudPvminstancesNetworksGetallOK return &PcloudPvminstancesNetworksGetallOK{} } -/* PcloudPvminstancesNetworksGetallOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesNetworksGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudPvminstancesNetworksGetallOK struct { Payload *models.PVMInstanceNetworks } +// IsSuccess returns true when this pcloud pvminstances networks getall o k response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances networks getall o k response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks getall o k response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances networks getall o k response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks getall o k response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances networks getall o k response +func (o *PcloudPvminstancesNetworksGetallOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesNetworksGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesNetworksGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesNetworksGetallOK) GetPayload() *models.PVMInstanceNetworks { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudPvminstancesNetworksGetallBadRequest() *PcloudPvminstancesNetworks return &PcloudPvminstancesNetworksGetallBadRequest{} } -/* PcloudPvminstancesNetworksGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesNetworksGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudPvminstancesNetworksGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks getall bad request response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks getall bad request response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks getall bad request response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks getall bad request response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks getall bad request response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances networks getall bad request response +func (o *PcloudPvminstancesNetworksGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesNetworksGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesNetworksGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesNetworksGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudPvminstancesNetworksGetallUnauthorized() *PcloudPvminstancesNetwor return &PcloudPvminstancesNetworksGetallUnauthorized{} } -/* PcloudPvminstancesNetworksGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesNetworksGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudPvminstancesNetworksGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks getall unauthorized response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks getall unauthorized response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks getall unauthorized response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks getall unauthorized response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks getall unauthorized response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances networks getall unauthorized response +func (o *PcloudPvminstancesNetworksGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesNetworksGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesNetworksGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesNetworksGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ 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{} } -/* PcloudPvminstancesNetworksGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesNetworksGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudPvminstancesNetworksGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks getall internal server error response has a 2xx status code +func (o *PcloudPvminstancesNetworksGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks getall internal server error response has a 3xx status code +func (o *PcloudPvminstancesNetworksGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks getall internal server error response has a 4xx status code +func (o *PcloudPvminstancesNetworksGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances networks getall internal server error response has a 5xx status code +func (o *PcloudPvminstancesNetworksGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances networks getall internal server error response a status code equal to that given +func (o *PcloudPvminstancesNetworksGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances networks getall internal server error response +func (o *PcloudPvminstancesNetworksGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesNetworksGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesNetworksGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesNetworksGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_parameters.go index 23c0b0d4828..70a2d29c638 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesNetworksPostParamsWithHTTPClient(client *http.Client) } } -/* PcloudPvminstancesNetworksPostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances networks post operation. +/* +PcloudPvminstancesNetworksPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances networks post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesNetworksPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go index 4bd3ed07c33..5940468248a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +72,7 @@ func (o *PcloudPvminstancesNetworksPostReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks] pcloud.pvminstances.networks.post", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewPcloudPvminstancesNetworksPostCreated() *PcloudPvminstancesNetworksPostC return &PcloudPvminstancesNetworksPostCreated{} } -/* PcloudPvminstancesNetworksPostCreated describes a response with status code 201, with default header values. +/* +PcloudPvminstancesNetworksPostCreated describes a response with status code 201, with default header values. Created */ @@ -77,9 +90,44 @@ type PcloudPvminstancesNetworksPostCreated struct { Payload *models.PVMInstanceNetwork } +// IsSuccess returns true when this pcloud pvminstances networks post created response has a 2xx status code +func (o *PcloudPvminstancesNetworksPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances networks post created response has a 3xx status code +func (o *PcloudPvminstancesNetworksPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks post created response has a 4xx status code +func (o *PcloudPvminstancesNetworksPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances networks post created response has a 5xx status code +func (o *PcloudPvminstancesNetworksPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks post created response a status code equal to that given +func (o *PcloudPvminstancesNetworksPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud pvminstances networks post created response +func (o *PcloudPvminstancesNetworksPostCreated) Code() int { + return 201 +} + func (o *PcloudPvminstancesNetworksPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostCreated %+v", 201, o.Payload) } + +func (o *PcloudPvminstancesNetworksPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostCreated %+v", 201, o.Payload) +} + func (o *PcloudPvminstancesNetworksPostCreated) GetPayload() *models.PVMInstanceNetwork { return o.Payload } @@ -101,7 +149,8 @@ func NewPcloudPvminstancesNetworksPostBadRequest() *PcloudPvminstancesNetworksPo return &PcloudPvminstancesNetworksPostBadRequest{} } -/* PcloudPvminstancesNetworksPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesNetworksPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +158,44 @@ type PcloudPvminstancesNetworksPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks post bad request response has a 2xx status code +func (o *PcloudPvminstancesNetworksPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks post bad request response has a 3xx status code +func (o *PcloudPvminstancesNetworksPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks post bad request response has a 4xx status code +func (o *PcloudPvminstancesNetworksPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks post bad request response has a 5xx status code +func (o *PcloudPvminstancesNetworksPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks post bad request response a status code equal to that given +func (o *PcloudPvminstancesNetworksPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances networks post bad request response +func (o *PcloudPvminstancesNetworksPostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesNetworksPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesNetworksPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesNetworksPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +217,8 @@ func NewPcloudPvminstancesNetworksPostUnauthorized() *PcloudPvminstancesNetworks return &PcloudPvminstancesNetworksPostUnauthorized{} } -/* PcloudPvminstancesNetworksPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesNetworksPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +226,44 @@ type PcloudPvminstancesNetworksPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesNetworksPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesNetworksPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesNetworksPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesNetworksPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesNetworksPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances networks post unauthorized response +func (o *PcloudPvminstancesNetworksPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesNetworksPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesNetworksPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesNetworksPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +280,149 @@ 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{} } -/* PcloudPvminstancesNetworksPostConflict describes a response with status code 409, with default header values. +/* +PcloudPvminstancesNetworksPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -173,9 +430,44 @@ type PcloudPvminstancesNetworksPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks post conflict response has a 2xx status code +func (o *PcloudPvminstancesNetworksPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks post conflict response has a 3xx status code +func (o *PcloudPvminstancesNetworksPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks post conflict response has a 4xx status code +func (o *PcloudPvminstancesNetworksPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks post conflict response has a 5xx status code +func (o *PcloudPvminstancesNetworksPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks post conflict response a status code equal to that given +func (o *PcloudPvminstancesNetworksPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances networks post conflict response +func (o *PcloudPvminstancesNetworksPostConflict) Code() int { + return 409 +} + func (o *PcloudPvminstancesNetworksPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostConflict %+v", 409, o.Payload) } + +func (o *PcloudPvminstancesNetworksPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostConflict %+v", 409, o.Payload) +} + func (o *PcloudPvminstancesNetworksPostConflict) GetPayload() *models.Error { return o.Payload } @@ -197,7 +489,8 @@ func NewPcloudPvminstancesNetworksPostUnprocessableEntity() *PcloudPvminstancesN return &PcloudPvminstancesNetworksPostUnprocessableEntity{} } -/* PcloudPvminstancesNetworksPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPvminstancesNetworksPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +498,44 @@ type PcloudPvminstancesNetworksPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks post unprocessable entity response has a 2xx status code +func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks post unprocessable entity response has a 3xx status code +func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks post unprocessable entity response has a 4xx status code +func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances networks post unprocessable entity response has a 5xx status code +func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances networks post unprocessable entity response a status code equal to that given +func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud pvminstances networks post unprocessable entity response +func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPvminstancesNetworksPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +557,8 @@ func NewPcloudPvminstancesNetworksPostInternalServerError() *PcloudPvminstancesN return &PcloudPvminstancesNetworksPostInternalServerError{} } -/* PcloudPvminstancesNetworksPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesNetworksPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +566,44 @@ type PcloudPvminstancesNetworksPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances networks post internal server error response has a 2xx status code +func (o *PcloudPvminstancesNetworksPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances networks post internal server error response has a 3xx status code +func (o *PcloudPvminstancesNetworksPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances networks post internal server error response has a 4xx status code +func (o *PcloudPvminstancesNetworksPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances networks post internal server error response has a 5xx status code +func (o *PcloudPvminstancesNetworksPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances networks post internal server error response a status code equal to that given +func (o *PcloudPvminstancesNetworksPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances networks post internal server error response +func (o *PcloudPvminstancesNetworksPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesNetworksPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesNetworksPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks][%d] pcloudPvminstancesNetworksPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesNetworksPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_parameters.go index adf9227844c..d21988dd2b0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesOperationsPostParamsWithHTTPClient(client *http.Client } } -/* PcloudPvminstancesOperationsPostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances operations post operation. +/* +PcloudPvminstancesOperationsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances operations post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesOperationsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go index a68b4319111..b02cae3f79a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudPvminstancesOperationsPostReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations] pcloud.pvminstances.operations.post", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudPvminstancesOperationsPostOK() *PcloudPvminstancesOperationsPostOK return &PcloudPvminstancesOperationsPostOK{} } -/* PcloudPvminstancesOperationsPostOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesOperationsPostOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudPvminstancesOperationsPostOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances operations post o k response has a 2xx status code +func (o *PcloudPvminstancesOperationsPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances operations post o k response has a 3xx status code +func (o *PcloudPvminstancesOperationsPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances operations post o k response has a 4xx status code +func (o *PcloudPvminstancesOperationsPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances operations post o k response has a 5xx status code +func (o *PcloudPvminstancesOperationsPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances operations post o k response a status code equal to that given +func (o *PcloudPvminstancesOperationsPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances operations post o k response +func (o *PcloudPvminstancesOperationsPostOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesOperationsPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesOperationsPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesOperationsPostOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudPvminstancesOperationsPostBadRequest() *PcloudPvminstancesOperatio return &PcloudPvminstancesOperationsPostBadRequest{} } -/* PcloudPvminstancesOperationsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesOperationsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudPvminstancesOperationsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances operations post bad request response has a 2xx status code +func (o *PcloudPvminstancesOperationsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances operations post bad request response has a 3xx status code +func (o *PcloudPvminstancesOperationsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances operations post bad request response has a 4xx status code +func (o *PcloudPvminstancesOperationsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances operations post bad request response has a 5xx status code +func (o *PcloudPvminstancesOperationsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances operations post bad request response a status code equal to that given +func (o *PcloudPvminstancesOperationsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances operations post bad request response +func (o *PcloudPvminstancesOperationsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesOperationsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesOperationsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesOperationsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudPvminstancesOperationsPostUnauthorized() *PcloudPvminstancesOperat return &PcloudPvminstancesOperationsPostUnauthorized{} } -/* PcloudPvminstancesOperationsPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesOperationsPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudPvminstancesOperationsPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances operations post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesOperationsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances operations post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesOperationsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances operations post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesOperationsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances operations post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesOperationsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances operations post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesOperationsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances operations post unauthorized response +func (o *PcloudPvminstancesOperationsPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesOperationsPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesOperationsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesOperationsPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ 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{} } -/* PcloudPvminstancesOperationsPostNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesOperationsPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudPvminstancesOperationsPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances operations post not found response has a 2xx status code +func (o *PcloudPvminstancesOperationsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances operations post not found response has a 3xx status code +func (o *PcloudPvminstancesOperationsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances operations post not found response has a 4xx status code +func (o *PcloudPvminstancesOperationsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances operations post not found response has a 5xx status code +func (o *PcloudPvminstancesOperationsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances operations post not found response a status code equal to that given +func (o *PcloudPvminstancesOperationsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances operations post not found response +func (o *PcloudPvminstancesOperationsPostNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesOperationsPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesOperationsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesOperationsPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudPvminstancesOperationsPostUnprocessableEntity() *PcloudPvminstance return &PcloudPvminstancesOperationsPostUnprocessableEntity{} } -/* PcloudPvminstancesOperationsPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPvminstancesOperationsPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -203,9 +422,44 @@ type PcloudPvminstancesOperationsPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances operations post unprocessable entity response has a 2xx status code +func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances operations post unprocessable entity response has a 3xx status code +func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances operations post unprocessable entity response has a 4xx status code +func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances operations post unprocessable entity response has a 5xx status code +func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances operations post unprocessable entity response a status code equal to that given +func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud pvminstances operations post unprocessable entity response +func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPvminstancesOperationsPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudPvminstancesOperationsPostInternalServerError() *PcloudPvminstance return &PcloudPvminstancesOperationsPostInternalServerError{} } -/* PcloudPvminstancesOperationsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesOperationsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudPvminstancesOperationsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances operations post internal server error response has a 2xx status code +func (o *PcloudPvminstancesOperationsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances operations post internal server error response has a 3xx status code +func (o *PcloudPvminstancesOperationsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances operations post internal server error response has a 4xx status code +func (o *PcloudPvminstancesOperationsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances operations post internal server error response has a 5xx status code +func (o *PcloudPvminstancesOperationsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances operations post internal server error response a status code equal to that given +func (o *PcloudPvminstancesOperationsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances operations post internal server error response +func (o *PcloudPvminstancesOperationsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesOperationsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesOperationsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations][%d] pcloudPvminstancesOperationsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesOperationsPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go index 4720dc28ac5..b4982b92cd2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go @@ -55,10 +55,12 @@ func NewPcloudPvminstancesPostParamsWithHTTPClient(client *http.Client) *PcloudP } } -/* PcloudPvminstancesPostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances post operation. +/* +PcloudPvminstancesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go index 7c905fb344a..1e9b1628326 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go @@ -90,7 +90,7 @@ func (o *PcloudPvminstancesPostReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances] pcloud.pvminstances.post", response, response.Code()) } } @@ -99,7 +99,8 @@ func NewPcloudPvminstancesPostOK() *PcloudPvminstancesPostOK { return &PcloudPvminstancesPostOK{} } -/* PcloudPvminstancesPostOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesPostOK describes a response with status code 200, with default header values. OK */ @@ -107,9 +108,44 @@ type PcloudPvminstancesPostOK struct { Payload models.PVMInstanceList } +// IsSuccess returns true when this pcloud pvminstances post o k response has a 2xx status code +func (o *PcloudPvminstancesPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances post o k response has a 3xx status code +func (o *PcloudPvminstancesPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post o k response has a 4xx status code +func (o *PcloudPvminstancesPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances post o k response has a 5xx status code +func (o *PcloudPvminstancesPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post o k response a status code equal to that given +func (o *PcloudPvminstancesPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances post o k response +func (o *PcloudPvminstancesPostOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesPostOK) GetPayload() models.PVMInstanceList { return o.Payload } @@ -129,7 +165,8 @@ func NewPcloudPvminstancesPostCreated() *PcloudPvminstancesPostCreated { return &PcloudPvminstancesPostCreated{} } -/* PcloudPvminstancesPostCreated describes a response with status code 201, with default header values. +/* +PcloudPvminstancesPostCreated describes a response with status code 201, with default header values. Created */ @@ -137,9 +174,44 @@ type PcloudPvminstancesPostCreated struct { Payload models.PVMInstanceList } +// IsSuccess returns true when this pcloud pvminstances post created response has a 2xx status code +func (o *PcloudPvminstancesPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances post created response has a 3xx status code +func (o *PcloudPvminstancesPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post created response has a 4xx status code +func (o *PcloudPvminstancesPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances post created response has a 5xx status code +func (o *PcloudPvminstancesPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post created response a status code equal to that given +func (o *PcloudPvminstancesPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud pvminstances post created response +func (o *PcloudPvminstancesPostCreated) Code() int { + return 201 +} + func (o *PcloudPvminstancesPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostCreated %+v", 201, o.Payload) } + +func (o *PcloudPvminstancesPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostCreated %+v", 201, o.Payload) +} + func (o *PcloudPvminstancesPostCreated) GetPayload() models.PVMInstanceList { return o.Payload } @@ -159,7 +231,8 @@ func NewPcloudPvminstancesPostAccepted() *PcloudPvminstancesPostAccepted { return &PcloudPvminstancesPostAccepted{} } -/* PcloudPvminstancesPostAccepted describes a response with status code 202, with default header values. +/* +PcloudPvminstancesPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -167,9 +240,44 @@ type PcloudPvminstancesPostAccepted struct { Payload models.PVMInstanceList } +// IsSuccess returns true when this pcloud pvminstances post accepted response has a 2xx status code +func (o *PcloudPvminstancesPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances post accepted response has a 3xx status code +func (o *PcloudPvminstancesPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post accepted response has a 4xx status code +func (o *PcloudPvminstancesPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances post accepted response has a 5xx status code +func (o *PcloudPvminstancesPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post accepted response a status code equal to that given +func (o *PcloudPvminstancesPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances post accepted response +func (o *PcloudPvminstancesPostAccepted) Code() int { + return 202 +} + func (o *PcloudPvminstancesPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudPvminstancesPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudPvminstancesPostAccepted) GetPayload() models.PVMInstanceList { return o.Payload } @@ -189,7 +297,8 @@ func NewPcloudPvminstancesPostBadRequest() *PcloudPvminstancesPostBadRequest { return &PcloudPvminstancesPostBadRequest{} } -/* PcloudPvminstancesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -197,9 +306,44 @@ type PcloudPvminstancesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances post bad request response has a 2xx status code +func (o *PcloudPvminstancesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances post bad request response has a 3xx status code +func (o *PcloudPvminstancesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post bad request response has a 4xx status code +func (o *PcloudPvminstancesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances post bad request response has a 5xx status code +func (o *PcloudPvminstancesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post bad request response a status code equal to that given +func (o *PcloudPvminstancesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances post bad request response +func (o *PcloudPvminstancesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -221,7 +365,8 @@ func NewPcloudPvminstancesPostUnauthorized() *PcloudPvminstancesPostUnauthorized return &PcloudPvminstancesPostUnauthorized{} } -/* PcloudPvminstancesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -229,9 +374,44 @@ type PcloudPvminstancesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances post unauthorized response +func (o *PcloudPvminstancesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -253,7 +433,8 @@ func NewPcloudPvminstancesPostForbidden() *PcloudPvminstancesPostForbidden { return &PcloudPvminstancesPostForbidden{} } -/* PcloudPvminstancesPostForbidden describes a response with status code 403, with default header values. +/* +PcloudPvminstancesPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -261,9 +442,44 @@ type PcloudPvminstancesPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances post forbidden response has a 2xx status code +func (o *PcloudPvminstancesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances post forbidden response has a 3xx status code +func (o *PcloudPvminstancesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post forbidden response has a 4xx status code +func (o *PcloudPvminstancesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances post forbidden response has a 5xx status code +func (o *PcloudPvminstancesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post forbidden response a status code equal to that given +func (o *PcloudPvminstancesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances post forbidden response +func (o *PcloudPvminstancesPostForbidden) Code() int { + return 403 +} + func (o *PcloudPvminstancesPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudPvminstancesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudPvminstancesPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -285,7 +501,8 @@ func NewPcloudPvminstancesPostNotFound() *PcloudPvminstancesPostNotFound { return &PcloudPvminstancesPostNotFound{} } -/* PcloudPvminstancesPostNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -293,9 +510,44 @@ type PcloudPvminstancesPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances post not found response has a 2xx status code +func (o *PcloudPvminstancesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances post not found response has a 3xx status code +func (o *PcloudPvminstancesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post not found response has a 4xx status code +func (o *PcloudPvminstancesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances post not found response has a 5xx status code +func (o *PcloudPvminstancesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post not found response a status code equal to that given +func (o *PcloudPvminstancesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances post not found response +func (o *PcloudPvminstancesPostNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -317,7 +569,8 @@ func NewPcloudPvminstancesPostConflict() *PcloudPvminstancesPostConflict { return &PcloudPvminstancesPostConflict{} } -/* PcloudPvminstancesPostConflict describes a response with status code 409, with default header values. +/* +PcloudPvminstancesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -325,9 +578,44 @@ type PcloudPvminstancesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances post conflict response has a 2xx status code +func (o *PcloudPvminstancesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances post conflict response has a 3xx status code +func (o *PcloudPvminstancesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post conflict response has a 4xx status code +func (o *PcloudPvminstancesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances post conflict response has a 5xx status code +func (o *PcloudPvminstancesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post conflict response a status code equal to that given +func (o *PcloudPvminstancesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances post conflict response +func (o *PcloudPvminstancesPostConflict) Code() int { + return 409 +} + func (o *PcloudPvminstancesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudPvminstancesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudPvminstancesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -349,7 +637,8 @@ func NewPcloudPvminstancesPostUnprocessableEntity() *PcloudPvminstancesPostUnpro return &PcloudPvminstancesPostUnprocessableEntity{} } -/* PcloudPvminstancesPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPvminstancesPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -357,9 +646,44 @@ type PcloudPvminstancesPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances post unprocessable entity response has a 2xx status code +func (o *PcloudPvminstancesPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances post unprocessable entity response has a 3xx status code +func (o *PcloudPvminstancesPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post unprocessable entity response has a 4xx status code +func (o *PcloudPvminstancesPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances post unprocessable entity response has a 5xx status code +func (o *PcloudPvminstancesPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances post unprocessable entity response a status code equal to that given +func (o *PcloudPvminstancesPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud pvminstances post unprocessable entity response +func (o *PcloudPvminstancesPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPvminstancesPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPvminstancesPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPvminstancesPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -381,7 +705,8 @@ func NewPcloudPvminstancesPostInternalServerError() *PcloudPvminstancesPostInter return &PcloudPvminstancesPostInternalServerError{} } -/* PcloudPvminstancesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -389,9 +714,44 @@ type PcloudPvminstancesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances post internal server error response has a 2xx status code +func (o *PcloudPvminstancesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances post internal server error response has a 3xx status code +func (o *PcloudPvminstancesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post internal server error response has a 4xx status code +func (o *PcloudPvminstancesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances post internal server error response has a 5xx status code +func (o *PcloudPvminstancesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances post internal server error response a status code equal to that given +func (o *PcloudPvminstancesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances post internal server error response +func (o *PcloudPvminstancesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesPostInternalServerError) GetPayload() *models.Error { return o.Payload } @@ -413,7 +773,8 @@ func NewPcloudPvminstancesPostGatewayTimeout() *PcloudPvminstancesPostGatewayTim return &PcloudPvminstancesPostGatewayTimeout{} } -/* PcloudPvminstancesPostGatewayTimeout describes a response with status code 504, with default header values. +/* +PcloudPvminstancesPostGatewayTimeout describes a response with status code 504, with default header values. Gateway Timeout. Request is still processing and taking longer than expected. */ @@ -421,9 +782,44 @@ type PcloudPvminstancesPostGatewayTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances post gateway timeout response has a 2xx status code +func (o *PcloudPvminstancesPostGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances post gateway timeout response has a 3xx status code +func (o *PcloudPvminstancesPostGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances post gateway timeout response has a 4xx status code +func (o *PcloudPvminstancesPostGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances post gateway timeout response has a 5xx status code +func (o *PcloudPvminstancesPostGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances post gateway timeout response a status code equal to that given +func (o *PcloudPvminstancesPostGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the pcloud pvminstances post gateway timeout response +func (o *PcloudPvminstancesPostGatewayTimeout) Code() int { + return 504 +} + func (o *PcloudPvminstancesPostGatewayTimeout) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostGatewayTimeout %+v", 504, o.Payload) } + +func (o *PcloudPvminstancesPostGatewayTimeout) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudPvminstancesPostGatewayTimeout %+v", 504, o.Payload) +} + func (o *PcloudPvminstancesPostGatewayTimeout) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_parameters.go index 48b71a21d9e..76102574629 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesPutParamsWithHTTPClient(client *http.Client) *PcloudPv } } -/* PcloudPvminstancesPutParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances put operation. +/* +PcloudPvminstancesPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances put operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go index c88a794f302..7147f35d966 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go @@ -41,6 +41,18 @@ func (o *PcloudPvminstancesPutReader) ReadResponse(response runtime.ClientRespon return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 422: result := NewPcloudPvminstancesPutUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +66,7 @@ func (o *PcloudPvminstancesPutReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}] pcloud.pvminstances.put", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudPvminstancesPutAccepted() *PcloudPvminstancesPutAccepted { return &PcloudPvminstancesPutAccepted{} } -/* PcloudPvminstancesPutAccepted describes a response with status code 202, with default header values. +/* +PcloudPvminstancesPutAccepted describes a response with status code 202, with default header values. Accepted (this is a long running operation) */ @@ -71,9 +84,44 @@ type PcloudPvminstancesPutAccepted struct { Payload *models.PVMInstanceUpdateResponse } +// IsSuccess returns true when this pcloud pvminstances put accepted response has a 2xx status code +func (o *PcloudPvminstancesPutAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances put accepted response has a 3xx status code +func (o *PcloudPvminstancesPutAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances put accepted response has a 4xx status code +func (o *PcloudPvminstancesPutAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances put accepted response has a 5xx status code +func (o *PcloudPvminstancesPutAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances put accepted response a status code equal to that given +func (o *PcloudPvminstancesPutAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances put accepted response +func (o *PcloudPvminstancesPutAccepted) Code() int { + return 202 +} + func (o *PcloudPvminstancesPutAccepted) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutAccepted %+v", 202, o.Payload) } + +func (o *PcloudPvminstancesPutAccepted) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutAccepted %+v", 202, o.Payload) +} + func (o *PcloudPvminstancesPutAccepted) GetPayload() *models.PVMInstanceUpdateResponse { return o.Payload } @@ -95,7 +143,8 @@ func NewPcloudPvminstancesPutBadRequest() *PcloudPvminstancesPutBadRequest { return &PcloudPvminstancesPutBadRequest{} } -/* PcloudPvminstancesPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +152,44 @@ type PcloudPvminstancesPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances put bad request response has a 2xx status code +func (o *PcloudPvminstancesPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances put bad request response has a 3xx status code +func (o *PcloudPvminstancesPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances put bad request response has a 4xx status code +func (o *PcloudPvminstancesPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances put bad request response has a 5xx status code +func (o *PcloudPvminstancesPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances put bad request response a status code equal to that given +func (o *PcloudPvminstancesPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances put bad request response +func (o *PcloudPvminstancesPutBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +211,8 @@ func NewPcloudPvminstancesPutUnauthorized() *PcloudPvminstancesPutUnauthorized { return &PcloudPvminstancesPutUnauthorized{} } -/* PcloudPvminstancesPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +220,44 @@ type PcloudPvminstancesPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances put unauthorized response has a 2xx status code +func (o *PcloudPvminstancesPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances put unauthorized response has a 3xx status code +func (o *PcloudPvminstancesPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances put unauthorized response has a 4xx status code +func (o *PcloudPvminstancesPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances put unauthorized response has a 5xx status code +func (o *PcloudPvminstancesPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances put unauthorized response a status code equal to that given +func (o *PcloudPvminstancesPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances put unauthorized response +func (o *PcloudPvminstancesPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +274,149 @@ func (o *PcloudPvminstancesPutUnauthorized) readResponse(response runtime.Client return nil } +// NewPcloudPvminstancesPutForbidden creates a PcloudPvminstancesPutForbidden with default headers values +func NewPcloudPvminstancesPutForbidden() *PcloudPvminstancesPutForbidden { + return &PcloudPvminstancesPutForbidden{} +} + +/* +PcloudPvminstancesPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances put forbidden response has a 2xx status code +func (o *PcloudPvminstancesPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances put forbidden response has a 3xx status code +func (o *PcloudPvminstancesPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances put forbidden response has a 4xx status code +func (o *PcloudPvminstancesPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances put forbidden response has a 5xx status code +func (o *PcloudPvminstancesPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances put forbidden response a status code equal to that given +func (o *PcloudPvminstancesPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances put forbidden response +func (o *PcloudPvminstancesPutForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesPutForbidden) 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 +} + +// NewPcloudPvminstancesPutNotFound creates a PcloudPvminstancesPutNotFound with default headers values +func NewPcloudPvminstancesPutNotFound() *PcloudPvminstancesPutNotFound { + return &PcloudPvminstancesPutNotFound{} +} + +/* +PcloudPvminstancesPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances put not found response has a 2xx status code +func (o *PcloudPvminstancesPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances put not found response has a 3xx status code +func (o *PcloudPvminstancesPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances put not found response has a 4xx status code +func (o *PcloudPvminstancesPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances put not found response has a 5xx status code +func (o *PcloudPvminstancesPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances put not found response a status code equal to that given +func (o *PcloudPvminstancesPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances put not found response +func (o *PcloudPvminstancesPutNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesPutNotFound) 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 +} + // NewPcloudPvminstancesPutUnprocessableEntity creates a PcloudPvminstancesPutUnprocessableEntity with default headers values func NewPcloudPvminstancesPutUnprocessableEntity() *PcloudPvminstancesPutUnprocessableEntity { return &PcloudPvminstancesPutUnprocessableEntity{} } -/* PcloudPvminstancesPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPvminstancesPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -167,9 +424,44 @@ type PcloudPvminstancesPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances put unprocessable entity response has a 2xx status code +func (o *PcloudPvminstancesPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances put unprocessable entity response has a 3xx status code +func (o *PcloudPvminstancesPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances put unprocessable entity response has a 4xx status code +func (o *PcloudPvminstancesPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances put unprocessable entity response has a 5xx status code +func (o *PcloudPvminstancesPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances put unprocessable entity response a status code equal to that given +func (o *PcloudPvminstancesPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud pvminstances put unprocessable entity response +func (o *PcloudPvminstancesPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPvminstancesPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPvminstancesPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPvminstancesPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -191,7 +483,8 @@ func NewPcloudPvminstancesPutInternalServerError() *PcloudPvminstancesPutInterna return &PcloudPvminstancesPutInternalServerError{} } -/* PcloudPvminstancesPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +492,44 @@ type PcloudPvminstancesPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances put internal server error response has a 2xx status code +func (o *PcloudPvminstancesPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances put internal server error response has a 3xx status code +func (o *PcloudPvminstancesPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances put internal server error response has a 4xx status code +func (o *PcloudPvminstancesPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances put internal server error response has a 5xx status code +func (o *PcloudPvminstancesPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances put internal server error response a status code equal to that given +func (o *PcloudPvminstancesPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances put internal server error response +func (o *PcloudPvminstancesPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}][%d] pcloudPvminstancesPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_parameters.go index 6441ed24abd..c4b49ce0258 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesSnapshotsGetallParamsWithHTTPClient(client *http.Clien } } -/* PcloudPvminstancesSnapshotsGetallParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances snapshots getall operation. +/* +PcloudPvminstancesSnapshotsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances snapshots getall operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesSnapshotsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go index 9b257b3e2b7..3a6236eb1b2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesSnapshotsGetallReader) ReadResponse(response runtime. return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesSnapshotsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesSnapshotsGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudPvminstancesSnapshotsGetallReader) ReadResponse(response runtime. } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots] pcloud.pvminstances.snapshots.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudPvminstancesSnapshotsGetallOK() *PcloudPvminstancesSnapshotsGetall return &PcloudPvminstancesSnapshotsGetallOK{} } -/* PcloudPvminstancesSnapshotsGetallOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesSnapshotsGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudPvminstancesSnapshotsGetallOK struct { Payload *models.Snapshots } +// IsSuccess returns true when this pcloud pvminstances snapshots getall o k response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances snapshots getall o k response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots getall o k response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances snapshots getall o k response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots getall o k response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances snapshots getall o k response +func (o *PcloudPvminstancesSnapshotsGetallOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesSnapshotsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsGetallOK) GetPayload() *models.Snapshots { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudPvminstancesSnapshotsGetallBadRequest() *PcloudPvminstancesSnapsho return &PcloudPvminstancesSnapshotsGetallBadRequest{} } -/* PcloudPvminstancesSnapshotsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesSnapshotsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudPvminstancesSnapshotsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots getall bad request response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots getall bad request response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots getall bad request response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots getall bad request response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots getall bad request response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances snapshots getall bad request response +func (o *PcloudPvminstancesSnapshotsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesSnapshotsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudPvminstancesSnapshotsGetallUnauthorized() *PcloudPvminstancesSnaps return &PcloudPvminstancesSnapshotsGetallUnauthorized{} } -/* PcloudPvminstancesSnapshotsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesSnapshotsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudPvminstancesSnapshotsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots getall unauthorized response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots getall unauthorized response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots getall unauthorized response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots getall unauthorized response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots getall unauthorized response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances snapshots getall unauthorized response +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) readResponse(response ru return nil } +// NewPcloudPvminstancesSnapshotsGetallForbidden creates a PcloudPvminstancesSnapshotsGetallForbidden with default headers values +func NewPcloudPvminstancesSnapshotsGetallForbidden() *PcloudPvminstancesSnapshotsGetallForbidden { + return &PcloudPvminstancesSnapshotsGetallForbidden{} +} + +/* +PcloudPvminstancesSnapshotsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesSnapshotsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances snapshots getall forbidden response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots getall forbidden response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots getall forbidden response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots getall forbidden response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots getall forbidden response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances snapshots getall forbidden response +func (o *PcloudPvminstancesSnapshotsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesSnapshotsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesSnapshotsGetallForbidden) 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 +} + // NewPcloudPvminstancesSnapshotsGetallNotFound creates a PcloudPvminstancesSnapshotsGetallNotFound with default headers values func NewPcloudPvminstancesSnapshotsGetallNotFound() *PcloudPvminstancesSnapshotsGetallNotFound { return &PcloudPvminstancesSnapshotsGetallNotFound{} } -/* PcloudPvminstancesSnapshotsGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesSnapshotsGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudPvminstancesSnapshotsGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots getall not found response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots getall not found response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots getall not found response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots getall not found response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots getall not found response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances snapshots getall not found response +func (o *PcloudPvminstancesSnapshotsGetallNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesSnapshotsGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudPvminstancesSnapshotsGetallInternalServerError() *PcloudPvminstanc return &PcloudPvminstancesSnapshotsGetallInternalServerError{} } -/* PcloudPvminstancesSnapshotsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesSnapshotsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudPvminstancesSnapshotsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots getall internal server error response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots getall internal server error response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots getall internal server error response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances snapshots getall internal server error response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances snapshots getall internal server error response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances snapshots getall internal server error response +func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_parameters.go index 551a20e44af..f2e9448355e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesSnapshotsPostParamsWithHTTPClient(client *http.Client) } } -/* PcloudPvminstancesSnapshotsPostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances snapshots post operation. +/* +PcloudPvminstancesSnapshotsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances snapshots post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesSnapshotsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go index a1f957222e6..bd53af99713 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesSnapshotsPostReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesSnapshotsPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesSnapshotsPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -59,8 +65,14 @@ func (o *PcloudPvminstancesSnapshotsPostReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 504: + result := NewPcloudPvminstancesSnapshotsPostGatewayTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots] pcloud.pvminstances.snapshots.post", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewPcloudPvminstancesSnapshotsPostAccepted() *PcloudPvminstancesSnapshotsPo return &PcloudPvminstancesSnapshotsPostAccepted{} } -/* PcloudPvminstancesSnapshotsPostAccepted describes a response with status code 202, with default header values. +/* +PcloudPvminstancesSnapshotsPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +90,44 @@ type PcloudPvminstancesSnapshotsPostAccepted struct { Payload *models.SnapshotCreateResponse } +// IsSuccess returns true when this pcloud pvminstances snapshots post accepted response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances snapshots post accepted response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots post accepted response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances snapshots post accepted response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots post accepted response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances snapshots post accepted response +func (o *PcloudPvminstancesSnapshotsPostAccepted) Code() int { + return 202 +} + func (o *PcloudPvminstancesSnapshotsPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsPostAccepted) GetPayload() *models.SnapshotCreateResponse { return o.Payload } @@ -101,7 +149,8 @@ func NewPcloudPvminstancesSnapshotsPostBadRequest() *PcloudPvminstancesSnapshots return &PcloudPvminstancesSnapshotsPostBadRequest{} } -/* PcloudPvminstancesSnapshotsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesSnapshotsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +158,44 @@ type PcloudPvminstancesSnapshotsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots post bad request response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots post bad request response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots post bad request response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots post bad request response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots post bad request response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances snapshots post bad request response +func (o *PcloudPvminstancesSnapshotsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesSnapshotsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +217,8 @@ func NewPcloudPvminstancesSnapshotsPostUnauthorized() *PcloudPvminstancesSnapsho return &PcloudPvminstancesSnapshotsPostUnauthorized{} } -/* PcloudPvminstancesSnapshotsPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesSnapshotsPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +226,44 @@ type PcloudPvminstancesSnapshotsPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances snapshots post unauthorized response +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesSnapshotsPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +280,81 @@ func (o *PcloudPvminstancesSnapshotsPostUnauthorized) readResponse(response runt return nil } +// NewPcloudPvminstancesSnapshotsPostForbidden creates a PcloudPvminstancesSnapshotsPostForbidden with default headers values +func NewPcloudPvminstancesSnapshotsPostForbidden() *PcloudPvminstancesSnapshotsPostForbidden { + return &PcloudPvminstancesSnapshotsPostForbidden{} +} + +/* +PcloudPvminstancesSnapshotsPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesSnapshotsPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances snapshots post forbidden response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots post forbidden response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots post forbidden response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots post forbidden response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots post forbidden response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances snapshots post forbidden response +func (o *PcloudPvminstancesSnapshotsPostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesSnapshotsPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesSnapshotsPostForbidden) 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 +} + // NewPcloudPvminstancesSnapshotsPostNotFound creates a PcloudPvminstancesSnapshotsPostNotFound with default headers values func NewPcloudPvminstancesSnapshotsPostNotFound() *PcloudPvminstancesSnapshotsPostNotFound { return &PcloudPvminstancesSnapshotsPostNotFound{} } -/* PcloudPvminstancesSnapshotsPostNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesSnapshotsPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -173,9 +362,44 @@ type PcloudPvminstancesSnapshotsPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots post not found response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots post not found response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots post not found response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots post not found response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots post not found response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances snapshots post not found response +func (o *PcloudPvminstancesSnapshotsPostNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesSnapshotsPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -197,7 +421,8 @@ func NewPcloudPvminstancesSnapshotsPostConflict() *PcloudPvminstancesSnapshotsPo return &PcloudPvminstancesSnapshotsPostConflict{} } -/* PcloudPvminstancesSnapshotsPostConflict describes a response with status code 409, with default header values. +/* +PcloudPvminstancesSnapshotsPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -205,9 +430,44 @@ type PcloudPvminstancesSnapshotsPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots post conflict response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots post conflict response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots post conflict response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots post conflict response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots post conflict response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances snapshots post conflict response +func (o *PcloudPvminstancesSnapshotsPostConflict) Code() int { + return 409 +} + func (o *PcloudPvminstancesSnapshotsPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostConflict %+v", 409, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostConflict %+v", 409, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsPostConflict) GetPayload() *models.Error { return o.Payload } @@ -229,7 +489,8 @@ func NewPcloudPvminstancesSnapshotsPostInternalServerError() *PcloudPvminstances return &PcloudPvminstancesSnapshotsPostInternalServerError{} } -/* PcloudPvminstancesSnapshotsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesSnapshotsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +498,44 @@ type PcloudPvminstancesSnapshotsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots post internal server error response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots post internal server error response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots post internal server error response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances snapshots post internal server error response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances snapshots post internal server error response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances snapshots post internal server error response +func (o *PcloudPvminstancesSnapshotsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesSnapshotsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsPostInternalServerError) GetPayload() *models.Error { return o.Payload } @@ -255,3 +551,71 @@ func (o *PcloudPvminstancesSnapshotsPostInternalServerError) readResponse(respon return nil } + +// NewPcloudPvminstancesSnapshotsPostGatewayTimeout creates a PcloudPvminstancesSnapshotsPostGatewayTimeout with default headers values +func NewPcloudPvminstancesSnapshotsPostGatewayTimeout() *PcloudPvminstancesSnapshotsPostGatewayTimeout { + return &PcloudPvminstancesSnapshotsPostGatewayTimeout{} +} + +/* +PcloudPvminstancesSnapshotsPostGatewayTimeout describes a response with status code 504, with default header values. + +Gateway Timeout +*/ +type PcloudPvminstancesSnapshotsPostGatewayTimeout struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances snapshots post gateway timeout response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots post gateway timeout response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots post gateway timeout response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances snapshots post gateway timeout response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances snapshots post gateway timeout response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the pcloud pvminstances snapshots post gateway timeout response +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) Code() int { + return 504 +} + +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostGatewayTimeout %+v", 504, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots][%d] pcloudPvminstancesSnapshotsPostGatewayTimeout %+v", 504, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesSnapshotsPostGatewayTimeout) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_parameters.go index 9a56a1f7a5b..608c6d51403 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesSnapshotsRestorePostParamsWithHTTPClient(client *http. } } -/* PcloudPvminstancesSnapshotsRestorePostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances snapshots restore post operation. +/* +PcloudPvminstancesSnapshotsRestorePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances snapshots restore post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesSnapshotsRestorePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go index 5dbfbac8bbf..a8670faaf5d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go @@ -41,6 +41,18 @@ func (o *PcloudPvminstancesSnapshotsRestorePostReader) ReadResponse(response run return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesSnapshotsRestorePostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesSnapshotsRestorePostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudPvminstancesSnapshotsRestorePostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +66,7 @@ func (o *PcloudPvminstancesSnapshotsRestorePostReader) ReadResponse(response run } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore] pcloud.pvminstances.snapshots.restore.post", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudPvminstancesSnapshotsRestorePostAccepted() *PcloudPvminstancesSnap return &PcloudPvminstancesSnapshotsRestorePostAccepted{} } -/* PcloudPvminstancesSnapshotsRestorePostAccepted describes a response with status code 202, with default header values. +/* +PcloudPvminstancesSnapshotsRestorePostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -71,9 +84,44 @@ type PcloudPvminstancesSnapshotsRestorePostAccepted struct { Payload *models.Snapshot } +// IsSuccess returns true when this pcloud pvminstances snapshots restore post accepted response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances snapshots restore post accepted response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots restore post accepted response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances snapshots restore post accepted response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots restore post accepted response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances snapshots restore post accepted response +func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) Code() int { + return 202 +} + func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostAccepted %+v", 202, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostAccepted %+v", 202, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsRestorePostAccepted) GetPayload() *models.Snapshot { return o.Payload } @@ -95,7 +143,8 @@ func NewPcloudPvminstancesSnapshotsRestorePostBadRequest() *PcloudPvminstancesSn return &PcloudPvminstancesSnapshotsRestorePostBadRequest{} } -/* PcloudPvminstancesSnapshotsRestorePostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesSnapshotsRestorePostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +152,44 @@ type PcloudPvminstancesSnapshotsRestorePostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots restore post bad request response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots restore post bad request response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots restore post bad request response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots restore post bad request response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots restore post bad request response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances snapshots restore post bad request response +func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsRestorePostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +211,8 @@ func NewPcloudPvminstancesSnapshotsRestorePostUnauthorized() *PcloudPvminstances return &PcloudPvminstancesSnapshotsRestorePostUnauthorized{} } -/* PcloudPvminstancesSnapshotsRestorePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesSnapshotsRestorePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +220,44 @@ type PcloudPvminstancesSnapshotsRestorePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots restore post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots restore post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots restore post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots restore post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots restore post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances snapshots restore post unauthorized response +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +274,149 @@ func (o *PcloudPvminstancesSnapshotsRestorePostUnauthorized) readResponse(respon return nil } +// NewPcloudPvminstancesSnapshotsRestorePostForbidden creates a PcloudPvminstancesSnapshotsRestorePostForbidden with default headers values +func NewPcloudPvminstancesSnapshotsRestorePostForbidden() *PcloudPvminstancesSnapshotsRestorePostForbidden { + return &PcloudPvminstancesSnapshotsRestorePostForbidden{} +} + +/* +PcloudPvminstancesSnapshotsRestorePostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesSnapshotsRestorePostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances snapshots restore post forbidden response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots restore post forbidden response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots restore post forbidden response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots restore post forbidden response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots restore post forbidden response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances snapshots restore post forbidden response +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesSnapshotsRestorePostForbidden) 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 +} + +// NewPcloudPvminstancesSnapshotsRestorePostNotFound creates a PcloudPvminstancesSnapshotsRestorePostNotFound with default headers values +func NewPcloudPvminstancesSnapshotsRestorePostNotFound() *PcloudPvminstancesSnapshotsRestorePostNotFound { + return &PcloudPvminstancesSnapshotsRestorePostNotFound{} +} + +/* +PcloudPvminstancesSnapshotsRestorePostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesSnapshotsRestorePostNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances snapshots restore post not found response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots restore post not found response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots restore post not found response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots restore post not found response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots restore post not found response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances snapshots restore post not found response +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesSnapshotsRestorePostNotFound) 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 +} + // NewPcloudPvminstancesSnapshotsRestorePostConflict creates a PcloudPvminstancesSnapshotsRestorePostConflict with default headers values func NewPcloudPvminstancesSnapshotsRestorePostConflict() *PcloudPvminstancesSnapshotsRestorePostConflict { return &PcloudPvminstancesSnapshotsRestorePostConflict{} } -/* PcloudPvminstancesSnapshotsRestorePostConflict describes a response with status code 409, with default header values. +/* +PcloudPvminstancesSnapshotsRestorePostConflict describes a response with status code 409, with default header values. Conflict */ @@ -167,9 +424,44 @@ type PcloudPvminstancesSnapshotsRestorePostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots restore post conflict response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots restore post conflict response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots restore post conflict response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances snapshots restore post conflict response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances snapshots restore post conflict response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsRestorePostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances snapshots restore post conflict response +func (o *PcloudPvminstancesSnapshotsRestorePostConflict) Code() int { + return 409 +} + func (o *PcloudPvminstancesSnapshotsRestorePostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostConflict %+v", 409, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsRestorePostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostConflict %+v", 409, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsRestorePostConflict) GetPayload() *models.Error { return o.Payload } @@ -191,7 +483,8 @@ func NewPcloudPvminstancesSnapshotsRestorePostInternalServerError() *PcloudPvmin return &PcloudPvminstancesSnapshotsRestorePostInternalServerError{} } -/* PcloudPvminstancesSnapshotsRestorePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesSnapshotsRestorePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +492,44 @@ type PcloudPvminstancesSnapshotsRestorePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances snapshots restore post internal server error response has a 2xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances snapshots restore post internal server error response has a 3xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances snapshots restore post internal server error response has a 4xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances snapshots restore post internal server error response has a 5xx status code +func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances snapshots restore post internal server error response a status code equal to that given +func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances snapshots restore post internal server error response +func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore][%d] pcloudPvminstancesSnapshotsRestorePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesSnapshotsRestorePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_parameters.go index 8519057ed01..caa2694f104 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudV2PvminstancesCaptureGetParamsWithHTTPClient(client *http.Client) } } -/* PcloudV2PvminstancesCaptureGetParams contains all the parameters to send to the API endpoint - for the pcloud v2 pvminstances capture get operation. +/* +PcloudV2PvminstancesCaptureGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 pvminstances capture get operation. + + Typically these are written to a http.Request. */ type PcloudV2PvminstancesCaptureGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go index d53cfa0b720..fe4f0293e7f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *PcloudV2PvminstancesCaptureGetReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture] pcloud.v2.pvminstances.capture.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudV2PvminstancesCaptureGetOK() *PcloudV2PvminstancesCaptureGetOK { return &PcloudV2PvminstancesCaptureGetOK{} } -/* PcloudV2PvminstancesCaptureGetOK describes a response with status code 200, with default header values. +/* +PcloudV2PvminstancesCaptureGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudV2PvminstancesCaptureGetOK struct { Payload *models.Job } +// IsSuccess returns true when this pcloud v2 pvminstances capture get o k response has a 2xx status code +func (o *PcloudV2PvminstancesCaptureGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture get o k response has a 3xx status code +func (o *PcloudV2PvminstancesCaptureGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture get o k response has a 4xx status code +func (o *PcloudV2PvminstancesCaptureGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 pvminstances capture get o k response has a 5xx status code +func (o *PcloudV2PvminstancesCaptureGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture get o k response a status code equal to that given +func (o *PcloudV2PvminstancesCaptureGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v2 pvminstances capture get o k response +func (o *PcloudV2PvminstancesCaptureGetOK) Code() int { + return 200 +} + func (o *PcloudV2PvminstancesCaptureGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetOK %+v", 200, o.Payload) } + +func (o *PcloudV2PvminstancesCaptureGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetOK %+v", 200, o.Payload) +} + func (o *PcloudV2PvminstancesCaptureGetOK) GetPayload() *models.Job { return o.Payload } @@ -84,12 +132,81 @@ 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{} } -/* PcloudV2PvminstancesCaptureGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2PvminstancesCaptureGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudV2PvminstancesCaptureGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances capture get unauthorized response has a 2xx status code +func (o *PcloudV2PvminstancesCaptureGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture get unauthorized response has a 3xx status code +func (o *PcloudV2PvminstancesCaptureGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture get unauthorized response has a 4xx status code +func (o *PcloudV2PvminstancesCaptureGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture get unauthorized response has a 5xx status code +func (o *PcloudV2PvminstancesCaptureGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture get unauthorized response a status code equal to that given +func (o *PcloudV2PvminstancesCaptureGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 pvminstances capture get unauthorized response +func (o *PcloudV2PvminstancesCaptureGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2PvminstancesCaptureGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2PvminstancesCaptureGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2PvminstancesCaptureGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ 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{} } -/* PcloudV2PvminstancesCaptureGetNotFound describes a response with status code 404, with default header values. +/* +PcloudV2PvminstancesCaptureGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudV2PvminstancesCaptureGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances capture get not found response has a 2xx status code +func (o *PcloudV2PvminstancesCaptureGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture get not found response has a 3xx status code +func (o *PcloudV2PvminstancesCaptureGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture get not found response has a 4xx status code +func (o *PcloudV2PvminstancesCaptureGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture get not found response has a 5xx status code +func (o *PcloudV2PvminstancesCaptureGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture get not found response a status code equal to that given +func (o *PcloudV2PvminstancesCaptureGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 pvminstances capture get not found response +func (o *PcloudV2PvminstancesCaptureGetNotFound) Code() int { + return 404 +} + func (o *PcloudV2PvminstancesCaptureGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2PvminstancesCaptureGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2PvminstancesCaptureGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudV2PvminstancesCaptureGetInternalServerError() *PcloudV2Pvminstance return &PcloudV2PvminstancesCaptureGetInternalServerError{} } -/* PcloudV2PvminstancesCaptureGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2PvminstancesCaptureGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudV2PvminstancesCaptureGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances capture get internal server error response has a 2xx status code +func (o *PcloudV2PvminstancesCaptureGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture get internal server error response has a 3xx status code +func (o *PcloudV2PvminstancesCaptureGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture get internal server error response has a 4xx status code +func (o *PcloudV2PvminstancesCaptureGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 pvminstances capture get internal server error response has a 5xx status code +func (o *PcloudV2PvminstancesCaptureGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 pvminstances capture get internal server error response a status code equal to that given +func (o *PcloudV2PvminstancesCaptureGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 pvminstances capture get internal server error response +func (o *PcloudV2PvminstancesCaptureGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2PvminstancesCaptureGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2PvminstancesCaptureGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCaptureGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2PvminstancesCaptureGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_parameters.go index 2a09a266f53..37804b37b99 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV2PvminstancesCapturePostParamsWithHTTPClient(client *http.Client) } } -/* PcloudV2PvminstancesCapturePostParams contains all the parameters to send to the API endpoint - for the pcloud v2 pvminstances capture post operation. +/* +PcloudV2PvminstancesCapturePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 pvminstances capture post operation. + + Typically these are written to a http.Request. */ type PcloudV2PvminstancesCapturePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go index 787b81faa37..362a617372c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudV2PvminstancesCapturePostReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture] pcloud.v2.pvminstances.capture.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudV2PvminstancesCapturePostAccepted() *PcloudV2PvminstancesCapturePo return &PcloudV2PvminstancesCapturePostAccepted{} } -/* PcloudV2PvminstancesCapturePostAccepted describes a response with status code 202, with default header values. +/* +PcloudV2PvminstancesCapturePostAccepted describes a response with status code 202, with default header values. Accepted, pvm-instance capture successfully added to the jobs queue */ @@ -83,9 +90,44 @@ type PcloudV2PvminstancesCapturePostAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud v2 pvminstances capture post accepted response has a 2xx status code +func (o *PcloudV2PvminstancesCapturePostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture post accepted response has a 3xx status code +func (o *PcloudV2PvminstancesCapturePostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture post accepted response has a 4xx status code +func (o *PcloudV2PvminstancesCapturePostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 pvminstances capture post accepted response has a 5xx status code +func (o *PcloudV2PvminstancesCapturePostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture post accepted response a status code equal to that given +func (o *PcloudV2PvminstancesCapturePostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud v2 pvminstances capture post accepted response +func (o *PcloudV2PvminstancesCapturePostAccepted) Code() int { + return 202 +} + func (o *PcloudV2PvminstancesCapturePostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostAccepted %+v", 202, o.Payload) } + +func (o *PcloudV2PvminstancesCapturePostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostAccepted %+v", 202, o.Payload) +} + func (o *PcloudV2PvminstancesCapturePostAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudV2PvminstancesCapturePostBadRequest() *PcloudV2PvminstancesCapture return &PcloudV2PvminstancesCapturePostBadRequest{} } -/* PcloudV2PvminstancesCapturePostBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2PvminstancesCapturePostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudV2PvminstancesCapturePostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances capture post bad request response has a 2xx status code +func (o *PcloudV2PvminstancesCapturePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture post bad request response has a 3xx status code +func (o *PcloudV2PvminstancesCapturePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture post bad request response has a 4xx status code +func (o *PcloudV2PvminstancesCapturePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture post bad request response has a 5xx status code +func (o *PcloudV2PvminstancesCapturePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture post bad request response a status code equal to that given +func (o *PcloudV2PvminstancesCapturePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 pvminstances capture post bad request response +func (o *PcloudV2PvminstancesCapturePostBadRequest) Code() int { + return 400 +} + func (o *PcloudV2PvminstancesCapturePostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2PvminstancesCapturePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2PvminstancesCapturePostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudV2PvminstancesCapturePostUnauthorized() *PcloudV2PvminstancesCaptu return &PcloudV2PvminstancesCapturePostUnauthorized{} } -/* PcloudV2PvminstancesCapturePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2PvminstancesCapturePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudV2PvminstancesCapturePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances capture post unauthorized response has a 2xx status code +func (o *PcloudV2PvminstancesCapturePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture post unauthorized response has a 3xx status code +func (o *PcloudV2PvminstancesCapturePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture post unauthorized response has a 4xx status code +func (o *PcloudV2PvminstancesCapturePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture post unauthorized response has a 5xx status code +func (o *PcloudV2PvminstancesCapturePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture post unauthorized response a status code equal to that given +func (o *PcloudV2PvminstancesCapturePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 pvminstances capture post unauthorized response +func (o *PcloudV2PvminstancesCapturePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2PvminstancesCapturePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2PvminstancesCapturePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2PvminstancesCapturePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -166,22 +280,126 @@ 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{} } -/* PcloudV2PvminstancesCapturePostNotFound describes a response with status code 404, with default header values. +/* +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 } +// IsSuccess returns true when this pcloud v2 pvminstances capture post not found response has a 2xx status code +func (o *PcloudV2PvminstancesCapturePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture post not found response has a 3xx status code +func (o *PcloudV2PvminstancesCapturePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture post not found response has a 4xx status code +func (o *PcloudV2PvminstancesCapturePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture post not found response has a 5xx status code +func (o *PcloudV2PvminstancesCapturePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture post not found response a status code equal to that given +func (o *PcloudV2PvminstancesCapturePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 pvminstances capture post not found response +func (o *PcloudV2PvminstancesCapturePostNotFound) Code() int { + return 404 +} + func (o *PcloudV2PvminstancesCapturePostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2PvminstancesCapturePostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2PvminstancesCapturePostNotFound) GetPayload() *models.Error { return o.Payload } @@ -203,7 +421,8 @@ func NewPcloudV2PvminstancesCapturePostConflict() *PcloudV2PvminstancesCapturePo return &PcloudV2PvminstancesCapturePostConflict{} } -/* PcloudV2PvminstancesCapturePostConflict describes a response with status code 409, with default header values. +/* +PcloudV2PvminstancesCapturePostConflict describes a response with status code 409, with default header values. Conflict, a conflict has prevented adding the pvm-instance capture job */ @@ -211,9 +430,44 @@ type PcloudV2PvminstancesCapturePostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances capture post conflict response has a 2xx status code +func (o *PcloudV2PvminstancesCapturePostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture post conflict response has a 3xx status code +func (o *PcloudV2PvminstancesCapturePostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture post conflict response has a 4xx status code +func (o *PcloudV2PvminstancesCapturePostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture post conflict response has a 5xx status code +func (o *PcloudV2PvminstancesCapturePostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture post conflict response a status code equal to that given +func (o *PcloudV2PvminstancesCapturePostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud v2 pvminstances capture post conflict response +func (o *PcloudV2PvminstancesCapturePostConflict) Code() int { + return 409 +} + func (o *PcloudV2PvminstancesCapturePostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostConflict %+v", 409, o.Payload) } + +func (o *PcloudV2PvminstancesCapturePostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostConflict %+v", 409, o.Payload) +} + func (o *PcloudV2PvminstancesCapturePostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudV2PvminstancesCapturePostUnprocessableEntity() *PcloudV2Pvminstanc return &PcloudV2PvminstancesCapturePostUnprocessableEntity{} } -/* PcloudV2PvminstancesCapturePostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudV2PvminstancesCapturePostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudV2PvminstancesCapturePostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances capture post unprocessable entity response has a 2xx status code +func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture post unprocessable entity response has a 3xx status code +func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture post unprocessable entity response has a 4xx status code +func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances capture post unprocessable entity response has a 5xx status code +func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances capture post unprocessable entity response a status code equal to that given +func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud v2 pvminstances capture post unprocessable entity response +func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudV2PvminstancesCapturePostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudV2PvminstancesCapturePostInternalServerError() *PcloudV2Pvminstanc return &PcloudV2PvminstancesCapturePostInternalServerError{} } -/* PcloudV2PvminstancesCapturePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2PvminstancesCapturePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudV2PvminstancesCapturePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances capture post internal server error response has a 2xx status code +func (o *PcloudV2PvminstancesCapturePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances capture post internal server error response has a 3xx status code +func (o *PcloudV2PvminstancesCapturePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances capture post internal server error response has a 4xx status code +func (o *PcloudV2PvminstancesCapturePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 pvminstances capture post internal server error response has a 5xx status code +func (o *PcloudV2PvminstancesCapturePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 pvminstances capture post internal server error response a status code equal to that given +func (o *PcloudV2PvminstancesCapturePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 pvminstances capture post internal server error response +func (o *PcloudV2PvminstancesCapturePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2PvminstancesCapturePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2PvminstancesCapturePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture][%d] pcloudV2PvminstancesCapturePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2PvminstancesCapturePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_parameters.go new file mode 100644 index 00000000000..c26688cd082 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_p_vm_instances + +// 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" +) + +// NewPcloudV2PvminstancesGetallParams creates a new PcloudV2PvminstancesGetallParams 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 NewPcloudV2PvminstancesGetallParams() *PcloudV2PvminstancesGetallParams { + return &PcloudV2PvminstancesGetallParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudV2PvminstancesGetallParamsWithTimeout creates a new PcloudV2PvminstancesGetallParams object +// with the ability to set a timeout on a request. +func NewPcloudV2PvminstancesGetallParamsWithTimeout(timeout time.Duration) *PcloudV2PvminstancesGetallParams { + return &PcloudV2PvminstancesGetallParams{ + timeout: timeout, + } +} + +// NewPcloudV2PvminstancesGetallParamsWithContext creates a new PcloudV2PvminstancesGetallParams object +// with the ability to set a context for a request. +func NewPcloudV2PvminstancesGetallParamsWithContext(ctx context.Context) *PcloudV2PvminstancesGetallParams { + return &PcloudV2PvminstancesGetallParams{ + Context: ctx, + } +} + +// NewPcloudV2PvminstancesGetallParamsWithHTTPClient creates a new PcloudV2PvminstancesGetallParams object +// with the ability to set a custom HTTPClient for a request. +func NewPcloudV2PvminstancesGetallParamsWithHTTPClient(client *http.Client) *PcloudV2PvminstancesGetallParams { + return &PcloudV2PvminstancesGetallParams{ + HTTPClient: client, + } +} + +/* +PcloudV2PvminstancesGetallParams contains all the parameters to send to the API endpoint + + for the pcloud v2 pvminstances getall operation. + + Typically these are written to a http.Request. +*/ +type PcloudV2PvminstancesGetallParams struct { + + /* CloudInstanceID. + + Cloud Instance ID of a PCloud Instance + */ + CloudInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pcloud v2 pvminstances getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudV2PvminstancesGetallParams) WithDefaults() *PcloudV2PvminstancesGetallParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pcloud v2 pvminstances getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudV2PvminstancesGetallParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pcloud v2 pvminstances getall params +func (o *PcloudV2PvminstancesGetallParams) WithTimeout(timeout time.Duration) *PcloudV2PvminstancesGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud v2 pvminstances getall params +func (o *PcloudV2PvminstancesGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud v2 pvminstances getall params +func (o *PcloudV2PvminstancesGetallParams) WithContext(ctx context.Context) *PcloudV2PvminstancesGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud v2 pvminstances getall params +func (o *PcloudV2PvminstancesGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud v2 pvminstances getall params +func (o *PcloudV2PvminstancesGetallParams) WithHTTPClient(client *http.Client) *PcloudV2PvminstancesGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud v2 pvminstances getall params +func (o *PcloudV2PvminstancesGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud v2 pvminstances getall params +func (o *PcloudV2PvminstancesGetallParams) WithCloudInstanceID(cloudInstanceID string) *PcloudV2PvminstancesGetallParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud v2 pvminstances getall params +func (o *PcloudV2PvminstancesGetallParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudV2PvminstancesGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go new file mode 100644 index 00000000000..cc9bce596d2 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_getall_responses.go @@ -0,0 +1,547 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_p_vm_instances + +// 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" +) + +// PcloudV2PvminstancesGetallReader is a Reader for the PcloudV2PvminstancesGetall structure. +type PcloudV2PvminstancesGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudV2PvminstancesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPcloudV2PvminstancesGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPcloudV2PvminstancesGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewPcloudV2PvminstancesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPcloudV2PvminstancesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { + return nil, err + } + return nil, result + case 500: + result := NewPcloudV2PvminstancesGetallInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances] pcloud.v2.pvminstances.getall", response, response.Code()) + } +} + +// NewPcloudV2PvminstancesGetallOK creates a PcloudV2PvminstancesGetallOK with default headers values +func NewPcloudV2PvminstancesGetallOK() *PcloudV2PvminstancesGetallOK { + return &PcloudV2PvminstancesGetallOK{} +} + +/* +PcloudV2PvminstancesGetallOK describes a response with status code 200, with default header values. + +OK +*/ +type PcloudV2PvminstancesGetallOK struct { + Payload *models.PVMInstancesV2 +} + +// IsSuccess returns true when this pcloud v2 pvminstances getall o k response has a 2xx status code +func (o *PcloudV2PvminstancesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 pvminstances getall o k response has a 3xx status code +func (o *PcloudV2PvminstancesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances getall o k response has a 4xx status code +func (o *PcloudV2PvminstancesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 pvminstances getall o k response has a 5xx status code +func (o *PcloudV2PvminstancesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances getall o k response a status code equal to that given +func (o *PcloudV2PvminstancesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v2 pvminstances getall o k response +func (o *PcloudV2PvminstancesGetallOK) Code() int { + return 200 +} + +func (o *PcloudV2PvminstancesGetallOK) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallOK %+v", 200, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallOK %+v", 200, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallOK) GetPayload() *models.PVMInstancesV2 { + return o.Payload +} + +func (o *PcloudV2PvminstancesGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PVMInstancesV2) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPcloudV2PvminstancesGetallBadRequest creates a PcloudV2PvminstancesGetallBadRequest with default headers values +func NewPcloudV2PvminstancesGetallBadRequest() *PcloudV2PvminstancesGetallBadRequest { + return &PcloudV2PvminstancesGetallBadRequest{} +} + +/* +PcloudV2PvminstancesGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudV2PvminstancesGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances getall bad request response has a 2xx status code +func (o *PcloudV2PvminstancesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances getall bad request response has a 3xx status code +func (o *PcloudV2PvminstancesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances getall bad request response has a 4xx status code +func (o *PcloudV2PvminstancesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances getall bad request response has a 5xx status code +func (o *PcloudV2PvminstancesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances getall bad request response a status code equal to that given +func (o *PcloudV2PvminstancesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 pvminstances getall bad request response +func (o *PcloudV2PvminstancesGetallBadRequest) Code() int { + return 400 +} + +func (o *PcloudV2PvminstancesGetallBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesGetallBadRequest) 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 +} + +// NewPcloudV2PvminstancesGetallUnauthorized creates a PcloudV2PvminstancesGetallUnauthorized with default headers values +func NewPcloudV2PvminstancesGetallUnauthorized() *PcloudV2PvminstancesGetallUnauthorized { + return &PcloudV2PvminstancesGetallUnauthorized{} +} + +/* +PcloudV2PvminstancesGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudV2PvminstancesGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances getall unauthorized response has a 2xx status code +func (o *PcloudV2PvminstancesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances getall unauthorized response has a 3xx status code +func (o *PcloudV2PvminstancesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances getall unauthorized response has a 4xx status code +func (o *PcloudV2PvminstancesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances getall unauthorized response has a 5xx status code +func (o *PcloudV2PvminstancesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances getall unauthorized response a status code equal to that given +func (o *PcloudV2PvminstancesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 pvminstances getall unauthorized response +func (o *PcloudV2PvminstancesGetallUnauthorized) Code() int { + return 401 +} + +func (o *PcloudV2PvminstancesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesGetallUnauthorized) 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 +} + +// NewPcloudV2PvminstancesGetallForbidden creates a PcloudV2PvminstancesGetallForbidden with default headers values +func NewPcloudV2PvminstancesGetallForbidden() *PcloudV2PvminstancesGetallForbidden { + return &PcloudV2PvminstancesGetallForbidden{} +} + +/* +PcloudV2PvminstancesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2PvminstancesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances getall forbidden response has a 2xx status code +func (o *PcloudV2PvminstancesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances getall forbidden response has a 3xx status code +func (o *PcloudV2PvminstancesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances getall forbidden response has a 4xx status code +func (o *PcloudV2PvminstancesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances getall forbidden response has a 5xx status code +func (o *PcloudV2PvminstancesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances getall forbidden response a status code equal to that given +func (o *PcloudV2PvminstancesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 pvminstances getall forbidden response +func (o *PcloudV2PvminstancesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudV2PvminstancesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesGetallForbidden) 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 +} + +// 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{} +} + +/* +PcloudV2PvminstancesGetallRequestTimeout describes a response with status code 408, with default header values. + +Request Timeout +*/ +type PcloudV2PvminstancesGetallRequestTimeout struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances getall request timeout response has a 2xx status code +func (o *PcloudV2PvminstancesGetallRequestTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances getall request timeout response has a 3xx status code +func (o *PcloudV2PvminstancesGetallRequestTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances getall request timeout response has a 4xx status code +func (o *PcloudV2PvminstancesGetallRequestTimeout) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances getall request timeout response has a 5xx status code +func (o *PcloudV2PvminstancesGetallRequestTimeout) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances getall request timeout response a status code equal to that given +func (o *PcloudV2PvminstancesGetallRequestTimeout) IsCode(code int) bool { + return code == 408 +} + +// Code gets the status code for the pcloud v2 pvminstances getall request timeout response +func (o *PcloudV2PvminstancesGetallRequestTimeout) Code() int { + return 408 +} + +func (o *PcloudV2PvminstancesGetallRequestTimeout) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallRequestTimeout %+v", 408, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallRequestTimeout) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallRequestTimeout %+v", 408, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallRequestTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesGetallRequestTimeout) 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 +} + +// NewPcloudV2PvminstancesGetallInternalServerError creates a PcloudV2PvminstancesGetallInternalServerError with default headers values +func NewPcloudV2PvminstancesGetallInternalServerError() *PcloudV2PvminstancesGetallInternalServerError { + return &PcloudV2PvminstancesGetallInternalServerError{} +} + +/* +PcloudV2PvminstancesGetallInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PcloudV2PvminstancesGetallInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 pvminstances getall internal server error response has a 2xx status code +func (o *PcloudV2PvminstancesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances getall internal server error response has a 3xx status code +func (o *PcloudV2PvminstancesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances getall internal server error response has a 4xx status code +func (o *PcloudV2PvminstancesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 pvminstances getall internal server error response has a 5xx status code +func (o *PcloudV2PvminstancesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 pvminstances getall internal server error response a status code equal to that given +func (o *PcloudV2PvminstancesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 pvminstances getall internal server error response +func (o *PcloudV2PvminstancesGetallInternalServerError) Code() int { + return 500 +} + +func (o *PcloudV2PvminstancesGetallInternalServerError) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances][%d] pcloudV2PvminstancesGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudV2PvminstancesGetallInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2PvminstancesGetallInternalServerError) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go index 85828def897..801e58e2110 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go @@ -46,7 +46,7 @@ type ClientService interface { } /* - PcloudPlacementgroupsDelete deletes server placement group +PcloudPlacementgroupsDelete deletes server placement group */ func (a *Client) PcloudPlacementgroupsDelete(params *PcloudPlacementgroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsDeleteOK, error) { // TODO: Validate the params before sending @@ -85,7 +85,7 @@ func (a *Client) PcloudPlacementgroupsDelete(params *PcloudPlacementgroupsDelete } /* - PcloudPlacementgroupsGet gets server placement group detail +PcloudPlacementgroupsGet gets server placement group detail */ func (a *Client) PcloudPlacementgroupsGet(params *PcloudPlacementgroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsGetOK, error) { // TODO: Validate the params before sending @@ -124,7 +124,7 @@ func (a *Client) PcloudPlacementgroupsGet(params *PcloudPlacementgroupsGetParams } /* - PcloudPlacementgroupsGetall gets all server placement groups +PcloudPlacementgroupsGetall gets all server placement groups */ func (a *Client) PcloudPlacementgroupsGetall(params *PcloudPlacementgroupsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsGetallOK, error) { // TODO: Validate the params before sending @@ -163,7 +163,7 @@ func (a *Client) PcloudPlacementgroupsGetall(params *PcloudPlacementgroupsGetall } /* - PcloudPlacementgroupsMembersDelete removes server from placement group +PcloudPlacementgroupsMembersDelete removes server from placement group */ func (a *Client) PcloudPlacementgroupsMembersDelete(params *PcloudPlacementgroupsMembersDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsMembersDeleteOK, error) { // TODO: Validate the params before sending @@ -202,7 +202,7 @@ func (a *Client) PcloudPlacementgroupsMembersDelete(params *PcloudPlacementgroup } /* - PcloudPlacementgroupsMembersPost adds server to placement group +PcloudPlacementgroupsMembersPost adds server to placement group */ func (a *Client) PcloudPlacementgroupsMembersPost(params *PcloudPlacementgroupsMembersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsMembersPostOK, error) { // TODO: Validate the params before sending @@ -241,7 +241,7 @@ func (a *Client) PcloudPlacementgroupsMembersPost(params *PcloudPlacementgroupsM } /* - PcloudPlacementgroupsPost creates a new server placement group +PcloudPlacementgroupsPost creates a new server placement group */ func (a *Client) PcloudPlacementgroupsPost(params *PcloudPlacementgroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPlacementgroupsPostOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go index a81176ab48f..c028be24fe1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPlacementgroupsDeleteParamsWithHTTPClient(client *http.Client) *Pc } } -/* PcloudPlacementgroupsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud placementgroups delete operation. +/* +PcloudPlacementgroupsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud placementgroups delete operation. + + Typically these are written to a http.Request. */ type PcloudPlacementgroupsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go index 7052f606440..de762b14f24 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go @@ -35,6 +35,18 @@ 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 { + return nil, err + } + return nil, result case 404: result := NewPcloudPlacementgroupsDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudPlacementgroupsDeleteReader) ReadResponse(response runtime.Client } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}] pcloud.placementgroups.delete", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudPlacementgroupsDeleteOK() *PcloudPlacementgroupsDeleteOK { return &PcloudPlacementgroupsDeleteOK{} } -/* PcloudPlacementgroupsDeleteOK describes a response with status code 200, with default header values. +/* +PcloudPlacementgroupsDeleteOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudPlacementgroupsDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud placementgroups delete o k response has a 2xx status code +func (o *PcloudPlacementgroupsDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud placementgroups delete o k response has a 3xx status code +func (o *PcloudPlacementgroupsDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups delete o k response has a 4xx status code +func (o *PcloudPlacementgroupsDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups delete o k response has a 5xx status code +func (o *PcloudPlacementgroupsDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups delete o k response a status code equal to that given +func (o *PcloudPlacementgroupsDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud placementgroups delete o k response +func (o *PcloudPlacementgroupsDeleteOK) Code() int { + return 200 +} + func (o *PcloudPlacementgroupsDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudPlacementgroupsDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudPlacementgroupsDeleteOK) GetPayload() models.Object { return o.Payload } @@ -87,7 +135,8 @@ func NewPcloudPlacementgroupsDeleteBadRequest() *PcloudPlacementgroupsDeleteBadR return &PcloudPlacementgroupsDeleteBadRequest{} } -/* PcloudPlacementgroupsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudPlacementgroupsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -95,9 +144,44 @@ type PcloudPlacementgroupsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups delete bad request response has a 2xx status code +func (o *PcloudPlacementgroupsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups delete bad request response has a 3xx status code +func (o *PcloudPlacementgroupsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups delete bad request response has a 4xx status code +func (o *PcloudPlacementgroupsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups delete bad request response has a 5xx status code +func (o *PcloudPlacementgroupsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups delete bad request response a status code equal to that given +func (o *PcloudPlacementgroupsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud placementgroups delete bad request response +func (o *PcloudPlacementgroupsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudPlacementgroupsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPlacementgroupsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPlacementgroupsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -114,12 +198,149 @@ 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{} +} + +/* +PcloudPlacementgroupsDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPlacementgroupsDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups delete forbidden response has a 2xx status code +func (o *PcloudPlacementgroupsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups delete forbidden response has a 3xx status code +func (o *PcloudPlacementgroupsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups delete forbidden response has a 4xx status code +func (o *PcloudPlacementgroupsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups delete forbidden response has a 5xx status code +func (o *PcloudPlacementgroupsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups delete forbidden response a status code equal to that given +func (o *PcloudPlacementgroupsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud placementgroups delete forbidden response +func (o *PcloudPlacementgroupsDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudPlacementgroupsDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsDeleteForbidden) 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 +} + // NewPcloudPlacementgroupsDeleteNotFound creates a PcloudPlacementgroupsDeleteNotFound with default headers values func NewPcloudPlacementgroupsDeleteNotFound() *PcloudPlacementgroupsDeleteNotFound { return &PcloudPlacementgroupsDeleteNotFound{} } -/* PcloudPlacementgroupsDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudPlacementgroupsDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -127,9 +348,44 @@ type PcloudPlacementgroupsDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups delete not found response has a 2xx status code +func (o *PcloudPlacementgroupsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups delete not found response has a 3xx status code +func (o *PcloudPlacementgroupsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups delete not found response has a 4xx status code +func (o *PcloudPlacementgroupsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups delete not found response has a 5xx status code +func (o *PcloudPlacementgroupsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups delete not found response a status code equal to that given +func (o *PcloudPlacementgroupsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud placementgroups delete not found response +func (o *PcloudPlacementgroupsDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudPlacementgroupsDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudPlacementgroupsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudPlacementgroupsDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -151,7 +407,8 @@ func NewPcloudPlacementgroupsDeleteInternalServerError() *PcloudPlacementgroupsD return &PcloudPlacementgroupsDeleteInternalServerError{} } -/* PcloudPlacementgroupsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPlacementgroupsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -159,9 +416,44 @@ type PcloudPlacementgroupsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups delete internal server error response has a 2xx status code +func (o *PcloudPlacementgroupsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups delete internal server error response has a 3xx status code +func (o *PcloudPlacementgroupsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups delete internal server error response has a 4xx status code +func (o *PcloudPlacementgroupsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups delete internal server error response has a 5xx status code +func (o *PcloudPlacementgroupsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud placementgroups delete internal server error response a status code equal to that given +func (o *PcloudPlacementgroupsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud placementgroups delete internal server error response +func (o *PcloudPlacementgroupsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudPlacementgroupsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPlacementgroupsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPlacementgroupsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go index 7c9106fc5c8..f93349423b0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPlacementgroupsGetParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudPlacementgroupsGetParams contains all the parameters to send to the API endpoint - for the pcloud placementgroups get operation. +/* +PcloudPlacementgroupsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud placementgroups get operation. + + Typically these are written to a http.Request. */ type PcloudPlacementgroupsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go index 8a3a7acf9b9..5a9b0ee88d7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go @@ -35,6 +35,18 @@ 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 { + return nil, err + } + return nil, result case 404: result := NewPcloudPlacementgroupsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudPlacementgroupsGetReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}] pcloud.placementgroups.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudPlacementgroupsGetOK() *PcloudPlacementgroupsGetOK { return &PcloudPlacementgroupsGetOK{} } -/* PcloudPlacementgroupsGetOK describes a response with status code 200, with default header values. +/* +PcloudPlacementgroupsGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudPlacementgroupsGetOK struct { Payload *models.PlacementGroup } +// IsSuccess returns true when this pcloud placementgroups get o k response has a 2xx status code +func (o *PcloudPlacementgroupsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud placementgroups get o k response has a 3xx status code +func (o *PcloudPlacementgroupsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups get o k response has a 4xx status code +func (o *PcloudPlacementgroupsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups get o k response has a 5xx status code +func (o *PcloudPlacementgroupsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups get o k response a status code equal to that given +func (o *PcloudPlacementgroupsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud placementgroups get o k response +func (o *PcloudPlacementgroupsGetOK) Code() int { + return 200 +} + func (o *PcloudPlacementgroupsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetOK %+v", 200, o.Payload) } + +func (o *PcloudPlacementgroupsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetOK %+v", 200, o.Payload) +} + func (o *PcloudPlacementgroupsGetOK) GetPayload() *models.PlacementGroup { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudPlacementgroupsGetBadRequest() *PcloudPlacementgroupsGetBadRequest return &PcloudPlacementgroupsGetBadRequest{} } -/* PcloudPlacementgroupsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudPlacementgroupsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudPlacementgroupsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups get bad request response has a 2xx status code +func (o *PcloudPlacementgroupsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups get bad request response has a 3xx status code +func (o *PcloudPlacementgroupsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups get bad request response has a 4xx status code +func (o *PcloudPlacementgroupsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups get bad request response has a 5xx status code +func (o *PcloudPlacementgroupsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups get bad request response a status code equal to that given +func (o *PcloudPlacementgroupsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud placementgroups get bad request response +func (o *PcloudPlacementgroupsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudPlacementgroupsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPlacementgroupsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPlacementgroupsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -116,12 +200,149 @@ 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{} +} + +/* +PcloudPlacementgroupsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPlacementgroupsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups get forbidden response has a 2xx status code +func (o *PcloudPlacementgroupsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups get forbidden response has a 3xx status code +func (o *PcloudPlacementgroupsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups get forbidden response has a 4xx status code +func (o *PcloudPlacementgroupsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups get forbidden response has a 5xx status code +func (o *PcloudPlacementgroupsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups get forbidden response a status code equal to that given +func (o *PcloudPlacementgroupsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud placementgroups get forbidden response +func (o *PcloudPlacementgroupsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudPlacementgroupsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsGetForbidden) 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 +} + // NewPcloudPlacementgroupsGetNotFound creates a PcloudPlacementgroupsGetNotFound with default headers values func NewPcloudPlacementgroupsGetNotFound() *PcloudPlacementgroupsGetNotFound { return &PcloudPlacementgroupsGetNotFound{} } -/* PcloudPlacementgroupsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudPlacementgroupsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudPlacementgroupsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups get not found response has a 2xx status code +func (o *PcloudPlacementgroupsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups get not found response has a 3xx status code +func (o *PcloudPlacementgroupsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups get not found response has a 4xx status code +func (o *PcloudPlacementgroupsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups get not found response has a 5xx status code +func (o *PcloudPlacementgroupsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups get not found response a status code equal to that given +func (o *PcloudPlacementgroupsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud placementgroups get not found response +func (o *PcloudPlacementgroupsGetNotFound) Code() int { + return 404 +} + func (o *PcloudPlacementgroupsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudPlacementgroupsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudPlacementgroupsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudPlacementgroupsGetInternalServerError() *PcloudPlacementgroupsGetI return &PcloudPlacementgroupsGetInternalServerError{} } -/* PcloudPlacementgroupsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPlacementgroupsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudPlacementgroupsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups get internal server error response has a 2xx status code +func (o *PcloudPlacementgroupsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups get internal server error response has a 3xx status code +func (o *PcloudPlacementgroupsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups get internal server error response has a 4xx status code +func (o *PcloudPlacementgroupsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups get internal server error response has a 5xx status code +func (o *PcloudPlacementgroupsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud placementgroups get internal server error response a status code equal to that given +func (o *PcloudPlacementgroupsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud placementgroups get internal server error response +func (o *PcloudPlacementgroupsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudPlacementgroupsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPlacementgroupsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}][%d] pcloudPlacementgroupsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPlacementgroupsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go index 07366c2d8b1..a4fb1188bb1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPlacementgroupsGetallParamsWithHTTPClient(client *http.Client) *Pc } } -/* PcloudPlacementgroupsGetallParams contains all the parameters to send to the API endpoint - for the pcloud placementgroups getall operation. +/* +PcloudPlacementgroupsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud placementgroups getall operation. + + Typically these are written to a http.Request. */ type PcloudPlacementgroupsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go index 7263ac5fa8e..ce497c95cc3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudPlacementgroupsGetallReader) ReadResponse(response runtime.Client return nil, err } return nil, result + case 403: + result := NewPcloudPlacementgroupsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -48,7 +60,7 @@ func (o *PcloudPlacementgroupsGetallReader) ReadResponse(response runtime.Client } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups] pcloud.placementgroups.getall", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudPlacementgroupsGetallOK() *PcloudPlacementgroupsGetallOK { return &PcloudPlacementgroupsGetallOK{} } -/* PcloudPlacementgroupsGetallOK describes a response with status code 200, with default header values. +/* +PcloudPlacementgroupsGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudPlacementgroupsGetallOK struct { Payload *models.PlacementGroups } +// IsSuccess returns true when this pcloud placementgroups getall o k response has a 2xx status code +func (o *PcloudPlacementgroupsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud placementgroups getall o k response has a 3xx status code +func (o *PcloudPlacementgroupsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups getall o k response has a 4xx status code +func (o *PcloudPlacementgroupsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups getall o k response has a 5xx status code +func (o *PcloudPlacementgroupsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups getall o k response a status code equal to that given +func (o *PcloudPlacementgroupsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud placementgroups getall o k response +func (o *PcloudPlacementgroupsGetallOK) Code() int { + return 200 +} + func (o *PcloudPlacementgroupsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudPlacementgroupsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudPlacementgroupsGetallOK) GetPayload() *models.PlacementGroups { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudPlacementgroupsGetallBadRequest() *PcloudPlacementgroupsGetallBadR return &PcloudPlacementgroupsGetallBadRequest{} } -/* PcloudPlacementgroupsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudPlacementgroupsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudPlacementgroupsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups getall bad request response has a 2xx status code +func (o *PcloudPlacementgroupsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups getall bad request response has a 3xx status code +func (o *PcloudPlacementgroupsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups getall bad request response has a 4xx status code +func (o *PcloudPlacementgroupsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups getall bad request response has a 5xx status code +func (o *PcloudPlacementgroupsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups getall bad request response a status code equal to that given +func (o *PcloudPlacementgroupsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud placementgroups getall bad request response +func (o *PcloudPlacementgroupsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudPlacementgroupsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPlacementgroupsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPlacementgroupsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudPlacementgroupsGetallUnauthorized() *PcloudPlacementgroupsGetallUn return &PcloudPlacementgroupsGetallUnauthorized{} } -/* PcloudPlacementgroupsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPlacementgroupsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudPlacementgroupsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups getall unauthorized response has a 2xx status code +func (o *PcloudPlacementgroupsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups getall unauthorized response has a 3xx status code +func (o *PcloudPlacementgroupsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups getall unauthorized response has a 4xx status code +func (o *PcloudPlacementgroupsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups getall unauthorized response has a 5xx status code +func (o *PcloudPlacementgroupsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups getall unauthorized response a status code equal to that given +func (o *PcloudPlacementgroupsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud placementgroups getall unauthorized response +func (o *PcloudPlacementgroupsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudPlacementgroupsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPlacementgroupsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPlacementgroupsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudPlacementgroupsGetallUnauthorized) readResponse(response runtime. return nil } +// NewPcloudPlacementgroupsGetallForbidden creates a PcloudPlacementgroupsGetallForbidden with default headers values +func NewPcloudPlacementgroupsGetallForbidden() *PcloudPlacementgroupsGetallForbidden { + return &PcloudPlacementgroupsGetallForbidden{} +} + +/* +PcloudPlacementgroupsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPlacementgroupsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups getall forbidden response has a 2xx status code +func (o *PcloudPlacementgroupsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups getall forbidden response has a 3xx status code +func (o *PcloudPlacementgroupsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups getall forbidden response has a 4xx status code +func (o *PcloudPlacementgroupsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups getall forbidden response has a 5xx status code +func (o *PcloudPlacementgroupsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups getall forbidden response a status code equal to that given +func (o *PcloudPlacementgroupsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud placementgroups getall forbidden response +func (o *PcloudPlacementgroupsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudPlacementgroupsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsGetallForbidden) 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 +} + +// 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{} } -/* PcloudPlacementgroupsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPlacementgroupsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudPlacementgroupsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups getall internal server error response has a 2xx status code +func (o *PcloudPlacementgroupsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups getall internal server error response has a 3xx status code +func (o *PcloudPlacementgroupsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups getall internal server error response has a 4xx status code +func (o *PcloudPlacementgroupsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups getall internal server error response has a 5xx status code +func (o *PcloudPlacementgroupsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud placementgroups getall internal server error response a status code equal to that given +func (o *PcloudPlacementgroupsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud placementgroups getall internal server error response +func (o *PcloudPlacementgroupsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudPlacementgroupsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPlacementgroupsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPlacementgroupsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go index c860277a23c..5c7fd40199a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPlacementgroupsMembersDeleteParamsWithHTTPClient(client *http.Clie } } -/* PcloudPlacementgroupsMembersDeleteParams contains all the parameters to send to the API endpoint - for the pcloud placementgroups members delete operation. +/* +PcloudPlacementgroupsMembersDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud placementgroups members delete operation. + + Typically these are written to a http.Request. */ type PcloudPlacementgroupsMembersDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go index 513178760f2..f7e58a2e694 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go @@ -35,6 +35,18 @@ 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 { + return nil, err + } + return nil, result case 404: result := NewPcloudPlacementgroupsMembersDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +72,7 @@ func (o *PcloudPlacementgroupsMembersDeleteReader) ReadResponse(response runtime } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members] pcloud.placementgroups.members.delete", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewPcloudPlacementgroupsMembersDeleteOK() *PcloudPlacementgroupsMembersDele return &PcloudPlacementgroupsMembersDeleteOK{} } -/* PcloudPlacementgroupsMembersDeleteOK describes a response with status code 200, with default header values. +/* +PcloudPlacementgroupsMembersDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +90,44 @@ type PcloudPlacementgroupsMembersDeleteOK struct { Payload *models.PlacementGroup } +// IsSuccess returns true when this pcloud placementgroups members delete o k response has a 2xx status code +func (o *PcloudPlacementgroupsMembersDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud placementgroups members delete o k response has a 3xx status code +func (o *PcloudPlacementgroupsMembersDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members delete o k response has a 4xx status code +func (o *PcloudPlacementgroupsMembersDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups members delete o k response has a 5xx status code +func (o *PcloudPlacementgroupsMembersDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members delete o k response a status code equal to that given +func (o *PcloudPlacementgroupsMembersDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud placementgroups members delete o k response +func (o *PcloudPlacementgroupsMembersDeleteOK) Code() int { + return 200 +} + func (o *PcloudPlacementgroupsMembersDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudPlacementgroupsMembersDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudPlacementgroupsMembersDeleteOK) GetPayload() *models.PlacementGroup { return o.Payload } @@ -101,7 +149,8 @@ func NewPcloudPlacementgroupsMembersDeleteBadRequest() *PcloudPlacementgroupsMem return &PcloudPlacementgroupsMembersDeleteBadRequest{} } -/* PcloudPlacementgroupsMembersDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudPlacementgroupsMembersDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +158,44 @@ type PcloudPlacementgroupsMembersDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members delete bad request response has a 2xx status code +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members delete bad request response has a 3xx status code +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members delete bad request response has a 4xx status code +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members delete bad request response has a 5xx status code +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members delete bad request response a status code equal to that given +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud placementgroups members delete bad request response +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudPlacementgroupsMembersDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPlacementgroupsMembersDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPlacementgroupsMembersDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -128,12 +212,149 @@ 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{} +} + +/* +PcloudPlacementgroupsMembersDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPlacementgroupsMembersDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups members delete forbidden response has a 2xx status code +func (o *PcloudPlacementgroupsMembersDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members delete forbidden response has a 3xx status code +func (o *PcloudPlacementgroupsMembersDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members delete forbidden response has a 4xx status code +func (o *PcloudPlacementgroupsMembersDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members delete forbidden response has a 5xx status code +func (o *PcloudPlacementgroupsMembersDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members delete forbidden response a status code equal to that given +func (o *PcloudPlacementgroupsMembersDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud placementgroups members delete forbidden response +func (o *PcloudPlacementgroupsMembersDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudPlacementgroupsMembersDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsMembersDeleteForbidden) 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 +} + // NewPcloudPlacementgroupsMembersDeleteNotFound creates a PcloudPlacementgroupsMembersDeleteNotFound with default headers values func NewPcloudPlacementgroupsMembersDeleteNotFound() *PcloudPlacementgroupsMembersDeleteNotFound { return &PcloudPlacementgroupsMembersDeleteNotFound{} } -/* PcloudPlacementgroupsMembersDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudPlacementgroupsMembersDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -141,9 +362,44 @@ type PcloudPlacementgroupsMembersDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members delete not found response has a 2xx status code +func (o *PcloudPlacementgroupsMembersDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members delete not found response has a 3xx status code +func (o *PcloudPlacementgroupsMembersDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members delete not found response has a 4xx status code +func (o *PcloudPlacementgroupsMembersDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members delete not found response has a 5xx status code +func (o *PcloudPlacementgroupsMembersDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members delete not found response a status code equal to that given +func (o *PcloudPlacementgroupsMembersDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud placementgroups members delete not found response +func (o *PcloudPlacementgroupsMembersDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudPlacementgroupsMembersDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudPlacementgroupsMembersDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudPlacementgroupsMembersDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -165,7 +421,8 @@ func NewPcloudPlacementgroupsMembersDeleteConflict() *PcloudPlacementgroupsMembe return &PcloudPlacementgroupsMembersDeleteConflict{} } -/* PcloudPlacementgroupsMembersDeleteConflict describes a response with status code 409, with default header values. +/* +PcloudPlacementgroupsMembersDeleteConflict describes a response with status code 409, with default header values. Conflict */ @@ -173,9 +430,44 @@ type PcloudPlacementgroupsMembersDeleteConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members delete conflict response has a 2xx status code +func (o *PcloudPlacementgroupsMembersDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members delete conflict response has a 3xx status code +func (o *PcloudPlacementgroupsMembersDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members delete conflict response has a 4xx status code +func (o *PcloudPlacementgroupsMembersDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members delete conflict response has a 5xx status code +func (o *PcloudPlacementgroupsMembersDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members delete conflict response a status code equal to that given +func (o *PcloudPlacementgroupsMembersDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud placementgroups members delete conflict response +func (o *PcloudPlacementgroupsMembersDeleteConflict) Code() int { + return 409 +} + func (o *PcloudPlacementgroupsMembersDeleteConflict) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteConflict %+v", 409, o.Payload) } + +func (o *PcloudPlacementgroupsMembersDeleteConflict) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteConflict %+v", 409, o.Payload) +} + func (o *PcloudPlacementgroupsMembersDeleteConflict) GetPayload() *models.Error { return o.Payload } @@ -197,7 +489,8 @@ func NewPcloudPlacementgroupsMembersDeleteUnprocessableEntity() *PcloudPlacement return &PcloudPlacementgroupsMembersDeleteUnprocessableEntity{} } -/* PcloudPlacementgroupsMembersDeleteUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPlacementgroupsMembersDeleteUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +498,44 @@ type PcloudPlacementgroupsMembersDeleteUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members delete unprocessable entity response has a 2xx status code +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members delete unprocessable entity response has a 3xx status code +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members delete unprocessable entity response has a 4xx status code +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members delete unprocessable entity response has a 5xx status code +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members delete unprocessable entity response a status code equal to that given +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud placementgroups members delete unprocessable entity response +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPlacementgroupsMembersDeleteUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +557,8 @@ func NewPcloudPlacementgroupsMembersDeleteInternalServerError() *PcloudPlacement return &PcloudPlacementgroupsMembersDeleteInternalServerError{} } -/* PcloudPlacementgroupsMembersDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPlacementgroupsMembersDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +566,44 @@ type PcloudPlacementgroupsMembersDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members delete internal server error response has a 2xx status code +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members delete internal server error response has a 3xx status code +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members delete internal server error response has a 4xx status code +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups members delete internal server error response has a 5xx status code +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud placementgroups members delete internal server error response a status code equal to that given +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud placementgroups members delete internal server error response +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPlacementgroupsMembersDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go index 8f9106c1834..cdbaa913a11 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPlacementgroupsMembersPostParamsWithHTTPClient(client *http.Client } } -/* PcloudPlacementgroupsMembersPostParams contains all the parameters to send to the API endpoint - for the pcloud placementgroups members post operation. +/* +PcloudPlacementgroupsMembersPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud placementgroups members post operation. + + Typically these are written to a http.Request. */ type PcloudPlacementgroupsMembersPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go index c7d53f939b8..5c0e64d8a2f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go @@ -35,6 +35,18 @@ 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 { + return nil, err + } + return nil, result case 404: result := NewPcloudPlacementgroupsMembersPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +72,7 @@ func (o *PcloudPlacementgroupsMembersPostReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members] pcloud.placementgroups.members.post", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewPcloudPlacementgroupsMembersPostOK() *PcloudPlacementgroupsMembersPostOK return &PcloudPlacementgroupsMembersPostOK{} } -/* PcloudPlacementgroupsMembersPostOK describes a response with status code 200, with default header values. +/* +PcloudPlacementgroupsMembersPostOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +90,44 @@ type PcloudPlacementgroupsMembersPostOK struct { Payload *models.PlacementGroup } +// IsSuccess returns true when this pcloud placementgroups members post o k response has a 2xx status code +func (o *PcloudPlacementgroupsMembersPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud placementgroups members post o k response has a 3xx status code +func (o *PcloudPlacementgroupsMembersPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members post o k response has a 4xx status code +func (o *PcloudPlacementgroupsMembersPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups members post o k response has a 5xx status code +func (o *PcloudPlacementgroupsMembersPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members post o k response a status code equal to that given +func (o *PcloudPlacementgroupsMembersPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud placementgroups members post o k response +func (o *PcloudPlacementgroupsMembersPostOK) Code() int { + return 200 +} + func (o *PcloudPlacementgroupsMembersPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostOK %+v", 200, o.Payload) } + +func (o *PcloudPlacementgroupsMembersPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostOK %+v", 200, o.Payload) +} + func (o *PcloudPlacementgroupsMembersPostOK) GetPayload() *models.PlacementGroup { return o.Payload } @@ -101,7 +149,8 @@ func NewPcloudPlacementgroupsMembersPostBadRequest() *PcloudPlacementgroupsMembe return &PcloudPlacementgroupsMembersPostBadRequest{} } -/* PcloudPlacementgroupsMembersPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPlacementgroupsMembersPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +158,44 @@ type PcloudPlacementgroupsMembersPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members post bad request response has a 2xx status code +func (o *PcloudPlacementgroupsMembersPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members post bad request response has a 3xx status code +func (o *PcloudPlacementgroupsMembersPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members post bad request response has a 4xx status code +func (o *PcloudPlacementgroupsMembersPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members post bad request response has a 5xx status code +func (o *PcloudPlacementgroupsMembersPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members post bad request response a status code equal to that given +func (o *PcloudPlacementgroupsMembersPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud placementgroups members post bad request response +func (o *PcloudPlacementgroupsMembersPostBadRequest) Code() int { + return 400 +} + func (o *PcloudPlacementgroupsMembersPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPlacementgroupsMembersPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPlacementgroupsMembersPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -128,12 +212,149 @@ 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{} +} + +/* +PcloudPlacementgroupsMembersPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPlacementgroupsMembersPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups members post forbidden response has a 2xx status code +func (o *PcloudPlacementgroupsMembersPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members post forbidden response has a 3xx status code +func (o *PcloudPlacementgroupsMembersPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members post forbidden response has a 4xx status code +func (o *PcloudPlacementgroupsMembersPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members post forbidden response has a 5xx status code +func (o *PcloudPlacementgroupsMembersPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members post forbidden response a status code equal to that given +func (o *PcloudPlacementgroupsMembersPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud placementgroups members post forbidden response +func (o *PcloudPlacementgroupsMembersPostForbidden) Code() int { + return 403 +} + +func (o *PcloudPlacementgroupsMembersPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsMembersPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsMembersPostForbidden) 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 +} + // NewPcloudPlacementgroupsMembersPostNotFound creates a PcloudPlacementgroupsMembersPostNotFound with default headers values func NewPcloudPlacementgroupsMembersPostNotFound() *PcloudPlacementgroupsMembersPostNotFound { return &PcloudPlacementgroupsMembersPostNotFound{} } -/* PcloudPlacementgroupsMembersPostNotFound describes a response with status code 404, with default header values. +/* +PcloudPlacementgroupsMembersPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -141,9 +362,44 @@ type PcloudPlacementgroupsMembersPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members post not found response has a 2xx status code +func (o *PcloudPlacementgroupsMembersPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members post not found response has a 3xx status code +func (o *PcloudPlacementgroupsMembersPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members post not found response has a 4xx status code +func (o *PcloudPlacementgroupsMembersPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members post not found response has a 5xx status code +func (o *PcloudPlacementgroupsMembersPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members post not found response a status code equal to that given +func (o *PcloudPlacementgroupsMembersPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud placementgroups members post not found response +func (o *PcloudPlacementgroupsMembersPostNotFound) Code() int { + return 404 +} + func (o *PcloudPlacementgroupsMembersPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudPlacementgroupsMembersPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudPlacementgroupsMembersPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -165,7 +421,8 @@ func NewPcloudPlacementgroupsMembersPostConflict() *PcloudPlacementgroupsMembers return &PcloudPlacementgroupsMembersPostConflict{} } -/* PcloudPlacementgroupsMembersPostConflict describes a response with status code 409, with default header values. +/* +PcloudPlacementgroupsMembersPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -173,9 +430,44 @@ type PcloudPlacementgroupsMembersPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members post conflict response has a 2xx status code +func (o *PcloudPlacementgroupsMembersPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members post conflict response has a 3xx status code +func (o *PcloudPlacementgroupsMembersPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members post conflict response has a 4xx status code +func (o *PcloudPlacementgroupsMembersPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members post conflict response has a 5xx status code +func (o *PcloudPlacementgroupsMembersPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members post conflict response a status code equal to that given +func (o *PcloudPlacementgroupsMembersPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud placementgroups members post conflict response +func (o *PcloudPlacementgroupsMembersPostConflict) Code() int { + return 409 +} + func (o *PcloudPlacementgroupsMembersPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostConflict %+v", 409, o.Payload) } + +func (o *PcloudPlacementgroupsMembersPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostConflict %+v", 409, o.Payload) +} + func (o *PcloudPlacementgroupsMembersPostConflict) GetPayload() *models.Error { return o.Payload } @@ -197,7 +489,8 @@ func NewPcloudPlacementgroupsMembersPostUnprocessableEntity() *PcloudPlacementgr return &PcloudPlacementgroupsMembersPostUnprocessableEntity{} } -/* PcloudPlacementgroupsMembersPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPlacementgroupsMembersPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +498,44 @@ type PcloudPlacementgroupsMembersPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members post unprocessable entity response has a 2xx status code +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members post unprocessable entity response has a 3xx status code +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members post unprocessable entity response has a 4xx status code +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups members post unprocessable entity response has a 5xx status code +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups members post unprocessable entity response a status code equal to that given +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud placementgroups members post unprocessable entity response +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPlacementgroupsMembersPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +557,8 @@ func NewPcloudPlacementgroupsMembersPostInternalServerError() *PcloudPlacementgr return &PcloudPlacementgroupsMembersPostInternalServerError{} } -/* PcloudPlacementgroupsMembersPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPlacementgroupsMembersPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +566,44 @@ type PcloudPlacementgroupsMembersPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups members post internal server error response has a 2xx status code +func (o *PcloudPlacementgroupsMembersPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups members post internal server error response has a 3xx status code +func (o *PcloudPlacementgroupsMembersPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups members post internal server error response has a 4xx status code +func (o *PcloudPlacementgroupsMembersPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups members post internal server error response has a 5xx status code +func (o *PcloudPlacementgroupsMembersPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud placementgroups members post internal server error response a status code equal to that given +func (o *PcloudPlacementgroupsMembersPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud placementgroups members post internal server error response +func (o *PcloudPlacementgroupsMembersPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPlacementgroupsMembersPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPlacementgroupsMembersPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups/{placement_group_id}/members][%d] pcloudPlacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPlacementgroupsMembersPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go index 2bb2348af3a..abdf68442a3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPlacementgroupsPostParamsWithHTTPClient(client *http.Client) *Pclo } } -/* PcloudPlacementgroupsPostParams contains all the parameters to send to the API endpoint - for the pcloud placementgroups post operation. +/* +PcloudPlacementgroupsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud placementgroups post operation. + + Typically these are written to a http.Request. */ type PcloudPlacementgroupsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go index 448359f1992..71a5a91855b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go @@ -35,6 +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 { @@ -54,7 +72,7 @@ func (o *PcloudPlacementgroupsPostReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups] pcloud.placementgroups.post", response, response.Code()) } } @@ -63,7 +81,8 @@ func NewPcloudPlacementgroupsPostOK() *PcloudPlacementgroupsPostOK { return &PcloudPlacementgroupsPostOK{} } -/* PcloudPlacementgroupsPostOK describes a response with status code 200, with default header values. +/* +PcloudPlacementgroupsPostOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +90,44 @@ type PcloudPlacementgroupsPostOK struct { Payload *models.PlacementGroup } +// IsSuccess returns true when this pcloud placementgroups post o k response has a 2xx status code +func (o *PcloudPlacementgroupsPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud placementgroups post o k response has a 3xx status code +func (o *PcloudPlacementgroupsPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups post o k response has a 4xx status code +func (o *PcloudPlacementgroupsPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups post o k response has a 5xx status code +func (o *PcloudPlacementgroupsPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups post o k response a status code equal to that given +func (o *PcloudPlacementgroupsPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud placementgroups post o k response +func (o *PcloudPlacementgroupsPostOK) Code() int { + return 200 +} + func (o *PcloudPlacementgroupsPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostOK %+v", 200, o.Payload) } + +func (o *PcloudPlacementgroupsPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostOK %+v", 200, o.Payload) +} + func (o *PcloudPlacementgroupsPostOK) GetPayload() *models.PlacementGroup { return o.Payload } @@ -95,7 +149,8 @@ func NewPcloudPlacementgroupsPostBadRequest() *PcloudPlacementgroupsPostBadReque return &PcloudPlacementgroupsPostBadRequest{} } -/* PcloudPlacementgroupsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPlacementgroupsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +158,44 @@ type PcloudPlacementgroupsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups post bad request response has a 2xx status code +func (o *PcloudPlacementgroupsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups post bad request response has a 3xx status code +func (o *PcloudPlacementgroupsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups post bad request response has a 4xx status code +func (o *PcloudPlacementgroupsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups post bad request response has a 5xx status code +func (o *PcloudPlacementgroupsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups post bad request response a status code equal to that given +func (o *PcloudPlacementgroupsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud placementgroups post bad request response +func (o *PcloudPlacementgroupsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudPlacementgroupsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPlacementgroupsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPlacementgroupsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -122,12 +212,217 @@ 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{} +} + +/* +PcloudPlacementgroupsPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPlacementgroupsPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud placementgroups post forbidden response has a 2xx status code +func (o *PcloudPlacementgroupsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups post forbidden response has a 3xx status code +func (o *PcloudPlacementgroupsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups post forbidden response has a 4xx status code +func (o *PcloudPlacementgroupsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups post forbidden response has a 5xx status code +func (o *PcloudPlacementgroupsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups post forbidden response a status code equal to that given +func (o *PcloudPlacementgroupsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud placementgroups post forbidden response +func (o *PcloudPlacementgroupsPostForbidden) Code() int { + return 403 +} + +func (o *PcloudPlacementgroupsPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPlacementgroupsPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPlacementgroupsPostForbidden) 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 +} + +// 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{} } -/* PcloudPlacementgroupsPostConflict describes a response with status code 409, with default header values. +/* +PcloudPlacementgroupsPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -135,9 +430,44 @@ type PcloudPlacementgroupsPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups post conflict response has a 2xx status code +func (o *PcloudPlacementgroupsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups post conflict response has a 3xx status code +func (o *PcloudPlacementgroupsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups post conflict response has a 4xx status code +func (o *PcloudPlacementgroupsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups post conflict response has a 5xx status code +func (o *PcloudPlacementgroupsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups post conflict response a status code equal to that given +func (o *PcloudPlacementgroupsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud placementgroups post conflict response +func (o *PcloudPlacementgroupsPostConflict) Code() int { + return 409 +} + func (o *PcloudPlacementgroupsPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostConflict %+v", 409, o.Payload) } + +func (o *PcloudPlacementgroupsPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostConflict %+v", 409, o.Payload) +} + func (o *PcloudPlacementgroupsPostConflict) GetPayload() *models.Error { return o.Payload } @@ -159,7 +489,8 @@ func NewPcloudPlacementgroupsPostUnprocessableEntity() *PcloudPlacementgroupsPos return &PcloudPlacementgroupsPostUnprocessableEntity{} } -/* PcloudPlacementgroupsPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudPlacementgroupsPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -167,9 +498,44 @@ type PcloudPlacementgroupsPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups post unprocessable entity response has a 2xx status code +func (o *PcloudPlacementgroupsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups post unprocessable entity response has a 3xx status code +func (o *PcloudPlacementgroupsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups post unprocessable entity response has a 4xx status code +func (o *PcloudPlacementgroupsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud placementgroups post unprocessable entity response has a 5xx status code +func (o *PcloudPlacementgroupsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud placementgroups post unprocessable entity response a status code equal to that given +func (o *PcloudPlacementgroupsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud placementgroups post unprocessable entity response +func (o *PcloudPlacementgroupsPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudPlacementgroupsPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudPlacementgroupsPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudPlacementgroupsPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -191,7 +557,8 @@ func NewPcloudPlacementgroupsPostInternalServerError() *PcloudPlacementgroupsPos return &PcloudPlacementgroupsPostInternalServerError{} } -/* PcloudPlacementgroupsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPlacementgroupsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +566,44 @@ type PcloudPlacementgroupsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud placementgroups post internal server error response has a 2xx status code +func (o *PcloudPlacementgroupsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud placementgroups post internal server error response has a 3xx status code +func (o *PcloudPlacementgroupsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud placementgroups post internal server error response has a 4xx status code +func (o *PcloudPlacementgroupsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud placementgroups post internal server error response has a 5xx status code +func (o *PcloudPlacementgroupsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud placementgroups post internal server error response a status code equal to that given +func (o *PcloudPlacementgroupsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud placementgroups post internal server error response +func (o *PcloudPlacementgroupsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPlacementgroupsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPlacementgroupsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/placement-groups][%d] pcloudPlacementgroupsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPlacementgroupsPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go new file mode 100644 index 00000000000..c1782ac2718 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/p_cloud_pod_capacity_client.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_pod_capacity + +// 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 p cloud pod capacity API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for p cloud pod capacity 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 { + PcloudPodcapacityGet(params *PcloudPodcapacityGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPodcapacityGetOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +PcloudPodcapacityGet lists of available resources within a particular pod +*/ +func (a *Client) PcloudPodcapacityGet(params *PcloudPodcapacityGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPodcapacityGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudPodcapacityGetParams() + } + op := &runtime.ClientOperation{ + ID: "pcloud.podcapacity.get", + Method: "GET", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudPodcapacityGetReader{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.(*PcloudPodcapacityGetOK) + 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 pcloud.podcapacity.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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_parameters.go new file mode 100644 index 00000000000..897441dad2d --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_pod_capacity + +// 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" +) + +// NewPcloudPodcapacityGetParams creates a new PcloudPodcapacityGetParams 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 NewPcloudPodcapacityGetParams() *PcloudPodcapacityGetParams { + return &PcloudPodcapacityGetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudPodcapacityGetParamsWithTimeout creates a new PcloudPodcapacityGetParams object +// with the ability to set a timeout on a request. +func NewPcloudPodcapacityGetParamsWithTimeout(timeout time.Duration) *PcloudPodcapacityGetParams { + return &PcloudPodcapacityGetParams{ + timeout: timeout, + } +} + +// NewPcloudPodcapacityGetParamsWithContext creates a new PcloudPodcapacityGetParams object +// with the ability to set a context for a request. +func NewPcloudPodcapacityGetParamsWithContext(ctx context.Context) *PcloudPodcapacityGetParams { + return &PcloudPodcapacityGetParams{ + Context: ctx, + } +} + +// NewPcloudPodcapacityGetParamsWithHTTPClient creates a new PcloudPodcapacityGetParams object +// with the ability to set a custom HTTPClient for a request. +func NewPcloudPodcapacityGetParamsWithHTTPClient(client *http.Client) *PcloudPodcapacityGetParams { + return &PcloudPodcapacityGetParams{ + HTTPClient: client, + } +} + +/* +PcloudPodcapacityGetParams contains all the parameters to send to the API endpoint + + for the pcloud podcapacity get operation. + + Typically these are written to a http.Request. +*/ +type PcloudPodcapacityGetParams struct { + + /* CloudInstanceID. + + Cloud Instance ID of a PCloud Instance + */ + CloudInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pcloud podcapacity get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPodcapacityGetParams) WithDefaults() *PcloudPodcapacityGetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pcloud podcapacity get params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudPodcapacityGetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pcloud podcapacity get params +func (o *PcloudPodcapacityGetParams) WithTimeout(timeout time.Duration) *PcloudPodcapacityGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud podcapacity get params +func (o *PcloudPodcapacityGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud podcapacity get params +func (o *PcloudPodcapacityGetParams) WithContext(ctx context.Context) *PcloudPodcapacityGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud podcapacity get params +func (o *PcloudPodcapacityGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud podcapacity get params +func (o *PcloudPodcapacityGetParams) WithHTTPClient(client *http.Client) *PcloudPodcapacityGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud podcapacity get params +func (o *PcloudPodcapacityGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud podcapacity get params +func (o *PcloudPodcapacityGetParams) WithCloudInstanceID(cloudInstanceID string) *PcloudPodcapacityGetParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud podcapacity get params +func (o *PcloudPodcapacityGetParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudPodcapacityGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go new file mode 100644 index 00000000000..681badbb11d --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity/pcloud_podcapacity_get_responses.go @@ -0,0 +1,473 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_pod_capacity + +// 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" +) + +// PcloudPodcapacityGetReader is a Reader for the PcloudPodcapacityGet structure. +type PcloudPodcapacityGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudPodcapacityGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPcloudPodcapacityGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { + return nil, err + } + return nil, result + case 403: + result := NewPcloudPodcapacityGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity] pcloud.podcapacity.get", response, response.Code()) + } +} + +// NewPcloudPodcapacityGetOK creates a PcloudPodcapacityGetOK with default headers values +func NewPcloudPodcapacityGetOK() *PcloudPodcapacityGetOK { + return &PcloudPodcapacityGetOK{} +} + +/* +PcloudPodcapacityGetOK describes a response with status code 200, with default header values. + +OK +*/ +type PcloudPodcapacityGetOK struct { + Payload *models.PodCapacity +} + +// IsSuccess returns true when this pcloud podcapacity get o k response has a 2xx status code +func (o *PcloudPodcapacityGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud podcapacity get o k response has a 3xx status code +func (o *PcloudPodcapacityGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud podcapacity get o k response has a 4xx status code +func (o *PcloudPodcapacityGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud podcapacity get o k response has a 5xx status code +func (o *PcloudPodcapacityGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud podcapacity get o k response a status code equal to that given +func (o *PcloudPodcapacityGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud podcapacity get o k response +func (o *PcloudPodcapacityGetOK) Code() int { + return 200 +} + +func (o *PcloudPodcapacityGetOK) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetOK %+v", 200, o.Payload) +} + +func (o *PcloudPodcapacityGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetOK %+v", 200, o.Payload) +} + +func (o *PcloudPodcapacityGetOK) GetPayload() *models.PodCapacity { + return o.Payload +} + +func (o *PcloudPodcapacityGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PodCapacity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + 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{} +} + +/* +PcloudPodcapacityGetUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudPodcapacityGetUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud podcapacity get unauthorized response has a 2xx status code +func (o *PcloudPodcapacityGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud podcapacity get unauthorized response has a 3xx status code +func (o *PcloudPodcapacityGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud podcapacity get unauthorized response has a 4xx status code +func (o *PcloudPodcapacityGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud podcapacity get unauthorized response has a 5xx status code +func (o *PcloudPodcapacityGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud podcapacity get unauthorized response a status code equal to that given +func (o *PcloudPodcapacityGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud podcapacity get unauthorized response +func (o *PcloudPodcapacityGetUnauthorized) Code() int { + return 401 +} + +func (o *PcloudPodcapacityGetUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPodcapacityGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudPodcapacityGetUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPodcapacityGetUnauthorized) 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 +} + +// NewPcloudPodcapacityGetForbidden creates a PcloudPodcapacityGetForbidden with default headers values +func NewPcloudPodcapacityGetForbidden() *PcloudPodcapacityGetForbidden { + return &PcloudPodcapacityGetForbidden{} +} + +/* +PcloudPodcapacityGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPodcapacityGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud podcapacity get forbidden response has a 2xx status code +func (o *PcloudPodcapacityGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud podcapacity get forbidden response has a 3xx status code +func (o *PcloudPodcapacityGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud podcapacity get forbidden response has a 4xx status code +func (o *PcloudPodcapacityGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud podcapacity get forbidden response has a 5xx status code +func (o *PcloudPodcapacityGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud podcapacity get forbidden response a status code equal to that given +func (o *PcloudPodcapacityGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud podcapacity get forbidden response +func (o *PcloudPodcapacityGetForbidden) Code() int { + return 403 +} + +func (o *PcloudPodcapacityGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPodcapacityGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPodcapacityGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPodcapacityGetForbidden) 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 +} + +// 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{} +} + +/* +PcloudPodcapacityGetInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PcloudPodcapacityGetInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud podcapacity get internal server error response has a 2xx status code +func (o *PcloudPodcapacityGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud podcapacity get internal server error response has a 3xx status code +func (o *PcloudPodcapacityGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud podcapacity get internal server error response has a 4xx status code +func (o *PcloudPodcapacityGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud podcapacity get internal server error response has a 5xx status code +func (o *PcloudPodcapacityGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud podcapacity get internal server error response a status code equal to that given +func (o *PcloudPodcapacityGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud podcapacity get internal server error response +func (o *PcloudPodcapacityGetInternalServerError) Code() int { + return 500 +} + +func (o *PcloudPodcapacityGetInternalServerError) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudPodcapacityGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pod-capacity][%d] pcloudPodcapacityGetInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudPodcapacityGetInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPodcapacityGetInternalServerError) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/p_cloudsap_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/p_cloudsap_client.go index 0504c37c91e..917e5395633 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/p_cloudsap_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/p_cloudsap_client.go @@ -40,7 +40,7 @@ type ClientService interface { } /* - PcloudSapGet gets the information on an s a p profile +PcloudSapGet gets the information on an s a p profile */ func (a *Client) PcloudSapGet(params *PcloudSapGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSapGetOK, error) { // TODO: Validate the params before sending @@ -79,7 +79,7 @@ func (a *Client) PcloudSapGet(params *PcloudSapGetParams, authInfo runtime.Clien } /* - PcloudSapGetall gets list of s a p profiles +PcloudSapGetall gets list of s a p profiles */ func (a *Client) PcloudSapGetall(params *PcloudSapGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSapGetallOK, error) { // TODO: Validate the params before sending @@ -118,7 +118,7 @@ func (a *Client) PcloudSapGetall(params *PcloudSapGetallParams, authInfo runtime } /* - PcloudSapPost creates a new s a p p VM instance +PcloudSapPost creates a new s a p p VM instance */ func (a *Client) PcloudSapPost(params *PcloudSapPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSapPostOK, *PcloudSapPostCreated, *PcloudSapPostAccepted, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_parameters.go index 76081ddb140..b9d629fc6fd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSapGetParamsWithHTTPClient(client *http.Client) *PcloudSapGetParam } } -/* PcloudSapGetParams contains all the parameters to send to the API endpoint - for the pcloud sap get operation. +/* +PcloudSapGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sap get operation. + + Typically these are written to a http.Request. */ type PcloudSapGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go index 395448fd440..ec80f3bdf13 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudSapGetReader) ReadResponse(response runtime.ClientResponse, consu } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}] pcloud.sap.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudSapGetOK() *PcloudSapGetOK { return &PcloudSapGetOK{} } -/* PcloudSapGetOK describes a response with status code 200, with default header values. +/* +PcloudSapGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudSapGetOK struct { Payload *models.SAPProfile } +// IsSuccess returns true when this pcloud sap get o k response has a 2xx status code +func (o *PcloudSapGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sap get o k response has a 3xx status code +func (o *PcloudSapGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap get o k response has a 4xx status code +func (o *PcloudSapGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sap get o k response has a 5xx status code +func (o *PcloudSapGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap get o k response a status code equal to that given +func (o *PcloudSapGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sap get o k response +func (o *PcloudSapGetOK) Code() int { + return 200 +} + func (o *PcloudSapGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetOK %+v", 200, o.Payload) } + +func (o *PcloudSapGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetOK %+v", 200, o.Payload) +} + func (o *PcloudSapGetOK) GetPayload() *models.SAPProfile { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudSapGetBadRequest() *PcloudSapGetBadRequest { return &PcloudSapGetBadRequest{} } -/* PcloudSapGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudSapGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudSapGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap get bad request response has a 2xx status code +func (o *PcloudSapGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap get bad request response has a 3xx status code +func (o *PcloudSapGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap get bad request response has a 4xx status code +func (o *PcloudSapGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap get bad request response has a 5xx status code +func (o *PcloudSapGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap get bad request response a status code equal to that given +func (o *PcloudSapGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sap get bad request response +func (o *PcloudSapGetBadRequest) Code() int { + return 400 +} + func (o *PcloudSapGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSapGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSapGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudSapGetUnauthorized() *PcloudSapGetUnauthorized { return &PcloudSapGetUnauthorized{} } -/* PcloudSapGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSapGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudSapGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap get unauthorized response has a 2xx status code +func (o *PcloudSapGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap get unauthorized response has a 3xx status code +func (o *PcloudSapGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap get unauthorized response has a 4xx status code +func (o *PcloudSapGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap get unauthorized response has a 5xx status code +func (o *PcloudSapGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap get unauthorized response a status code equal to that given +func (o *PcloudSapGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sap get unauthorized response +func (o *PcloudSapGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudSapGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSapGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSapGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ 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{} } -/* PcloudSapGetNotFound describes a response with status code 404, with default header values. +/* +PcloudSapGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudSapGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap get not found response has a 2xx status code +func (o *PcloudSapGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap get not found response has a 3xx status code +func (o *PcloudSapGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap get not found response has a 4xx status code +func (o *PcloudSapGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap get not found response has a 5xx status code +func (o *PcloudSapGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap get not found response a status code equal to that given +func (o *PcloudSapGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sap get not found response +func (o *PcloudSapGetNotFound) Code() int { + return 404 +} + func (o *PcloudSapGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudSapGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudSapGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudSapGetInternalServerError() *PcloudSapGetInternalServerError { return &PcloudSapGetInternalServerError{} } -/* PcloudSapGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSapGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudSapGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap get internal server error response has a 2xx status code +func (o *PcloudSapGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap get internal server error response has a 3xx status code +func (o *PcloudSapGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap get internal server error response has a 4xx status code +func (o *PcloudSapGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sap get internal server error response has a 5xx status code +func (o *PcloudSapGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sap get internal server error response a status code equal to that given +func (o *PcloudSapGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sap get internal server error response +func (o *PcloudSapGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudSapGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSapGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap/{sap_profile_id}][%d] pcloudSapGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSapGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_parameters.go index 725a1afc583..108da8cd62a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSapGetallParamsWithHTTPClient(client *http.Client) *PcloudSapGetal } } -/* PcloudSapGetallParams contains all the parameters to send to the API endpoint - for the pcloud sap getall operation. +/* +PcloudSapGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sap getall operation. + + Typically these are written to a http.Request. */ type PcloudSapGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go index 97b35e04c1a..52684d05477 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *PcloudSapGetallReader) ReadResponse(response runtime.ClientResponse, co } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap] pcloud.sap.getall", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudSapGetallOK() *PcloudSapGetallOK { return &PcloudSapGetallOK{} } -/* PcloudSapGetallOK describes a response with status code 200, with default header values. +/* +PcloudSapGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudSapGetallOK struct { Payload *models.SAPProfiles } +// IsSuccess returns true when this pcloud sap getall o k response has a 2xx status code +func (o *PcloudSapGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sap getall o k response has a 3xx status code +func (o *PcloudSapGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap getall o k response has a 4xx status code +func (o *PcloudSapGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sap getall o k response has a 5xx status code +func (o *PcloudSapGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap getall o k response a status code equal to that given +func (o *PcloudSapGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sap getall o k response +func (o *PcloudSapGetallOK) Code() int { + return 200 +} + func (o *PcloudSapGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallOK %+v", 200, o.Payload) } + +func (o *PcloudSapGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallOK %+v", 200, o.Payload) +} + func (o *PcloudSapGetallOK) GetPayload() *models.SAPProfiles { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudSapGetallBadRequest() *PcloudSapGetallBadRequest { return &PcloudSapGetallBadRequest{} } -/* PcloudSapGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudSapGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudSapGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap getall bad request response has a 2xx status code +func (o *PcloudSapGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap getall bad request response has a 3xx status code +func (o *PcloudSapGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap getall bad request response has a 4xx status code +func (o *PcloudSapGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap getall bad request response has a 5xx status code +func (o *PcloudSapGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap getall bad request response a status code equal to that given +func (o *PcloudSapGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sap getall bad request response +func (o *PcloudSapGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudSapGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSapGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSapGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudSapGetallUnauthorized() *PcloudSapGetallUnauthorized { return &PcloudSapGetallUnauthorized{} } -/* PcloudSapGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSapGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudSapGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap getall unauthorized response has a 2xx status code +func (o *PcloudSapGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap getall unauthorized response has a 3xx status code +func (o *PcloudSapGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap getall unauthorized response has a 4xx status code +func (o *PcloudSapGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap getall unauthorized response has a 5xx status code +func (o *PcloudSapGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap getall unauthorized response a status code equal to that given +func (o *PcloudSapGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sap getall unauthorized response +func (o *PcloudSapGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudSapGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSapGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSapGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ 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{} } -/* PcloudSapGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSapGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudSapGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap getall internal server error response has a 2xx status code +func (o *PcloudSapGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap getall internal server error response has a 3xx status code +func (o *PcloudSapGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap getall internal server error response has a 4xx status code +func (o *PcloudSapGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sap getall internal server error response has a 5xx status code +func (o *PcloudSapGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sap getall internal server error response a status code equal to that given +func (o *PcloudSapGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sap getall internal server error response +func (o *PcloudSapGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudSapGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSapGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSapGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_parameters.go index 1b8ad094aa3..fd17be92159 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudSapPostParamsWithHTTPClient(client *http.Client) *PcloudSapPostPar } } -/* PcloudSapPostParams contains all the parameters to send to the API endpoint - for the pcloud sap post operation. +/* +PcloudSapPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sap post operation. + + Typically these are written to a http.Request. */ type PcloudSapPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go index 802291ee218..f68c030e4d4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -72,7 +84,7 @@ func (o *PcloudSapPostReader) ReadResponse(response runtime.ClientResponse, cons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap] pcloud.sap.post", response, response.Code()) } } @@ -81,7 +93,8 @@ func NewPcloudSapPostOK() *PcloudSapPostOK { return &PcloudSapPostOK{} } -/* PcloudSapPostOK describes a response with status code 200, with default header values. +/* +PcloudSapPostOK describes a response with status code 200, with default header values. OK */ @@ -89,9 +102,44 @@ type PcloudSapPostOK struct { Payload models.PVMInstanceList } +// IsSuccess returns true when this pcloud sap post o k response has a 2xx status code +func (o *PcloudSapPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sap post o k response has a 3xx status code +func (o *PcloudSapPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post o k response has a 4xx status code +func (o *PcloudSapPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sap post o k response has a 5xx status code +func (o *PcloudSapPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post o k response a status code equal to that given +func (o *PcloudSapPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sap post o k response +func (o *PcloudSapPostOK) Code() int { + return 200 +} + func (o *PcloudSapPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostOK %+v", 200, o.Payload) } + +func (o *PcloudSapPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostOK %+v", 200, o.Payload) +} + func (o *PcloudSapPostOK) GetPayload() models.PVMInstanceList { return o.Payload } @@ -111,7 +159,8 @@ func NewPcloudSapPostCreated() *PcloudSapPostCreated { return &PcloudSapPostCreated{} } -/* PcloudSapPostCreated describes a response with status code 201, with default header values. +/* +PcloudSapPostCreated describes a response with status code 201, with default header values. Created */ @@ -119,9 +168,44 @@ type PcloudSapPostCreated struct { Payload models.PVMInstanceList } +// IsSuccess returns true when this pcloud sap post created response has a 2xx status code +func (o *PcloudSapPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sap post created response has a 3xx status code +func (o *PcloudSapPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post created response has a 4xx status code +func (o *PcloudSapPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sap post created response has a 5xx status code +func (o *PcloudSapPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post created response a status code equal to that given +func (o *PcloudSapPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud sap post created response +func (o *PcloudSapPostCreated) Code() int { + return 201 +} + func (o *PcloudSapPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostCreated %+v", 201, o.Payload) } + +func (o *PcloudSapPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostCreated %+v", 201, o.Payload) +} + func (o *PcloudSapPostCreated) GetPayload() models.PVMInstanceList { return o.Payload } @@ -141,7 +225,8 @@ func NewPcloudSapPostAccepted() *PcloudSapPostAccepted { return &PcloudSapPostAccepted{} } -/* PcloudSapPostAccepted describes a response with status code 202, with default header values. +/* +PcloudSapPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -149,9 +234,44 @@ type PcloudSapPostAccepted struct { Payload models.PVMInstanceList } +// IsSuccess returns true when this pcloud sap post accepted response has a 2xx status code +func (o *PcloudSapPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sap post accepted response has a 3xx status code +func (o *PcloudSapPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post accepted response has a 4xx status code +func (o *PcloudSapPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sap post accepted response has a 5xx status code +func (o *PcloudSapPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post accepted response a status code equal to that given +func (o *PcloudSapPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud sap post accepted response +func (o *PcloudSapPostAccepted) Code() int { + return 202 +} + func (o *PcloudSapPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudSapPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudSapPostAccepted) GetPayload() models.PVMInstanceList { return o.Payload } @@ -171,7 +291,8 @@ func NewPcloudSapPostBadRequest() *PcloudSapPostBadRequest { return &PcloudSapPostBadRequest{} } -/* PcloudSapPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudSapPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -179,9 +300,44 @@ type PcloudSapPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap post bad request response has a 2xx status code +func (o *PcloudSapPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap post bad request response has a 3xx status code +func (o *PcloudSapPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post bad request response has a 4xx status code +func (o *PcloudSapPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap post bad request response has a 5xx status code +func (o *PcloudSapPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post bad request response a status code equal to that given +func (o *PcloudSapPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sap post bad request response +func (o *PcloudSapPostBadRequest) Code() int { + return 400 +} + func (o *PcloudSapPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSapPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSapPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -203,7 +359,8 @@ func NewPcloudSapPostUnauthorized() *PcloudSapPostUnauthorized { return &PcloudSapPostUnauthorized{} } -/* PcloudSapPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSapPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -211,9 +368,44 @@ type PcloudSapPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap post unauthorized response has a 2xx status code +func (o *PcloudSapPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap post unauthorized response has a 3xx status code +func (o *PcloudSapPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post unauthorized response has a 4xx status code +func (o *PcloudSapPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap post unauthorized response has a 5xx status code +func (o *PcloudSapPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post unauthorized response a status code equal to that given +func (o *PcloudSapPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sap post unauthorized response +func (o *PcloudSapPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudSapPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSapPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSapPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -230,12 +422,149 @@ 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{} } -/* PcloudSapPostConflict describes a response with status code 409, with default header values. +/* +PcloudSapPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -243,9 +572,44 @@ type PcloudSapPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap post conflict response has a 2xx status code +func (o *PcloudSapPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap post conflict response has a 3xx status code +func (o *PcloudSapPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post conflict response has a 4xx status code +func (o *PcloudSapPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap post conflict response has a 5xx status code +func (o *PcloudSapPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post conflict response a status code equal to that given +func (o *PcloudSapPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud sap post conflict response +func (o *PcloudSapPostConflict) Code() int { + return 409 +} + func (o *PcloudSapPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostConflict %+v", 409, o.Payload) } + +func (o *PcloudSapPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostConflict %+v", 409, o.Payload) +} + func (o *PcloudSapPostConflict) GetPayload() *models.Error { return o.Payload } @@ -267,7 +631,8 @@ func NewPcloudSapPostUnprocessableEntity() *PcloudSapPostUnprocessableEntity { return &PcloudSapPostUnprocessableEntity{} } -/* PcloudSapPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudSapPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -275,9 +640,44 @@ type PcloudSapPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap post unprocessable entity response has a 2xx status code +func (o *PcloudSapPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap post unprocessable entity response has a 3xx status code +func (o *PcloudSapPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post unprocessable entity response has a 4xx status code +func (o *PcloudSapPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sap post unprocessable entity response has a 5xx status code +func (o *PcloudSapPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sap post unprocessable entity response a status code equal to that given +func (o *PcloudSapPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud sap post unprocessable entity response +func (o *PcloudSapPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudSapPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudSapPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudSapPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -299,7 +699,8 @@ func NewPcloudSapPostInternalServerError() *PcloudSapPostInternalServerError { return &PcloudSapPostInternalServerError{} } -/* PcloudSapPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSapPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -307,9 +708,44 @@ type PcloudSapPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sap post internal server error response has a 2xx status code +func (o *PcloudSapPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sap post internal server error response has a 3xx status code +func (o *PcloudSapPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sap post internal server error response has a 4xx status code +func (o *PcloudSapPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sap post internal server error response has a 5xx status code +func (o *PcloudSapPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sap post internal server error response a status code equal to that given +func (o *PcloudSapPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sap post internal server error response +func (o *PcloudSapPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudSapPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSapPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/sap][%d] pcloudSapPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSapPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go index 1783fd6dc3b..6407002adc5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go @@ -46,7 +46,7 @@ type ClientService interface { } /* - PcloudSppplacementgroupsDelete deletes a shared processor pool placement group from a cloud instance +PcloudSppplacementgroupsDelete deletes a shared processor pool placement group from a cloud instance */ func (a *Client) PcloudSppplacementgroupsDelete(params *PcloudSppplacementgroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsDeleteOK, error) { // TODO: Validate the params before sending @@ -85,7 +85,7 @@ func (a *Client) PcloudSppplacementgroupsDelete(params *PcloudSppplacementgroups } /* - PcloudSppplacementgroupsGet gets the detail of a shared processor pool placement group for a cloud instance +PcloudSppplacementgroupsGet gets the detail of a shared processor pool placement group for a cloud instance */ func (a *Client) PcloudSppplacementgroupsGet(params *PcloudSppplacementgroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsGetOK, error) { // TODO: Validate the params before sending @@ -124,7 +124,7 @@ func (a *Client) PcloudSppplacementgroupsGet(params *PcloudSppplacementgroupsGet } /* - PcloudSppplacementgroupsGetall gets the list of shared processor pool placement groups for a cloud instance +PcloudSppplacementgroupsGetall gets the list of shared processor pool placement groups for a cloud instance */ func (a *Client) PcloudSppplacementgroupsGetall(params *PcloudSppplacementgroupsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsGetallOK, error) { // TODO: Validate the params before sending @@ -163,7 +163,7 @@ func (a *Client) PcloudSppplacementgroupsGetall(params *PcloudSppplacementgroups } /* - PcloudSppplacementgroupsMembersDelete deletes shared processor pool member from a shared processor pool placement group +PcloudSppplacementgroupsMembersDelete deletes shared processor pool member from a shared processor pool placement group */ func (a *Client) PcloudSppplacementgroupsMembersDelete(params *PcloudSppplacementgroupsMembersDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsMembersDeleteOK, error) { // TODO: Validate the params before sending @@ -202,7 +202,7 @@ func (a *Client) PcloudSppplacementgroupsMembersDelete(params *PcloudSppplacemen } /* - PcloudSppplacementgroupsMembersPost adds shared processor pool as a member of a shared processor pool placement group +PcloudSppplacementgroupsMembersPost adds shared processor pool as a member of a shared processor pool placement group */ func (a *Client) PcloudSppplacementgroupsMembersPost(params *PcloudSppplacementgroupsMembersPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsMembersPostOK, error) { // TODO: Validate the params before sending @@ -241,7 +241,7 @@ func (a *Client) PcloudSppplacementgroupsMembersPost(params *PcloudSppplacementg } /* - PcloudSppplacementgroupsPost creates a new shared processor pool placement group +PcloudSppplacementgroupsPost creates a new shared processor pool placement group */ func (a *Client) PcloudSppplacementgroupsPost(params *PcloudSppplacementgroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSppplacementgroupsPostOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_parameters.go index 8c52195d789..5854efdd4e7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSppplacementgroupsDeleteParamsWithHTTPClient(client *http.Client) } } -/* PcloudSppplacementgroupsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud sppplacementgroups delete operation. +/* +PcloudSppplacementgroupsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sppplacementgroups delete operation. + + Typically these are written to a http.Request. */ type PcloudSppplacementgroupsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go index abcd38a53ab..107bbf09ca2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go @@ -66,7 +66,7 @@ func (o *PcloudSppplacementgroupsDeleteReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}] pcloud.sppplacementgroups.delete", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudSppplacementgroupsDeleteOK() *PcloudSppplacementgroupsDeleteOK { return &PcloudSppplacementgroupsDeleteOK{} } -/* PcloudSppplacementgroupsDeleteOK describes a response with status code 200, with default header values. +/* +PcloudSppplacementgroupsDeleteOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudSppplacementgroupsDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud sppplacementgroups delete o k response has a 2xx status code +func (o *PcloudSppplacementgroupsDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sppplacementgroups delete o k response has a 3xx status code +func (o *PcloudSppplacementgroupsDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups delete o k response has a 4xx status code +func (o *PcloudSppplacementgroupsDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups delete o k response has a 5xx status code +func (o *PcloudSppplacementgroupsDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups delete o k response a status code equal to that given +func (o *PcloudSppplacementgroupsDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sppplacementgroups delete o k response +func (o *PcloudSppplacementgroupsDeleteOK) Code() int { + return 200 +} + func (o *PcloudSppplacementgroupsDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudSppplacementgroupsDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudSppplacementgroupsDeleteOK) GetPayload() models.Object { return o.Payload } @@ -105,7 +141,8 @@ func NewPcloudSppplacementgroupsDeleteBadRequest() *PcloudSppplacementgroupsDele return &PcloudSppplacementgroupsDeleteBadRequest{} } -/* PcloudSppplacementgroupsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudSppplacementgroupsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -113,9 +150,44 @@ type PcloudSppplacementgroupsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups delete bad request response has a 2xx status code +func (o *PcloudSppplacementgroupsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups delete bad request response has a 3xx status code +func (o *PcloudSppplacementgroupsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups delete bad request response has a 4xx status code +func (o *PcloudSppplacementgroupsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups delete bad request response has a 5xx status code +func (o *PcloudSppplacementgroupsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups delete bad request response a status code equal to that given +func (o *PcloudSppplacementgroupsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sppplacementgroups delete bad request response +func (o *PcloudSppplacementgroupsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudSppplacementgroupsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSppplacementgroupsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSppplacementgroupsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -137,7 +209,8 @@ func NewPcloudSppplacementgroupsDeleteUnauthorized() *PcloudSppplacementgroupsDe return &PcloudSppplacementgroupsDeleteUnauthorized{} } -/* PcloudSppplacementgroupsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSppplacementgroupsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -145,9 +218,44 @@ type PcloudSppplacementgroupsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups delete unauthorized response has a 2xx status code +func (o *PcloudSppplacementgroupsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups delete unauthorized response has a 3xx status code +func (o *PcloudSppplacementgroupsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups delete unauthorized response has a 4xx status code +func (o *PcloudSppplacementgroupsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups delete unauthorized response has a 5xx status code +func (o *PcloudSppplacementgroupsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups delete unauthorized response a status code equal to that given +func (o *PcloudSppplacementgroupsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sppplacementgroups delete unauthorized response +func (o *PcloudSppplacementgroupsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudSppplacementgroupsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSppplacementgroupsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSppplacementgroupsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -169,7 +277,8 @@ func NewPcloudSppplacementgroupsDeleteForbidden() *PcloudSppplacementgroupsDelet return &PcloudSppplacementgroupsDeleteForbidden{} } -/* PcloudSppplacementgroupsDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudSppplacementgroupsDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -177,9 +286,44 @@ type PcloudSppplacementgroupsDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups delete forbidden response has a 2xx status code +func (o *PcloudSppplacementgroupsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups delete forbidden response has a 3xx status code +func (o *PcloudSppplacementgroupsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups delete forbidden response has a 4xx status code +func (o *PcloudSppplacementgroupsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups delete forbidden response has a 5xx status code +func (o *PcloudSppplacementgroupsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups delete forbidden response a status code equal to that given +func (o *PcloudSppplacementgroupsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sppplacementgroups delete forbidden response +func (o *PcloudSppplacementgroupsDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudSppplacementgroupsDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudSppplacementgroupsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudSppplacementgroupsDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -201,7 +345,8 @@ func NewPcloudSppplacementgroupsDeleteNotFound() *PcloudSppplacementgroupsDelete return &PcloudSppplacementgroupsDeleteNotFound{} } -/* PcloudSppplacementgroupsDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudSppplacementgroupsDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -209,9 +354,44 @@ type PcloudSppplacementgroupsDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups delete not found response has a 2xx status code +func (o *PcloudSppplacementgroupsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups delete not found response has a 3xx status code +func (o *PcloudSppplacementgroupsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups delete not found response has a 4xx status code +func (o *PcloudSppplacementgroupsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups delete not found response has a 5xx status code +func (o *PcloudSppplacementgroupsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups delete not found response a status code equal to that given +func (o *PcloudSppplacementgroupsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sppplacementgroups delete not found response +func (o *PcloudSppplacementgroupsDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudSppplacementgroupsDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudSppplacementgroupsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudSppplacementgroupsDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -233,7 +413,8 @@ func NewPcloudSppplacementgroupsDeleteConflict() *PcloudSppplacementgroupsDelete return &PcloudSppplacementgroupsDeleteConflict{} } -/* PcloudSppplacementgroupsDeleteConflict describes a response with status code 409, with default header values. +/* +PcloudSppplacementgroupsDeleteConflict describes a response with status code 409, with default header values. Conflict */ @@ -241,9 +422,44 @@ type PcloudSppplacementgroupsDeleteConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups delete conflict response has a 2xx status code +func (o *PcloudSppplacementgroupsDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups delete conflict response has a 3xx status code +func (o *PcloudSppplacementgroupsDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups delete conflict response has a 4xx status code +func (o *PcloudSppplacementgroupsDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups delete conflict response has a 5xx status code +func (o *PcloudSppplacementgroupsDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups delete conflict response a status code equal to that given +func (o *PcloudSppplacementgroupsDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud sppplacementgroups delete conflict response +func (o *PcloudSppplacementgroupsDeleteConflict) Code() int { + return 409 +} + func (o *PcloudSppplacementgroupsDeleteConflict) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteConflict %+v", 409, o.Payload) } + +func (o *PcloudSppplacementgroupsDeleteConflict) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteConflict %+v", 409, o.Payload) +} + func (o *PcloudSppplacementgroupsDeleteConflict) GetPayload() *models.Error { return o.Payload } @@ -265,7 +481,8 @@ func NewPcloudSppplacementgroupsDeleteInternalServerError() *PcloudSppplacementg return &PcloudSppplacementgroupsDeleteInternalServerError{} } -/* PcloudSppplacementgroupsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSppplacementgroupsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -273,9 +490,44 @@ type PcloudSppplacementgroupsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups delete internal server error response has a 2xx status code +func (o *PcloudSppplacementgroupsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups delete internal server error response has a 3xx status code +func (o *PcloudSppplacementgroupsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups delete internal server error response has a 4xx status code +func (o *PcloudSppplacementgroupsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups delete internal server error response has a 5xx status code +func (o *PcloudSppplacementgroupsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sppplacementgroups delete internal server error response a status code equal to that given +func (o *PcloudSppplacementgroupsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sppplacementgroups delete internal server error response +func (o *PcloudSppplacementgroupsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudSppplacementgroupsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSppplacementgroupsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSppplacementgroupsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_parameters.go index dcaeb4c1da9..01e7b181fe1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSppplacementgroupsGetParamsWithHTTPClient(client *http.Client) *Pc } } -/* PcloudSppplacementgroupsGetParams contains all the parameters to send to the API endpoint - for the pcloud sppplacementgroups get operation. +/* +PcloudSppplacementgroupsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sppplacementgroups get operation. + + Typically these are written to a http.Request. */ type PcloudSppplacementgroupsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go index e6aed10b477..07a983d3ca4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudSppplacementgroupsGetReader) ReadResponse(response runtime.Client } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}] pcloud.sppplacementgroups.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudSppplacementgroupsGetOK() *PcloudSppplacementgroupsGetOK { return &PcloudSppplacementgroupsGetOK{} } -/* PcloudSppplacementgroupsGetOK describes a response with status code 200, with default header values. +/* +PcloudSppplacementgroupsGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudSppplacementgroupsGetOK struct { Payload *models.SPPPlacementGroup } +// IsSuccess returns true when this pcloud sppplacementgroups get o k response has a 2xx status code +func (o *PcloudSppplacementgroupsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sppplacementgroups get o k response has a 3xx status code +func (o *PcloudSppplacementgroupsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups get o k response has a 4xx status code +func (o *PcloudSppplacementgroupsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups get o k response has a 5xx status code +func (o *PcloudSppplacementgroupsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups get o k response a status code equal to that given +func (o *PcloudSppplacementgroupsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sppplacementgroups get o k response +func (o *PcloudSppplacementgroupsGetOK) Code() int { + return 200 +} + func (o *PcloudSppplacementgroupsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetOK %+v", 200, o.Payload) } + +func (o *PcloudSppplacementgroupsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetOK %+v", 200, o.Payload) +} + func (o *PcloudSppplacementgroupsGetOK) GetPayload() *models.SPPPlacementGroup { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudSppplacementgroupsGetBadRequest() *PcloudSppplacementgroupsGetBadR return &PcloudSppplacementgroupsGetBadRequest{} } -/* PcloudSppplacementgroupsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudSppplacementgroupsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudSppplacementgroupsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups get bad request response has a 2xx status code +func (o *PcloudSppplacementgroupsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups get bad request response has a 3xx status code +func (o *PcloudSppplacementgroupsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups get bad request response has a 4xx status code +func (o *PcloudSppplacementgroupsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups get bad request response has a 5xx status code +func (o *PcloudSppplacementgroupsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups get bad request response a status code equal to that given +func (o *PcloudSppplacementgroupsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sppplacementgroups get bad request response +func (o *PcloudSppplacementgroupsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudSppplacementgroupsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSppplacementgroupsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSppplacementgroupsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudSppplacementgroupsGetUnauthorized() *PcloudSppplacementgroupsGetUn return &PcloudSppplacementgroupsGetUnauthorized{} } -/* PcloudSppplacementgroupsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSppplacementgroupsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudSppplacementgroupsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups get unauthorized response has a 2xx status code +func (o *PcloudSppplacementgroupsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups get unauthorized response has a 3xx status code +func (o *PcloudSppplacementgroupsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups get unauthorized response has a 4xx status code +func (o *PcloudSppplacementgroupsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups get unauthorized response has a 5xx status code +func (o *PcloudSppplacementgroupsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups get unauthorized response a status code equal to that given +func (o *PcloudSppplacementgroupsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sppplacementgroups get unauthorized response +func (o *PcloudSppplacementgroupsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudSppplacementgroupsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSppplacementgroupsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSppplacementgroupsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ 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{} } -/* PcloudSppplacementgroupsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudSppplacementgroupsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudSppplacementgroupsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups get not found response has a 2xx status code +func (o *PcloudSppplacementgroupsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups get not found response has a 3xx status code +func (o *PcloudSppplacementgroupsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups get not found response has a 4xx status code +func (o *PcloudSppplacementgroupsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups get not found response has a 5xx status code +func (o *PcloudSppplacementgroupsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups get not found response a status code equal to that given +func (o *PcloudSppplacementgroupsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sppplacementgroups get not found response +func (o *PcloudSppplacementgroupsGetNotFound) Code() int { + return 404 +} + func (o *PcloudSppplacementgroupsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudSppplacementgroupsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudSppplacementgroupsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudSppplacementgroupsGetInternalServerError() *PcloudSppplacementgrou return &PcloudSppplacementgroupsGetInternalServerError{} } -/* PcloudSppplacementgroupsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSppplacementgroupsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudSppplacementgroupsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups get internal server error response has a 2xx status code +func (o *PcloudSppplacementgroupsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups get internal server error response has a 3xx status code +func (o *PcloudSppplacementgroupsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups get internal server error response has a 4xx status code +func (o *PcloudSppplacementgroupsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups get internal server error response has a 5xx status code +func (o *PcloudSppplacementgroupsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sppplacementgroups get internal server error response a status code equal to that given +func (o *PcloudSppplacementgroupsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sppplacementgroups get internal server error response +func (o *PcloudSppplacementgroupsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudSppplacementgroupsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSppplacementgroupsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}][%d] pcloudSppplacementgroupsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSppplacementgroupsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_parameters.go index 002a26d15ed..7a88075dc3c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSppplacementgroupsGetallParamsWithHTTPClient(client *http.Client) } } -/* PcloudSppplacementgroupsGetallParams contains all the parameters to send to the API endpoint - for the pcloud sppplacementgroups getall operation. +/* +PcloudSppplacementgroupsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sppplacementgroups getall operation. + + Typically these are written to a http.Request. */ type PcloudSppplacementgroupsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go index c8981685a98..5c8c36c6f56 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go @@ -60,7 +60,7 @@ func (o *PcloudSppplacementgroupsGetallReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups] pcloud.sppplacementgroups.getall", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudSppplacementgroupsGetallOK() *PcloudSppplacementgroupsGetallOK { return &PcloudSppplacementgroupsGetallOK{} } -/* PcloudSppplacementgroupsGetallOK describes a response with status code 200, with default header values. +/* +PcloudSppplacementgroupsGetallOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudSppplacementgroupsGetallOK struct { Payload *models.SPPPlacementGroups } +// IsSuccess returns true when this pcloud sppplacementgroups getall o k response has a 2xx status code +func (o *PcloudSppplacementgroupsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sppplacementgroups getall o k response has a 3xx status code +func (o *PcloudSppplacementgroupsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups getall o k response has a 4xx status code +func (o *PcloudSppplacementgroupsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups getall o k response has a 5xx status code +func (o *PcloudSppplacementgroupsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups getall o k response a status code equal to that given +func (o *PcloudSppplacementgroupsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sppplacementgroups getall o k response +func (o *PcloudSppplacementgroupsGetallOK) Code() int { + return 200 +} + func (o *PcloudSppplacementgroupsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudSppplacementgroupsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudSppplacementgroupsGetallOK) GetPayload() *models.SPPPlacementGroups { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudSppplacementgroupsGetallBadRequest() *PcloudSppplacementgroupsGeta return &PcloudSppplacementgroupsGetallBadRequest{} } -/* PcloudSppplacementgroupsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudSppplacementgroupsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudSppplacementgroupsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups getall bad request response has a 2xx status code +func (o *PcloudSppplacementgroupsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups getall bad request response has a 3xx status code +func (o *PcloudSppplacementgroupsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups getall bad request response has a 4xx status code +func (o *PcloudSppplacementgroupsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups getall bad request response has a 5xx status code +func (o *PcloudSppplacementgroupsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups getall bad request response a status code equal to that given +func (o *PcloudSppplacementgroupsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sppplacementgroups getall bad request response +func (o *PcloudSppplacementgroupsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudSppplacementgroupsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSppplacementgroupsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSppplacementgroupsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudSppplacementgroupsGetallUnauthorized() *PcloudSppplacementgroupsGe return &PcloudSppplacementgroupsGetallUnauthorized{} } -/* PcloudSppplacementgroupsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSppplacementgroupsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudSppplacementgroupsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups getall unauthorized response has a 2xx status code +func (o *PcloudSppplacementgroupsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups getall unauthorized response has a 3xx status code +func (o *PcloudSppplacementgroupsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups getall unauthorized response has a 4xx status code +func (o *PcloudSppplacementgroupsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups getall unauthorized response has a 5xx status code +func (o *PcloudSppplacementgroupsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups getall unauthorized response a status code equal to that given +func (o *PcloudSppplacementgroupsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sppplacementgroups getall unauthorized response +func (o *PcloudSppplacementgroupsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudSppplacementgroupsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSppplacementgroupsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSppplacementgroupsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudSppplacementgroupsGetallForbidden() *PcloudSppplacementgroupsGetal return &PcloudSppplacementgroupsGetallForbidden{} } -/* PcloudSppplacementgroupsGetallForbidden describes a response with status code 403, with default header values. +/* +PcloudSppplacementgroupsGetallForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudSppplacementgroupsGetallForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups getall forbidden response has a 2xx status code +func (o *PcloudSppplacementgroupsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups getall forbidden response has a 3xx status code +func (o *PcloudSppplacementgroupsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups getall forbidden response has a 4xx status code +func (o *PcloudSppplacementgroupsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups getall forbidden response has a 5xx status code +func (o *PcloudSppplacementgroupsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups getall forbidden response a status code equal to that given +func (o *PcloudSppplacementgroupsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sppplacementgroups getall forbidden response +func (o *PcloudSppplacementgroupsGetallForbidden) Code() int { + return 403 +} + func (o *PcloudSppplacementgroupsGetallForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallForbidden %+v", 403, o.Payload) } + +func (o *PcloudSppplacementgroupsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallForbidden %+v", 403, o.Payload) +} + func (o *PcloudSppplacementgroupsGetallForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudSppplacementgroupsGetallNotFound() *PcloudSppplacementgroupsGetall return &PcloudSppplacementgroupsGetallNotFound{} } -/* PcloudSppplacementgroupsGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudSppplacementgroupsGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudSppplacementgroupsGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups getall not found response has a 2xx status code +func (o *PcloudSppplacementgroupsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups getall not found response has a 3xx status code +func (o *PcloudSppplacementgroupsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups getall not found response has a 4xx status code +func (o *PcloudSppplacementgroupsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups getall not found response has a 5xx status code +func (o *PcloudSppplacementgroupsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups getall not found response a status code equal to that given +func (o *PcloudSppplacementgroupsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sppplacementgroups getall not found response +func (o *PcloudSppplacementgroupsGetallNotFound) Code() int { + return 404 +} + func (o *PcloudSppplacementgroupsGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudSppplacementgroupsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudSppplacementgroupsGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudSppplacementgroupsGetallInternalServerError() *PcloudSppplacementg return &PcloudSppplacementgroupsGetallInternalServerError{} } -/* PcloudSppplacementgroupsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSppplacementgroupsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudSppplacementgroupsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups getall internal server error response has a 2xx status code +func (o *PcloudSppplacementgroupsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups getall internal server error response has a 3xx status code +func (o *PcloudSppplacementgroupsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups getall internal server error response has a 4xx status code +func (o *PcloudSppplacementgroupsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups getall internal server error response has a 5xx status code +func (o *PcloudSppplacementgroupsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sppplacementgroups getall internal server error response a status code equal to that given +func (o *PcloudSppplacementgroupsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sppplacementgroups getall internal server error response +func (o *PcloudSppplacementgroupsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudSppplacementgroupsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSppplacementgroupsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSppplacementgroupsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_parameters.go index bc898f3bcb3..f6eda86ec9d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSppplacementgroupsMembersDeleteParamsWithHTTPClient(client *http.C } } -/* PcloudSppplacementgroupsMembersDeleteParams contains all the parameters to send to the API endpoint - for the pcloud sppplacementgroups members delete operation. +/* +PcloudSppplacementgroupsMembersDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sppplacementgroups members delete operation. + + Typically these are written to a http.Request. */ type PcloudSppplacementgroupsMembersDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go index 1eb9bc526f4..6e06c8b79e9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go @@ -66,7 +66,7 @@ func (o *PcloudSppplacementgroupsMembersDeleteReader) ReadResponse(response runt } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}] pcloud.sppplacementgroups.members.delete", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudSppplacementgroupsMembersDeleteOK() *PcloudSppplacementgroupsMembe return &PcloudSppplacementgroupsMembersDeleteOK{} } -/* PcloudSppplacementgroupsMembersDeleteOK describes a response with status code 200, with default header values. +/* +PcloudSppplacementgroupsMembersDeleteOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudSppplacementgroupsMembersDeleteOK struct { Payload *models.SPPPlacementGroup } +// IsSuccess returns true when this pcloud sppplacementgroups members delete o k response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sppplacementgroups members delete o k response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members delete o k response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups members delete o k response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members delete o k response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sppplacementgroups members delete o k response +func (o *PcloudSppplacementgroupsMembersDeleteOK) Code() int { + return 200 +} + func (o *PcloudSppplacementgroupsMembersDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersDeleteOK) GetPayload() *models.SPPPlacementGroup { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudSppplacementgroupsMembersDeleteBadRequest() *PcloudSppplacementgro return &PcloudSppplacementgroupsMembersDeleteBadRequest{} } -/* PcloudSppplacementgroupsMembersDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudSppplacementgroupsMembersDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudSppplacementgroupsMembersDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members delete bad request response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members delete bad request response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members delete bad request response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members delete bad request response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members delete bad request response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sppplacementgroups members delete bad request response +func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudSppplacementgroupsMembersDeleteUnauthorized() *PcloudSppplacementg return &PcloudSppplacementgroupsMembersDeleteUnauthorized{} } -/* PcloudSppplacementgroupsMembersDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSppplacementgroupsMembersDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudSppplacementgroupsMembersDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members delete unauthorized response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members delete unauthorized response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members delete unauthorized response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members delete unauthorized response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members delete unauthorized response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sppplacementgroups members delete unauthorized response +func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudSppplacementgroupsMembersDeleteForbidden() *PcloudSppplacementgrou return &PcloudSppplacementgroupsMembersDeleteForbidden{} } -/* PcloudSppplacementgroupsMembersDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudSppplacementgroupsMembersDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudSppplacementgroupsMembersDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members delete forbidden response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members delete forbidden response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members delete forbidden response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members delete forbidden response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members delete forbidden response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sppplacementgroups members delete forbidden response +func (o *PcloudSppplacementgroupsMembersDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudSppplacementgroupsMembersDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudSppplacementgroupsMembersDeleteNotFound() *PcloudSppplacementgroup return &PcloudSppplacementgroupsMembersDeleteNotFound{} } -/* PcloudSppplacementgroupsMembersDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudSppplacementgroupsMembersDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -211,9 +356,44 @@ type PcloudSppplacementgroupsMembersDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members delete not found response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members delete not found response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members delete not found response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members delete not found response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members delete not found response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sppplacementgroups members delete not found response +func (o *PcloudSppplacementgroupsMembersDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudSppplacementgroupsMembersDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudSppplacementgroupsMembersDeleteConflict() *PcloudSppplacementgroup return &PcloudSppplacementgroupsMembersDeleteConflict{} } -/* PcloudSppplacementgroupsMembersDeleteConflict describes a response with status code 409, with default header values. +/* +PcloudSppplacementgroupsMembersDeleteConflict describes a response with status code 409, with default header values. Conflict */ @@ -243,9 +424,44 @@ type PcloudSppplacementgroupsMembersDeleteConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members delete conflict response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members delete conflict response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members delete conflict response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members delete conflict response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members delete conflict response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud sppplacementgroups members delete conflict response +func (o *PcloudSppplacementgroupsMembersDeleteConflict) Code() int { + return 409 +} + func (o *PcloudSppplacementgroupsMembersDeleteConflict) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteConflict %+v", 409, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersDeleteConflict) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteConflict %+v", 409, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersDeleteConflict) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudSppplacementgroupsMembersDeleteInternalServerError() *PcloudSpppla return &PcloudSppplacementgroupsMembersDeleteInternalServerError{} } -/* PcloudSppplacementgroupsMembersDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSppplacementgroupsMembersDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudSppplacementgroupsMembersDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members delete internal server error response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members delete internal server error response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members delete internal server error response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups members delete internal server error response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sppplacementgroups members delete internal server error response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sppplacementgroups members delete internal server error response +func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_parameters.go index 1a3362f9256..8db44d08c61 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSppplacementgroupsMembersPostParamsWithHTTPClient(client *http.Cli } } -/* PcloudSppplacementgroupsMembersPostParams contains all the parameters to send to the API endpoint - for the pcloud sppplacementgroups members post operation. +/* +PcloudSppplacementgroupsMembersPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sppplacementgroups members post operation. + + Typically these are written to a http.Request. */ type PcloudSppplacementgroupsMembersPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go index ae3c476e39e..b9b3f437e55 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go @@ -72,7 +72,7 @@ func (o *PcloudSppplacementgroupsMembersPostReader) ReadResponse(response runtim } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}] pcloud.sppplacementgroups.members.post", response, response.Code()) } } @@ -81,7 +81,8 @@ func NewPcloudSppplacementgroupsMembersPostOK() *PcloudSppplacementgroupsMembers return &PcloudSppplacementgroupsMembersPostOK{} } -/* PcloudSppplacementgroupsMembersPostOK describes a response with status code 200, with default header values. +/* +PcloudSppplacementgroupsMembersPostOK describes a response with status code 200, with default header values. OK */ @@ -89,9 +90,44 @@ type PcloudSppplacementgroupsMembersPostOK struct { Payload *models.SPPPlacementGroup } +// IsSuccess returns true when this pcloud sppplacementgroups members post o k response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sppplacementgroups members post o k response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members post o k response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups members post o k response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members post o k response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sppplacementgroups members post o k response +func (o *PcloudSppplacementgroupsMembersPostOK) Code() int { + return 200 +} + func (o *PcloudSppplacementgroupsMembersPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostOK %+v", 200, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostOK %+v", 200, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersPostOK) GetPayload() *models.SPPPlacementGroup { return o.Payload } @@ -113,7 +149,8 @@ func NewPcloudSppplacementgroupsMembersPostBadRequest() *PcloudSppplacementgroup return &PcloudSppplacementgroupsMembersPostBadRequest{} } -/* PcloudSppplacementgroupsMembersPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudSppplacementgroupsMembersPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -121,9 +158,44 @@ type PcloudSppplacementgroupsMembersPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members post bad request response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members post bad request response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members post bad request response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members post bad request response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members post bad request response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sppplacementgroups members post bad request response +func (o *PcloudSppplacementgroupsMembersPostBadRequest) Code() int { + return 400 +} + func (o *PcloudSppplacementgroupsMembersPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -145,7 +217,8 @@ func NewPcloudSppplacementgroupsMembersPostUnauthorized() *PcloudSppplacementgro return &PcloudSppplacementgroupsMembersPostUnauthorized{} } -/* PcloudSppplacementgroupsMembersPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSppplacementgroupsMembersPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -153,9 +226,44 @@ type PcloudSppplacementgroupsMembersPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members post unauthorized response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members post unauthorized response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members post unauthorized response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members post unauthorized response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members post unauthorized response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sppplacementgroups members post unauthorized response +func (o *PcloudSppplacementgroupsMembersPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudSppplacementgroupsMembersPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -177,7 +285,8 @@ func NewPcloudSppplacementgroupsMembersPostForbidden() *PcloudSppplacementgroups return &PcloudSppplacementgroupsMembersPostForbidden{} } -/* PcloudSppplacementgroupsMembersPostForbidden describes a response with status code 403, with default header values. +/* +PcloudSppplacementgroupsMembersPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -185,9 +294,44 @@ type PcloudSppplacementgroupsMembersPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members post forbidden response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members post forbidden response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members post forbidden response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members post forbidden response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members post forbidden response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sppplacementgroups members post forbidden response +func (o *PcloudSppplacementgroupsMembersPostForbidden) Code() int { + return 403 +} + func (o *PcloudSppplacementgroupsMembersPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -209,7 +353,8 @@ func NewPcloudSppplacementgroupsMembersPostNotFound() *PcloudSppplacementgroupsM return &PcloudSppplacementgroupsMembersPostNotFound{} } -/* PcloudSppplacementgroupsMembersPostNotFound describes a response with status code 404, with default header values. +/* +PcloudSppplacementgroupsMembersPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -217,9 +362,44 @@ type PcloudSppplacementgroupsMembersPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members post not found response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members post not found response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members post not found response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members post not found response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members post not found response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sppplacementgroups members post not found response +func (o *PcloudSppplacementgroupsMembersPostNotFound) Code() int { + return 404 +} + func (o *PcloudSppplacementgroupsMembersPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -241,7 +421,8 @@ func NewPcloudSppplacementgroupsMembersPostConflict() *PcloudSppplacementgroupsM return &PcloudSppplacementgroupsMembersPostConflict{} } -/* PcloudSppplacementgroupsMembersPostConflict describes a response with status code 409, with default header values. +/* +PcloudSppplacementgroupsMembersPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -249,9 +430,44 @@ type PcloudSppplacementgroupsMembersPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members post conflict response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members post conflict response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members post conflict response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members post conflict response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members post conflict response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud sppplacementgroups members post conflict response +func (o *PcloudSppplacementgroupsMembersPostConflict) Code() int { + return 409 +} + func (o *PcloudSppplacementgroupsMembersPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostConflict %+v", 409, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostConflict %+v", 409, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersPostConflict) GetPayload() *models.Error { return o.Payload } @@ -273,7 +489,8 @@ func NewPcloudSppplacementgroupsMembersPostUnprocessableEntity() *PcloudSppplace return &PcloudSppplacementgroupsMembersPostUnprocessableEntity{} } -/* PcloudSppplacementgroupsMembersPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudSppplacementgroupsMembersPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -281,9 +498,44 @@ type PcloudSppplacementgroupsMembersPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members post unprocessable entity response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members post unprocessable entity response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members post unprocessable entity response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups members post unprocessable entity response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups members post unprocessable entity response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud sppplacementgroups members post unprocessable entity response +func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -305,7 +557,8 @@ func NewPcloudSppplacementgroupsMembersPostInternalServerError() *PcloudSppplace return &PcloudSppplacementgroupsMembersPostInternalServerError{} } -/* PcloudSppplacementgroupsMembersPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSppplacementgroupsMembersPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -313,9 +566,44 @@ type PcloudSppplacementgroupsMembersPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups members post internal server error response has a 2xx status code +func (o *PcloudSppplacementgroupsMembersPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups members post internal server error response has a 3xx status code +func (o *PcloudSppplacementgroupsMembersPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups members post internal server error response has a 4xx status code +func (o *PcloudSppplacementgroupsMembersPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups members post internal server error response has a 5xx status code +func (o *PcloudSppplacementgroupsMembersPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sppplacementgroups members post internal server error response a status code equal to that given +func (o *PcloudSppplacementgroupsMembersPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sppplacementgroups members post internal server error response +func (o *PcloudSppplacementgroupsMembersPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudSppplacementgroupsMembersPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSppplacementgroupsMembersPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSppplacementgroupsMembersPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_parameters.go index 7246e4c4d13..614dec0a2b7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudSppplacementgroupsPostParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudSppplacementgroupsPostParams contains all the parameters to send to the API endpoint - for the pcloud sppplacementgroups post operation. +/* +PcloudSppplacementgroupsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sppplacementgroups post operation. + + Typically these are written to a http.Request. */ type PcloudSppplacementgroupsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go index 0f89dedf681..d11ee16e51d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudSppplacementgroupsPostReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups] pcloud.sppplacementgroups.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudSppplacementgroupsPostOK() *PcloudSppplacementgroupsPostOK { return &PcloudSppplacementgroupsPostOK{} } -/* PcloudSppplacementgroupsPostOK describes a response with status code 200, with default header values. +/* +PcloudSppplacementgroupsPostOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +90,44 @@ type PcloudSppplacementgroupsPostOK struct { Payload *models.SPPPlacementGroup } +// IsSuccess returns true when this pcloud sppplacementgroups post o k response has a 2xx status code +func (o *PcloudSppplacementgroupsPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sppplacementgroups post o k response has a 3xx status code +func (o *PcloudSppplacementgroupsPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups post o k response has a 4xx status code +func (o *PcloudSppplacementgroupsPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups post o k response has a 5xx status code +func (o *PcloudSppplacementgroupsPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups post o k response a status code equal to that given +func (o *PcloudSppplacementgroupsPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sppplacementgroups post o k response +func (o *PcloudSppplacementgroupsPostOK) Code() int { + return 200 +} + func (o *PcloudSppplacementgroupsPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostOK %+v", 200, o.Payload) } + +func (o *PcloudSppplacementgroupsPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostOK %+v", 200, o.Payload) +} + func (o *PcloudSppplacementgroupsPostOK) GetPayload() *models.SPPPlacementGroup { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudSppplacementgroupsPostBadRequest() *PcloudSppplacementgroupsPostBa return &PcloudSppplacementgroupsPostBadRequest{} } -/* PcloudSppplacementgroupsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudSppplacementgroupsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudSppplacementgroupsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups post bad request response has a 2xx status code +func (o *PcloudSppplacementgroupsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups post bad request response has a 3xx status code +func (o *PcloudSppplacementgroupsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups post bad request response has a 4xx status code +func (o *PcloudSppplacementgroupsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups post bad request response has a 5xx status code +func (o *PcloudSppplacementgroupsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups post bad request response a status code equal to that given +func (o *PcloudSppplacementgroupsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sppplacementgroups post bad request response +func (o *PcloudSppplacementgroupsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudSppplacementgroupsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSppplacementgroupsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSppplacementgroupsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudSppplacementgroupsPostUnauthorized() *PcloudSppplacementgroupsPost return &PcloudSppplacementgroupsPostUnauthorized{} } -/* PcloudSppplacementgroupsPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSppplacementgroupsPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudSppplacementgroupsPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups post unauthorized response has a 2xx status code +func (o *PcloudSppplacementgroupsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups post unauthorized response has a 3xx status code +func (o *PcloudSppplacementgroupsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups post unauthorized response has a 4xx status code +func (o *PcloudSppplacementgroupsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups post unauthorized response has a 5xx status code +func (o *PcloudSppplacementgroupsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups post unauthorized response a status code equal to that given +func (o *PcloudSppplacementgroupsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sppplacementgroups post unauthorized response +func (o *PcloudSppplacementgroupsPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudSppplacementgroupsPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSppplacementgroupsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSppplacementgroupsPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +285,8 @@ func NewPcloudSppplacementgroupsPostForbidden() *PcloudSppplacementgroupsPostFor return &PcloudSppplacementgroupsPostForbidden{} } -/* PcloudSppplacementgroupsPostForbidden describes a response with status code 403, with default header values. +/* +PcloudSppplacementgroupsPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +294,44 @@ type PcloudSppplacementgroupsPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups post forbidden response has a 2xx status code +func (o *PcloudSppplacementgroupsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups post forbidden response has a 3xx status code +func (o *PcloudSppplacementgroupsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups post forbidden response has a 4xx status code +func (o *PcloudSppplacementgroupsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups post forbidden response has a 5xx status code +func (o *PcloudSppplacementgroupsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups post forbidden response a status code equal to that given +func (o *PcloudSppplacementgroupsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sppplacementgroups post forbidden response +func (o *PcloudSppplacementgroupsPostForbidden) Code() int { + return 403 +} + func (o *PcloudSppplacementgroupsPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudSppplacementgroupsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudSppplacementgroupsPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -198,12 +348,81 @@ 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{} } -/* PcloudSppplacementgroupsPostConflict describes a response with status code 409, with default header values. +/* +PcloudSppplacementgroupsPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +430,44 @@ type PcloudSppplacementgroupsPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups post conflict response has a 2xx status code +func (o *PcloudSppplacementgroupsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups post conflict response has a 3xx status code +func (o *PcloudSppplacementgroupsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups post conflict response has a 4xx status code +func (o *PcloudSppplacementgroupsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups post conflict response has a 5xx status code +func (o *PcloudSppplacementgroupsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups post conflict response a status code equal to that given +func (o *PcloudSppplacementgroupsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud sppplacementgroups post conflict response +func (o *PcloudSppplacementgroupsPostConflict) Code() int { + return 409 +} + func (o *PcloudSppplacementgroupsPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostConflict %+v", 409, o.Payload) } + +func (o *PcloudSppplacementgroupsPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostConflict %+v", 409, o.Payload) +} + func (o *PcloudSppplacementgroupsPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudSppplacementgroupsPostUnprocessableEntity() *PcloudSppplacementgro return &PcloudSppplacementgroupsPostUnprocessableEntity{} } -/* PcloudSppplacementgroupsPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudSppplacementgroupsPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudSppplacementgroupsPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups post unprocessable entity response has a 2xx status code +func (o *PcloudSppplacementgroupsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups post unprocessable entity response has a 3xx status code +func (o *PcloudSppplacementgroupsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups post unprocessable entity response has a 4xx status code +func (o *PcloudSppplacementgroupsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sppplacementgroups post unprocessable entity response has a 5xx status code +func (o *PcloudSppplacementgroupsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sppplacementgroups post unprocessable entity response a status code equal to that given +func (o *PcloudSppplacementgroupsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud sppplacementgroups post unprocessable entity response +func (o *PcloudSppplacementgroupsPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudSppplacementgroupsPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudSppplacementgroupsPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudSppplacementgroupsPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudSppplacementgroupsPostInternalServerError() *PcloudSppplacementgro return &PcloudSppplacementgroupsPostInternalServerError{} } -/* PcloudSppplacementgroupsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSppplacementgroupsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudSppplacementgroupsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sppplacementgroups post internal server error response has a 2xx status code +func (o *PcloudSppplacementgroupsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sppplacementgroups post internal server error response has a 3xx status code +func (o *PcloudSppplacementgroupsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sppplacementgroups post internal server error response has a 4xx status code +func (o *PcloudSppplacementgroupsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sppplacementgroups post internal server error response has a 5xx status code +func (o *PcloudSppplacementgroupsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sppplacementgroups post internal server error response a status code equal to that given +func (o *PcloudSppplacementgroupsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sppplacementgroups post internal server error response +func (o *PcloudSppplacementgroupsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudSppplacementgroupsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSppplacementgroupsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups][%d] pcloudSppplacementgroupsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSppplacementgroupsPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go index ddf143b6cfb..4c13670fc43 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go @@ -42,7 +42,7 @@ type ClientService interface { } /* - PcloudDhcpDelete deletes d h c p server open shift internal use only +PcloudDhcpDelete deletes d h c p server open shift internal use only */ func (a *Client) PcloudDhcpDelete(params *PcloudDhcpDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudDhcpDeleteAccepted, error) { // TODO: Validate the params before sending @@ -81,7 +81,7 @@ func (a *Client) PcloudDhcpDelete(params *PcloudDhcpDeleteParams, authInfo runti } /* - PcloudDhcpGet gets d h c p server information open shift internal use only +PcloudDhcpGet gets d h c p server information open shift internal use only */ func (a *Client) PcloudDhcpGet(params *PcloudDhcpGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudDhcpGetOK, error) { // TODO: Validate the params before sending @@ -120,7 +120,7 @@ func (a *Client) PcloudDhcpGet(params *PcloudDhcpGetParams, authInfo runtime.Cli } /* - PcloudDhcpGetall gets all d h c p servers information open shift internal use only +PcloudDhcpGetall gets all d h c p servers information open shift internal use only */ func (a *Client) PcloudDhcpGetall(params *PcloudDhcpGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudDhcpGetallOK, error) { // TODO: Validate the params before sending @@ -159,7 +159,7 @@ func (a *Client) PcloudDhcpGetall(params *PcloudDhcpGetallParams, authInfo runti } /* - PcloudDhcpPost creates a d h c p server open shift internal use only +PcloudDhcpPost creates a d h c p server open shift internal use only */ func (a *Client) PcloudDhcpPost(params *PcloudDhcpPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudDhcpPostAccepted, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_parameters.go index 3869c75667f..9cfd2aa2b3c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudDhcpDeleteParamsWithHTTPClient(client *http.Client) *PcloudDhcpDel } } -/* PcloudDhcpDeleteParams contains all the parameters to send to the API endpoint - for the pcloud dhcp delete operation. +/* +PcloudDhcpDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud dhcp delete operation. + + Typically these are written to a http.Request. */ type PcloudDhcpDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go index f108dadaa2d..d76cbd09df2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go @@ -54,7 +54,7 @@ func (o *PcloudDhcpDeleteReader) ReadResponse(response runtime.ClientResponse, c } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}] pcloud.dhcp.delete", response, response.Code()) } } @@ -63,7 +63,8 @@ func NewPcloudDhcpDeleteAccepted() *PcloudDhcpDeleteAccepted { return &PcloudDhcpDeleteAccepted{} } -/* PcloudDhcpDeleteAccepted describes a response with status code 202, with default header values. +/* +PcloudDhcpDeleteAccepted describes a response with status code 202, with default header values. OK */ @@ -71,9 +72,44 @@ type PcloudDhcpDeleteAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud dhcp delete accepted response has a 2xx status code +func (o *PcloudDhcpDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud dhcp delete accepted response has a 3xx status code +func (o *PcloudDhcpDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp delete accepted response has a 4xx status code +func (o *PcloudDhcpDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud dhcp delete accepted response has a 5xx status code +func (o *PcloudDhcpDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp delete accepted response a status code equal to that given +func (o *PcloudDhcpDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud dhcp delete accepted response +func (o *PcloudDhcpDeleteAccepted) Code() int { + return 202 +} + func (o *PcloudDhcpDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteAccepted %+v", 202, o.Payload) } + +func (o *PcloudDhcpDeleteAccepted) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteAccepted %+v", 202, o.Payload) +} + func (o *PcloudDhcpDeleteAccepted) GetPayload() models.Object { return o.Payload } @@ -93,7 +129,8 @@ func NewPcloudDhcpDeleteBadRequest() *PcloudDhcpDeleteBadRequest { return &PcloudDhcpDeleteBadRequest{} } -/* PcloudDhcpDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudDhcpDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +138,44 @@ type PcloudDhcpDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp delete bad request response has a 2xx status code +func (o *PcloudDhcpDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp delete bad request response has a 3xx status code +func (o *PcloudDhcpDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp delete bad request response has a 4xx status code +func (o *PcloudDhcpDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp delete bad request response has a 5xx status code +func (o *PcloudDhcpDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp delete bad request response a status code equal to that given +func (o *PcloudDhcpDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud dhcp delete bad request response +func (o *PcloudDhcpDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudDhcpDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudDhcpDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudDhcpDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -125,7 +197,8 @@ func NewPcloudDhcpDeleteForbidden() *PcloudDhcpDeleteForbidden { return &PcloudDhcpDeleteForbidden{} } -/* PcloudDhcpDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudDhcpDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -133,9 +206,44 @@ type PcloudDhcpDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp delete forbidden response has a 2xx status code +func (o *PcloudDhcpDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp delete forbidden response has a 3xx status code +func (o *PcloudDhcpDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp delete forbidden response has a 4xx status code +func (o *PcloudDhcpDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp delete forbidden response has a 5xx status code +func (o *PcloudDhcpDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp delete forbidden response a status code equal to that given +func (o *PcloudDhcpDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud dhcp delete forbidden response +func (o *PcloudDhcpDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudDhcpDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudDhcpDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudDhcpDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -157,7 +265,8 @@ func NewPcloudDhcpDeleteNotFound() *PcloudDhcpDeleteNotFound { return &PcloudDhcpDeleteNotFound{} } -/* PcloudDhcpDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudDhcpDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -165,9 +274,44 @@ type PcloudDhcpDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp delete not found response has a 2xx status code +func (o *PcloudDhcpDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp delete not found response has a 3xx status code +func (o *PcloudDhcpDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp delete not found response has a 4xx status code +func (o *PcloudDhcpDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp delete not found response has a 5xx status code +func (o *PcloudDhcpDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp delete not found response a status code equal to that given +func (o *PcloudDhcpDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud dhcp delete not found response +func (o *PcloudDhcpDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudDhcpDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudDhcpDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudDhcpDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -189,7 +333,8 @@ func NewPcloudDhcpDeleteInternalServerError() *PcloudDhcpDeleteInternalServerErr return &PcloudDhcpDeleteInternalServerError{} } -/* PcloudDhcpDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudDhcpDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +342,44 @@ type PcloudDhcpDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp delete internal server error response has a 2xx status code +func (o *PcloudDhcpDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp delete internal server error response has a 3xx status code +func (o *PcloudDhcpDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp delete internal server error response has a 4xx status code +func (o *PcloudDhcpDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud dhcp delete internal server error response has a 5xx status code +func (o *PcloudDhcpDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud dhcp delete internal server error response a status code equal to that given +func (o *PcloudDhcpDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud dhcp delete internal server error response +func (o *PcloudDhcpDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudDhcpDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudDhcpDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudDhcpDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_parameters.go index 341c63d4778..2b581e4fd57 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudDhcpGetParamsWithHTTPClient(client *http.Client) *PcloudDhcpGetPar } } -/* PcloudDhcpGetParams contains all the parameters to send to the API endpoint - for the pcloud dhcp get operation. +/* +PcloudDhcpGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud dhcp get operation. + + Typically these are written to a http.Request. */ type PcloudDhcpGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go index 533dd79a841..b8847e08300 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudDhcpGetReader) ReadResponse(response runtime.ClientResponse, cons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}] pcloud.dhcp.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudDhcpGetOK() *PcloudDhcpGetOK { return &PcloudDhcpGetOK{} } -/* PcloudDhcpGetOK describes a response with status code 200, with default header values. +/* +PcloudDhcpGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudDhcpGetOK struct { Payload *models.DHCPServerDetail } +// IsSuccess returns true when this pcloud dhcp get o k response has a 2xx status code +func (o *PcloudDhcpGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud dhcp get o k response has a 3xx status code +func (o *PcloudDhcpGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp get o k response has a 4xx status code +func (o *PcloudDhcpGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud dhcp get o k response has a 5xx status code +func (o *PcloudDhcpGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp get o k response a status code equal to that given +func (o *PcloudDhcpGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud dhcp get o k response +func (o *PcloudDhcpGetOK) Code() int { + return 200 +} + func (o *PcloudDhcpGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetOK %+v", 200, o.Payload) } + +func (o *PcloudDhcpGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetOK %+v", 200, o.Payload) +} + func (o *PcloudDhcpGetOK) GetPayload() *models.DHCPServerDetail { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudDhcpGetBadRequest() *PcloudDhcpGetBadRequest { return &PcloudDhcpGetBadRequest{} } -/* PcloudDhcpGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudDhcpGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudDhcpGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp get bad request response has a 2xx status code +func (o *PcloudDhcpGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp get bad request response has a 3xx status code +func (o *PcloudDhcpGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp get bad request response has a 4xx status code +func (o *PcloudDhcpGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp get bad request response has a 5xx status code +func (o *PcloudDhcpGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp get bad request response a status code equal to that given +func (o *PcloudDhcpGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud dhcp get bad request response +func (o *PcloudDhcpGetBadRequest) Code() int { + return 400 +} + func (o *PcloudDhcpGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudDhcpGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudDhcpGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -122,12 +200,81 @@ 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{} } -/* PcloudDhcpGetForbidden describes a response with status code 403, with default header values. +/* +PcloudDhcpGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -135,9 +282,44 @@ type PcloudDhcpGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp get forbidden response has a 2xx status code +func (o *PcloudDhcpGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp get forbidden response has a 3xx status code +func (o *PcloudDhcpGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp get forbidden response has a 4xx status code +func (o *PcloudDhcpGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp get forbidden response has a 5xx status code +func (o *PcloudDhcpGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp get forbidden response a status code equal to that given +func (o *PcloudDhcpGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud dhcp get forbidden response +func (o *PcloudDhcpGetForbidden) Code() int { + return 403 +} + func (o *PcloudDhcpGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudDhcpGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudDhcpGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -159,7 +341,8 @@ func NewPcloudDhcpGetNotFound() *PcloudDhcpGetNotFound { return &PcloudDhcpGetNotFound{} } -/* PcloudDhcpGetNotFound describes a response with status code 404, with default header values. +/* +PcloudDhcpGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudDhcpGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp get not found response has a 2xx status code +func (o *PcloudDhcpGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp get not found response has a 3xx status code +func (o *PcloudDhcpGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp get not found response has a 4xx status code +func (o *PcloudDhcpGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp get not found response has a 5xx status code +func (o *PcloudDhcpGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp get not found response a status code equal to that given +func (o *PcloudDhcpGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud dhcp get not found response +func (o *PcloudDhcpGetNotFound) Code() int { + return 404 +} + func (o *PcloudDhcpGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudDhcpGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudDhcpGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudDhcpGetInternalServerError() *PcloudDhcpGetInternalServerError { return &PcloudDhcpGetInternalServerError{} } -/* PcloudDhcpGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudDhcpGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudDhcpGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp get internal server error response has a 2xx status code +func (o *PcloudDhcpGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp get internal server error response has a 3xx status code +func (o *PcloudDhcpGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp get internal server error response has a 4xx status code +func (o *PcloudDhcpGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud dhcp get internal server error response has a 5xx status code +func (o *PcloudDhcpGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud dhcp get internal server error response a status code equal to that given +func (o *PcloudDhcpGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud dhcp get internal server error response +func (o *PcloudDhcpGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudDhcpGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudDhcpGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp/{dhcp_id}][%d] pcloudDhcpGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudDhcpGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_parameters.go index 52bbb8487b0..723a3bdc1bc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudDhcpGetallParamsWithHTTPClient(client *http.Client) *PcloudDhcpGet } } -/* PcloudDhcpGetallParams contains all the parameters to send to the API endpoint - for the pcloud dhcp getall operation. +/* +PcloudDhcpGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud dhcp getall operation. + + Typically these are written to a http.Request. */ type PcloudDhcpGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go index 3aeb4415c33..f90457a4277 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -42,7 +60,7 @@ func (o *PcloudDhcpGetallReader) ReadResponse(response runtime.ClientResponse, c } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp] pcloud.dhcp.getall", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewPcloudDhcpGetallOK() *PcloudDhcpGetallOK { return &PcloudDhcpGetallOK{} } -/* PcloudDhcpGetallOK describes a response with status code 200, with default header values. +/* +PcloudDhcpGetallOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type PcloudDhcpGetallOK struct { Payload models.DHCPServers } +// IsSuccess returns true when this pcloud dhcp getall o k response has a 2xx status code +func (o *PcloudDhcpGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud dhcp getall o k response has a 3xx status code +func (o *PcloudDhcpGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp getall o k response has a 4xx status code +func (o *PcloudDhcpGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud dhcp getall o k response has a 5xx status code +func (o *PcloudDhcpGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp getall o k response a status code equal to that given +func (o *PcloudDhcpGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud dhcp getall o k response +func (o *PcloudDhcpGetallOK) Code() int { + return 200 +} + func (o *PcloudDhcpGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallOK %+v", 200, o.Payload) } + +func (o *PcloudDhcpGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallOK %+v", 200, o.Payload) +} + func (o *PcloudDhcpGetallOK) GetPayload() models.DHCPServers { return o.Payload } @@ -76,12 +130,149 @@ 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{} } -/* PcloudDhcpGetallForbidden describes a response with status code 403, with default header values. +/* +PcloudDhcpGetallForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -89,9 +280,44 @@ type PcloudDhcpGetallForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp getall forbidden response has a 2xx status code +func (o *PcloudDhcpGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp getall forbidden response has a 3xx status code +func (o *PcloudDhcpGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp getall forbidden response has a 4xx status code +func (o *PcloudDhcpGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp getall forbidden response has a 5xx status code +func (o *PcloudDhcpGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp getall forbidden response a status code equal to that given +func (o *PcloudDhcpGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud dhcp getall forbidden response +func (o *PcloudDhcpGetallForbidden) Code() int { + return 403 +} + func (o *PcloudDhcpGetallForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallForbidden %+v", 403, o.Payload) } + +func (o *PcloudDhcpGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallForbidden %+v", 403, o.Payload) +} + func (o *PcloudDhcpGetallForbidden) GetPayload() *models.Error { return o.Payload } @@ -108,12 +334,81 @@ 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{} } -/* PcloudDhcpGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudDhcpGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -121,9 +416,44 @@ type PcloudDhcpGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp getall internal server error response has a 2xx status code +func (o *PcloudDhcpGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp getall internal server error response has a 3xx status code +func (o *PcloudDhcpGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp getall internal server error response has a 4xx status code +func (o *PcloudDhcpGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud dhcp getall internal server error response has a 5xx status code +func (o *PcloudDhcpGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud dhcp getall internal server error response a status code equal to that given +func (o *PcloudDhcpGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud dhcp getall internal server error response +func (o *PcloudDhcpGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudDhcpGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudDhcpGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudDhcpGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_parameters.go index d16312a19b3..decad4409f1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudDhcpPostParamsWithHTTPClient(client *http.Client) *PcloudDhcpPostP } } -/* PcloudDhcpPostParams contains all the parameters to send to the API endpoint - for the pcloud dhcp post operation. +/* +PcloudDhcpPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud dhcp post operation. + + Typically these are written to a http.Request. */ type PcloudDhcpPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go index 7b5b6850820..2578e70c0ad 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +60,7 @@ func (o *PcloudDhcpPostReader) ReadResponse(response runtime.ClientResponse, con } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp] pcloud.dhcp.post", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudDhcpPostAccepted() *PcloudDhcpPostAccepted { return &PcloudDhcpPostAccepted{} } -/* PcloudDhcpPostAccepted describes a response with status code 202, with default header values. +/* +PcloudDhcpPostAccepted describes a response with status code 202, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudDhcpPostAccepted struct { Payload *models.DHCPServer } +// IsSuccess returns true when this pcloud dhcp post accepted response has a 2xx status code +func (o *PcloudDhcpPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud dhcp post accepted response has a 3xx status code +func (o *PcloudDhcpPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp post accepted response has a 4xx status code +func (o *PcloudDhcpPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud dhcp post accepted response has a 5xx status code +func (o *PcloudDhcpPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp post accepted response a status code equal to that given +func (o *PcloudDhcpPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud dhcp post accepted response +func (o *PcloudDhcpPostAccepted) Code() int { + return 202 +} + func (o *PcloudDhcpPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudDhcpPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudDhcpPostAccepted) GetPayload() *models.DHCPServer { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudDhcpPostBadRequest() *PcloudDhcpPostBadRequest { return &PcloudDhcpPostBadRequest{} } -/* PcloudDhcpPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudDhcpPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudDhcpPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp post bad request response has a 2xx status code +func (o *PcloudDhcpPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp post bad request response has a 3xx status code +func (o *PcloudDhcpPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp post bad request response has a 4xx status code +func (o *PcloudDhcpPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp post bad request response has a 5xx status code +func (o *PcloudDhcpPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp post bad request response a status code equal to that given +func (o *PcloudDhcpPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud dhcp post bad request response +func (o *PcloudDhcpPostBadRequest) Code() int { + return 400 +} + func (o *PcloudDhcpPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudDhcpPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudDhcpPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -116,12 +200,81 @@ 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{} } -/* PcloudDhcpPostForbidden describes a response with status code 403, with default header values. +/* +PcloudDhcpPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -129,9 +282,44 @@ type PcloudDhcpPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp post forbidden response has a 2xx status code +func (o *PcloudDhcpPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp post forbidden response has a 3xx status code +func (o *PcloudDhcpPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp post forbidden response has a 4xx status code +func (o *PcloudDhcpPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud dhcp post forbidden response has a 5xx status code +func (o *PcloudDhcpPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud dhcp post forbidden response a status code equal to that given +func (o *PcloudDhcpPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud dhcp post forbidden response +func (o *PcloudDhcpPostForbidden) Code() int { + return 403 +} + func (o *PcloudDhcpPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudDhcpPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudDhcpPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -148,12 +336,81 @@ 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{} } -/* PcloudDhcpPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudDhcpPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudDhcpPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud dhcp post internal server error response has a 2xx status code +func (o *PcloudDhcpPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud dhcp post internal server error response has a 3xx status code +func (o *PcloudDhcpPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud dhcp post internal server error response has a 4xx status code +func (o *PcloudDhcpPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud dhcp post internal server error response has a 5xx status code +func (o *PcloudDhcpPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud dhcp post internal server error response a status code equal to that given +func (o *PcloudDhcpPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud dhcp post internal server error response +func (o *PcloudDhcpPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudDhcpPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudDhcpPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/services/dhcp][%d] pcloudDhcpPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudDhcpPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go index be4b3b8faa4..7c4e27a7d21 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go @@ -44,7 +44,7 @@ type ClientService interface { } /* - PcloudSharedprocessorpoolsDelete deletes a shared processor pool from a cloud instance +PcloudSharedprocessorpoolsDelete deletes a shared processor pool from a cloud instance */ func (a *Client) PcloudSharedprocessorpoolsDelete(params *PcloudSharedprocessorpoolsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsDeleteOK, error) { // TODO: Validate the params before sending @@ -83,7 +83,7 @@ func (a *Client) PcloudSharedprocessorpoolsDelete(params *PcloudSharedprocessorp } /* - PcloudSharedprocessorpoolsGet gets the detail of a shared processor pool for a cloud instance +PcloudSharedprocessorpoolsGet gets the detail of a shared processor pool for a cloud instance */ func (a *Client) PcloudSharedprocessorpoolsGet(params *PcloudSharedprocessorpoolsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsGetOK, error) { // TODO: Validate the params before sending @@ -122,7 +122,7 @@ func (a *Client) PcloudSharedprocessorpoolsGet(params *PcloudSharedprocessorpool } /* - PcloudSharedprocessorpoolsGetall gets the list of shared processor pools for a cloud instance +PcloudSharedprocessorpoolsGetall gets the list of shared processor pools for a cloud instance */ func (a *Client) PcloudSharedprocessorpoolsGetall(params *PcloudSharedprocessorpoolsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsGetallOK, error) { // TODO: Validate the params before sending @@ -161,7 +161,7 @@ func (a *Client) PcloudSharedprocessorpoolsGetall(params *PcloudSharedprocessorp } /* - PcloudSharedprocessorpoolsPost creates a new shared processor pool +PcloudSharedprocessorpoolsPost creates a new shared processor pool */ func (a *Client) PcloudSharedprocessorpoolsPost(params *PcloudSharedprocessorpoolsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsPostAccepted, error) { // TODO: Validate the params before sending @@ -200,7 +200,7 @@ func (a *Client) PcloudSharedprocessorpoolsPost(params *PcloudSharedprocessorpoo } /* - PcloudSharedprocessorpoolsPut updates a shared processor pool for a cloud instance +PcloudSharedprocessorpoolsPut updates a shared processor pool for a cloud instance */ func (a *Client) PcloudSharedprocessorpoolsPut(params *PcloudSharedprocessorpoolsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSharedprocessorpoolsPutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_parameters.go index 484d1c6f625..3f18e084e7c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSharedprocessorpoolsDeleteParamsWithHTTPClient(client *http.Client } } -/* PcloudSharedprocessorpoolsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud sharedprocessorpools delete operation. +/* +PcloudSharedprocessorpoolsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sharedprocessorpools delete operation. + + Typically these are written to a http.Request. */ type PcloudSharedprocessorpoolsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go index 4b5cd9c72b5..9ba1ffa5724 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go @@ -66,7 +66,7 @@ func (o *PcloudSharedprocessorpoolsDeleteReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}] pcloud.sharedprocessorpools.delete", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudSharedprocessorpoolsDeleteOK() *PcloudSharedprocessorpoolsDeleteOK return &PcloudSharedprocessorpoolsDeleteOK{} } -/* PcloudSharedprocessorpoolsDeleteOK describes a response with status code 200, with default header values. +/* +PcloudSharedprocessorpoolsDeleteOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudSharedprocessorpoolsDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud sharedprocessorpools delete o k response has a 2xx status code +func (o *PcloudSharedprocessorpoolsDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sharedprocessorpools delete o k response has a 3xx status code +func (o *PcloudSharedprocessorpoolsDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools delete o k response has a 4xx status code +func (o *PcloudSharedprocessorpoolsDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools delete o k response has a 5xx status code +func (o *PcloudSharedprocessorpoolsDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools delete o k response a status code equal to that given +func (o *PcloudSharedprocessorpoolsDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sharedprocessorpools delete o k response +func (o *PcloudSharedprocessorpoolsDeleteOK) Code() int { + return 200 +} + func (o *PcloudSharedprocessorpoolsDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudSharedprocessorpoolsDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudSharedprocessorpoolsDeleteOK) GetPayload() models.Object { return o.Payload } @@ -105,7 +141,8 @@ func NewPcloudSharedprocessorpoolsDeleteBadRequest() *PcloudSharedprocessorpools return &PcloudSharedprocessorpoolsDeleteBadRequest{} } -/* PcloudSharedprocessorpoolsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudSharedprocessorpoolsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -113,9 +150,44 @@ type PcloudSharedprocessorpoolsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools delete bad request response has a 2xx status code +func (o *PcloudSharedprocessorpoolsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools delete bad request response has a 3xx status code +func (o *PcloudSharedprocessorpoolsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools delete bad request response has a 4xx status code +func (o *PcloudSharedprocessorpoolsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools delete bad request response has a 5xx status code +func (o *PcloudSharedprocessorpoolsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools delete bad request response a status code equal to that given +func (o *PcloudSharedprocessorpoolsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sharedprocessorpools delete bad request response +func (o *PcloudSharedprocessorpoolsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudSharedprocessorpoolsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSharedprocessorpoolsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSharedprocessorpoolsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -137,7 +209,8 @@ func NewPcloudSharedprocessorpoolsDeleteUnauthorized() *PcloudSharedprocessorpoo return &PcloudSharedprocessorpoolsDeleteUnauthorized{} } -/* PcloudSharedprocessorpoolsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSharedprocessorpoolsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -145,9 +218,44 @@ type PcloudSharedprocessorpoolsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools delete unauthorized response has a 2xx status code +func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools delete unauthorized response has a 3xx status code +func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools delete unauthorized response has a 4xx status code +func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools delete unauthorized response has a 5xx status code +func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools delete unauthorized response a status code equal to that given +func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sharedprocessorpools delete unauthorized response +func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSharedprocessorpoolsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -169,7 +277,8 @@ func NewPcloudSharedprocessorpoolsDeleteForbidden() *PcloudSharedprocessorpoolsD return &PcloudSharedprocessorpoolsDeleteForbidden{} } -/* PcloudSharedprocessorpoolsDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudSharedprocessorpoolsDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -177,9 +286,44 @@ type PcloudSharedprocessorpoolsDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools delete forbidden response has a 2xx status code +func (o *PcloudSharedprocessorpoolsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools delete forbidden response has a 3xx status code +func (o *PcloudSharedprocessorpoolsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools delete forbidden response has a 4xx status code +func (o *PcloudSharedprocessorpoolsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools delete forbidden response has a 5xx status code +func (o *PcloudSharedprocessorpoolsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools delete forbidden response a status code equal to that given +func (o *PcloudSharedprocessorpoolsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sharedprocessorpools delete forbidden response +func (o *PcloudSharedprocessorpoolsDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudSharedprocessorpoolsDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudSharedprocessorpoolsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudSharedprocessorpoolsDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -201,7 +345,8 @@ func NewPcloudSharedprocessorpoolsDeleteNotFound() *PcloudSharedprocessorpoolsDe return &PcloudSharedprocessorpoolsDeleteNotFound{} } -/* PcloudSharedprocessorpoolsDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudSharedprocessorpoolsDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -209,9 +354,44 @@ type PcloudSharedprocessorpoolsDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools delete not found response has a 2xx status code +func (o *PcloudSharedprocessorpoolsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools delete not found response has a 3xx status code +func (o *PcloudSharedprocessorpoolsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools delete not found response has a 4xx status code +func (o *PcloudSharedprocessorpoolsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools delete not found response has a 5xx status code +func (o *PcloudSharedprocessorpoolsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools delete not found response a status code equal to that given +func (o *PcloudSharedprocessorpoolsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sharedprocessorpools delete not found response +func (o *PcloudSharedprocessorpoolsDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudSharedprocessorpoolsDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudSharedprocessorpoolsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudSharedprocessorpoolsDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -233,7 +413,8 @@ func NewPcloudSharedprocessorpoolsDeleteConflict() *PcloudSharedprocessorpoolsDe return &PcloudSharedprocessorpoolsDeleteConflict{} } -/* PcloudSharedprocessorpoolsDeleteConflict describes a response with status code 409, with default header values. +/* +PcloudSharedprocessorpoolsDeleteConflict describes a response with status code 409, with default header values. Conflict */ @@ -241,9 +422,44 @@ type PcloudSharedprocessorpoolsDeleteConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools delete conflict response has a 2xx status code +func (o *PcloudSharedprocessorpoolsDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools delete conflict response has a 3xx status code +func (o *PcloudSharedprocessorpoolsDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools delete conflict response has a 4xx status code +func (o *PcloudSharedprocessorpoolsDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools delete conflict response has a 5xx status code +func (o *PcloudSharedprocessorpoolsDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools delete conflict response a status code equal to that given +func (o *PcloudSharedprocessorpoolsDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud sharedprocessorpools delete conflict response +func (o *PcloudSharedprocessorpoolsDeleteConflict) Code() int { + return 409 +} + func (o *PcloudSharedprocessorpoolsDeleteConflict) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteConflict %+v", 409, o.Payload) } + +func (o *PcloudSharedprocessorpoolsDeleteConflict) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteConflict %+v", 409, o.Payload) +} + func (o *PcloudSharedprocessorpoolsDeleteConflict) GetPayload() *models.Error { return o.Payload } @@ -265,7 +481,8 @@ func NewPcloudSharedprocessorpoolsDeleteInternalServerError() *PcloudSharedproce return &PcloudSharedprocessorpoolsDeleteInternalServerError{} } -/* PcloudSharedprocessorpoolsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSharedprocessorpoolsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -273,9 +490,44 @@ type PcloudSharedprocessorpoolsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools delete internal server error response has a 2xx status code +func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools delete internal server error response has a 3xx status code +func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools delete internal server error response has a 4xx status code +func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools delete internal server error response has a 5xx status code +func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sharedprocessorpools delete internal server error response a status code equal to that given +func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sharedprocessorpools delete internal server error response +func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSharedprocessorpoolsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_parameters.go index 1a064000c38..d98083fecf5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSharedprocessorpoolsGetParamsWithHTTPClient(client *http.Client) * } } -/* PcloudSharedprocessorpoolsGetParams contains all the parameters to send to the API endpoint - for the pcloud sharedprocessorpools get operation. +/* +PcloudSharedprocessorpoolsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sharedprocessorpools get operation. + + Typically these are written to a http.Request. */ type PcloudSharedprocessorpoolsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go index 06ce4fce28f..52cdaca54de 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudSharedprocessorpoolsGetReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}] pcloud.sharedprocessorpools.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudSharedprocessorpoolsGetOK() *PcloudSharedprocessorpoolsGetOK { return &PcloudSharedprocessorpoolsGetOK{} } -/* PcloudSharedprocessorpoolsGetOK describes a response with status code 200, with default header values. +/* +PcloudSharedprocessorpoolsGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudSharedprocessorpoolsGetOK struct { Payload *models.SharedProcessorPoolDetail } +// IsSuccess returns true when this pcloud sharedprocessorpools get o k response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sharedprocessorpools get o k response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools get o k response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools get o k response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools get o k response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sharedprocessorpools get o k response +func (o *PcloudSharedprocessorpoolsGetOK) Code() int { + return 200 +} + func (o *PcloudSharedprocessorpoolsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetOK %+v", 200, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetOK %+v", 200, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetOK) GetPayload() *models.SharedProcessorPoolDetail { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudSharedprocessorpoolsGetBadRequest() *PcloudSharedprocessorpoolsGet return &PcloudSharedprocessorpoolsGetBadRequest{} } -/* PcloudSharedprocessorpoolsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudSharedprocessorpoolsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudSharedprocessorpoolsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools get bad request response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools get bad request response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools get bad request response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools get bad request response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools get bad request response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sharedprocessorpools get bad request response +func (o *PcloudSharedprocessorpoolsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudSharedprocessorpoolsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudSharedprocessorpoolsGetUnauthorized() *PcloudSharedprocessorpoolsG return &PcloudSharedprocessorpoolsGetUnauthorized{} } -/* PcloudSharedprocessorpoolsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSharedprocessorpoolsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudSharedprocessorpoolsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools get unauthorized response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools get unauthorized response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools get unauthorized response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools get unauthorized response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools get unauthorized response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sharedprocessorpools get unauthorized response +func (o *PcloudSharedprocessorpoolsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudSharedprocessorpoolsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ 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{} } -/* PcloudSharedprocessorpoolsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudSharedprocessorpoolsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudSharedprocessorpoolsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools get not found response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools get not found response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools get not found response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools get not found response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools get not found response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sharedprocessorpools get not found response +func (o *PcloudSharedprocessorpoolsGetNotFound) Code() int { + return 404 +} + func (o *PcloudSharedprocessorpoolsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudSharedprocessorpoolsGetInternalServerError() *PcloudSharedprocesso return &PcloudSharedprocessorpoolsGetInternalServerError{} } -/* PcloudSharedprocessorpoolsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSharedprocessorpoolsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudSharedprocessorpoolsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools get internal server error response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools get internal server error response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools get internal server error response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools get internal server error response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sharedprocessorpools get internal server error response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sharedprocessorpools get internal server error response +func (o *PcloudSharedprocessorpoolsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudSharedprocessorpoolsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_parameters.go index 0a6d3701073..3a2744c2bff 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSharedprocessorpoolsGetallParamsWithHTTPClient(client *http.Client } } -/* PcloudSharedprocessorpoolsGetallParams contains all the parameters to send to the API endpoint - for the pcloud sharedprocessorpools getall operation. +/* +PcloudSharedprocessorpoolsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sharedprocessorpools getall operation. + + Typically these are written to a http.Request. */ type PcloudSharedprocessorpoolsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go index d9a0edb8ef3..6e6fb6c7e2c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go @@ -60,7 +60,7 @@ func (o *PcloudSharedprocessorpoolsGetallReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools] pcloud.sharedprocessorpools.getall", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudSharedprocessorpoolsGetallOK() *PcloudSharedprocessorpoolsGetallOK return &PcloudSharedprocessorpoolsGetallOK{} } -/* PcloudSharedprocessorpoolsGetallOK describes a response with status code 200, with default header values. +/* +PcloudSharedprocessorpoolsGetallOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudSharedprocessorpoolsGetallOK struct { Payload *models.SharedProcessorPools } +// IsSuccess returns true when this pcloud sharedprocessorpools getall o k response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sharedprocessorpools getall o k response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools getall o k response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools getall o k response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools getall o k response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sharedprocessorpools getall o k response +func (o *PcloudSharedprocessorpoolsGetallOK) Code() int { + return 200 +} + func (o *PcloudSharedprocessorpoolsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetallOK) GetPayload() *models.SharedProcessorPools { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudSharedprocessorpoolsGetallBadRequest() *PcloudSharedprocessorpools return &PcloudSharedprocessorpoolsGetallBadRequest{} } -/* PcloudSharedprocessorpoolsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudSharedprocessorpoolsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudSharedprocessorpoolsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools getall bad request response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools getall bad request response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools getall bad request response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools getall bad request response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools getall bad request response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sharedprocessorpools getall bad request response +func (o *PcloudSharedprocessorpoolsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudSharedprocessorpoolsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudSharedprocessorpoolsGetallUnauthorized() *PcloudSharedprocessorpoo return &PcloudSharedprocessorpoolsGetallUnauthorized{} } -/* PcloudSharedprocessorpoolsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSharedprocessorpoolsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudSharedprocessorpoolsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools getall unauthorized response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools getall unauthorized response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools getall unauthorized response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools getall unauthorized response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools getall unauthorized response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sharedprocessorpools getall unauthorized response +func (o *PcloudSharedprocessorpoolsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudSharedprocessorpoolsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudSharedprocessorpoolsGetallForbidden() *PcloudSharedprocessorpoolsG return &PcloudSharedprocessorpoolsGetallForbidden{} } -/* PcloudSharedprocessorpoolsGetallForbidden describes a response with status code 403, with default header values. +/* +PcloudSharedprocessorpoolsGetallForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudSharedprocessorpoolsGetallForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools getall forbidden response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools getall forbidden response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools getall forbidden response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools getall forbidden response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools getall forbidden response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sharedprocessorpools getall forbidden response +func (o *PcloudSharedprocessorpoolsGetallForbidden) Code() int { + return 403 +} + func (o *PcloudSharedprocessorpoolsGetallForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallForbidden %+v", 403, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallForbidden %+v", 403, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetallForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudSharedprocessorpoolsGetallNotFound() *PcloudSharedprocessorpoolsGe return &PcloudSharedprocessorpoolsGetallNotFound{} } -/* PcloudSharedprocessorpoolsGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudSharedprocessorpoolsGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudSharedprocessorpoolsGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools getall not found response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools getall not found response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools getall not found response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools getall not found response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools getall not found response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sharedprocessorpools getall not found response +func (o *PcloudSharedprocessorpoolsGetallNotFound) Code() int { + return 404 +} + func (o *PcloudSharedprocessorpoolsGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudSharedprocessorpoolsGetallInternalServerError() *PcloudSharedproce return &PcloudSharedprocessorpoolsGetallInternalServerError{} } -/* PcloudSharedprocessorpoolsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSharedprocessorpoolsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudSharedprocessorpoolsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools getall internal server error response has a 2xx status code +func (o *PcloudSharedprocessorpoolsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools getall internal server error response has a 3xx status code +func (o *PcloudSharedprocessorpoolsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools getall internal server error response has a 4xx status code +func (o *PcloudSharedprocessorpoolsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools getall internal server error response has a 5xx status code +func (o *PcloudSharedprocessorpoolsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sharedprocessorpools getall internal server error response a status code equal to that given +func (o *PcloudSharedprocessorpoolsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sharedprocessorpools getall internal server error response +func (o *PcloudSharedprocessorpoolsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudSharedprocessorpoolsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSharedprocessorpoolsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSharedprocessorpoolsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_parameters.go index 793620138c1..0a8865f49ef 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudSharedprocessorpoolsPostParamsWithHTTPClient(client *http.Client) } } -/* PcloudSharedprocessorpoolsPostParams contains all the parameters to send to the API endpoint - for the pcloud sharedprocessorpools post operation. +/* +PcloudSharedprocessorpoolsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sharedprocessorpools post operation. + + Typically these are written to a http.Request. */ type PcloudSharedprocessorpoolsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go index f99e64e1ded..97d5f4ce4c9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudSharedprocessorpoolsPostReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools] pcloud.sharedprocessorpools.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudSharedprocessorpoolsPostAccepted() *PcloudSharedprocessorpoolsPost return &PcloudSharedprocessorpoolsPostAccepted{} } -/* PcloudSharedprocessorpoolsPostAccepted describes a response with status code 202, with default header values. +/* +PcloudSharedprocessorpoolsPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -83,9 +90,44 @@ type PcloudSharedprocessorpoolsPostAccepted struct { Payload *models.SharedProcessorPool } +// IsSuccess returns true when this pcloud sharedprocessorpools post accepted response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sharedprocessorpools post accepted response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools post accepted response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools post accepted response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools post accepted response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud sharedprocessorpools post accepted response +func (o *PcloudSharedprocessorpoolsPostAccepted) Code() int { + return 202 +} + func (o *PcloudSharedprocessorpoolsPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPostAccepted) GetPayload() *models.SharedProcessorPool { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudSharedprocessorpoolsPostBadRequest() *PcloudSharedprocessorpoolsPo return &PcloudSharedprocessorpoolsPostBadRequest{} } -/* PcloudSharedprocessorpoolsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudSharedprocessorpoolsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudSharedprocessorpoolsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools post bad request response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools post bad request response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools post bad request response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools post bad request response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools post bad request response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sharedprocessorpools post bad request response +func (o *PcloudSharedprocessorpoolsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudSharedprocessorpoolsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudSharedprocessorpoolsPostUnauthorized() *PcloudSharedprocessorpools return &PcloudSharedprocessorpoolsPostUnauthorized{} } -/* PcloudSharedprocessorpoolsPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSharedprocessorpoolsPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudSharedprocessorpoolsPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools post unauthorized response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools post unauthorized response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools post unauthorized response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools post unauthorized response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools post unauthorized response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sharedprocessorpools post unauthorized response +func (o *PcloudSharedprocessorpoolsPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudSharedprocessorpoolsPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +285,8 @@ func NewPcloudSharedprocessorpoolsPostForbidden() *PcloudSharedprocessorpoolsPos return &PcloudSharedprocessorpoolsPostForbidden{} } -/* PcloudSharedprocessorpoolsPostForbidden describes a response with status code 403, with default header values. +/* +PcloudSharedprocessorpoolsPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +294,44 @@ type PcloudSharedprocessorpoolsPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools post forbidden response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools post forbidden response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools post forbidden response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools post forbidden response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools post forbidden response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sharedprocessorpools post forbidden response +func (o *PcloudSharedprocessorpoolsPostForbidden) Code() int { + return 403 +} + func (o *PcloudSharedprocessorpoolsPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -198,12 +348,81 @@ 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{} } -/* PcloudSharedprocessorpoolsPostConflict describes a response with status code 409, with default header values. +/* +PcloudSharedprocessorpoolsPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +430,44 @@ type PcloudSharedprocessorpoolsPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools post conflict response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools post conflict response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools post conflict response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools post conflict response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools post conflict response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud sharedprocessorpools post conflict response +func (o *PcloudSharedprocessorpoolsPostConflict) Code() int { + return 409 +} + func (o *PcloudSharedprocessorpoolsPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostConflict %+v", 409, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostConflict %+v", 409, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudSharedprocessorpoolsPostUnprocessableEntity() *PcloudSharedprocess return &PcloudSharedprocessorpoolsPostUnprocessableEntity{} } -/* PcloudSharedprocessorpoolsPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudSharedprocessorpoolsPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudSharedprocessorpoolsPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools post unprocessable entity response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools post unprocessable entity response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools post unprocessable entity response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools post unprocessable entity response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools post unprocessable entity response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud sharedprocessorpools post unprocessable entity response +func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudSharedprocessorpoolsPostInternalServerError() *PcloudSharedprocess return &PcloudSharedprocessorpoolsPostInternalServerError{} } -/* PcloudSharedprocessorpoolsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSharedprocessorpoolsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudSharedprocessorpoolsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools post internal server error response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools post internal server error response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools post internal server error response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools post internal server error response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sharedprocessorpools post internal server error response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sharedprocessorpools post internal server error response +func (o *PcloudSharedprocessorpoolsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudSharedprocessorpoolsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools][%d] pcloudSharedprocessorpoolsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_parameters.go index 77011245d77..b464b907918 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudSharedprocessorpoolsPutParamsWithHTTPClient(client *http.Client) * } } -/* PcloudSharedprocessorpoolsPutParams contains all the parameters to send to the API endpoint - for the pcloud sharedprocessorpools put operation. +/* +PcloudSharedprocessorpoolsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud sharedprocessorpools put operation. + + Typically these are written to a http.Request. */ type PcloudSharedprocessorpoolsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go index 6c4490d78be..d19e776fe61 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go @@ -60,7 +60,7 @@ func (o *PcloudSharedprocessorpoolsPutReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}] pcloud.sharedprocessorpools.put", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudSharedprocessorpoolsPutOK() *PcloudSharedprocessorpoolsPutOK { return &PcloudSharedprocessorpoolsPutOK{} } -/* PcloudSharedprocessorpoolsPutOK describes a response with status code 200, with default header values. +/* +PcloudSharedprocessorpoolsPutOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudSharedprocessorpoolsPutOK struct { Payload *models.SharedProcessorPool } +// IsSuccess returns true when this pcloud sharedprocessorpools put o k response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud sharedprocessorpools put o k response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools put o k response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools put o k response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools put o k response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud sharedprocessorpools put o k response +func (o *PcloudSharedprocessorpoolsPutOK) Code() int { + return 200 +} + func (o *PcloudSharedprocessorpoolsPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutOK %+v", 200, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutOK %+v", 200, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPutOK) GetPayload() *models.SharedProcessorPool { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudSharedprocessorpoolsPutBadRequest() *PcloudSharedprocessorpoolsPut return &PcloudSharedprocessorpoolsPutBadRequest{} } -/* PcloudSharedprocessorpoolsPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudSharedprocessorpoolsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudSharedprocessorpoolsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools put bad request response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools put bad request response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools put bad request response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools put bad request response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools put bad request response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud sharedprocessorpools put bad request response +func (o *PcloudSharedprocessorpoolsPutBadRequest) Code() int { + return 400 +} + func (o *PcloudSharedprocessorpoolsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudSharedprocessorpoolsPutUnauthorized() *PcloudSharedprocessorpoolsP return &PcloudSharedprocessorpoolsPutUnauthorized{} } -/* PcloudSharedprocessorpoolsPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSharedprocessorpoolsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudSharedprocessorpoolsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools put unauthorized response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools put unauthorized response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools put unauthorized response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools put unauthorized response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools put unauthorized response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud sharedprocessorpools put unauthorized response +func (o *PcloudSharedprocessorpoolsPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudSharedprocessorpoolsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudSharedprocessorpoolsPutForbidden() *PcloudSharedprocessorpoolsPutF return &PcloudSharedprocessorpoolsPutForbidden{} } -/* PcloudSharedprocessorpoolsPutForbidden describes a response with status code 403, with default header values. +/* +PcloudSharedprocessorpoolsPutForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudSharedprocessorpoolsPutForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools put forbidden response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools put forbidden response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools put forbidden response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools put forbidden response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools put forbidden response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud sharedprocessorpools put forbidden response +func (o *PcloudSharedprocessorpoolsPutForbidden) Code() int { + return 403 +} + func (o *PcloudSharedprocessorpoolsPutForbidden) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutForbidden %+v", 403, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutForbidden %+v", 403, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPutForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudSharedprocessorpoolsPutNotFound() *PcloudSharedprocessorpoolsPutNo return &PcloudSharedprocessorpoolsPutNotFound{} } -/* PcloudSharedprocessorpoolsPutNotFound describes a response with status code 404, with default header values. +/* +PcloudSharedprocessorpoolsPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudSharedprocessorpoolsPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools put not found response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools put not found response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools put not found response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud sharedprocessorpools put not found response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud sharedprocessorpools put not found response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud sharedprocessorpools put not found response +func (o *PcloudSharedprocessorpoolsPutNotFound) Code() int { + return 404 +} + func (o *PcloudSharedprocessorpoolsPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudSharedprocessorpoolsPutInternalServerError() *PcloudSharedprocesso return &PcloudSharedprocessorpoolsPutInternalServerError{} } -/* PcloudSharedprocessorpoolsPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSharedprocessorpoolsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudSharedprocessorpoolsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud sharedprocessorpools put internal server error response has a 2xx status code +func (o *PcloudSharedprocessorpoolsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud sharedprocessorpools put internal server error response has a 3xx status code +func (o *PcloudSharedprocessorpoolsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud sharedprocessorpools put internal server error response has a 4xx status code +func (o *PcloudSharedprocessorpoolsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud sharedprocessorpools put internal server error response has a 5xx status code +func (o *PcloudSharedprocessorpoolsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud sharedprocessorpools put internal server error response a status code equal to that given +func (o *PcloudSharedprocessorpoolsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud sharedprocessorpools put internal server error response +func (o *PcloudSharedprocessorpoolsPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudSharedprocessorpoolsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSharedprocessorpoolsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/shared-processor-pools/{shared_processor_pool_id}][%d] pcloudSharedprocessorpoolsPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSharedprocessorpoolsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go index 173f444230b..cfadbbb12b6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go @@ -42,7 +42,7 @@ type ClientService interface { } /* - PcloudCloudinstancesSnapshotsDelete deletes a p VM instance snapshot of a cloud instance +PcloudCloudinstancesSnapshotsDelete deletes a p VM instance snapshot of a cloud instance */ func (a *Client) PcloudCloudinstancesSnapshotsDelete(params *PcloudCloudinstancesSnapshotsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSnapshotsDeleteAccepted, error) { // TODO: Validate the params before sending @@ -81,7 +81,7 @@ func (a *Client) PcloudCloudinstancesSnapshotsDelete(params *PcloudCloudinstance } /* - PcloudCloudinstancesSnapshotsGet gets the detail of a snapshot +PcloudCloudinstancesSnapshotsGet gets the detail of a snapshot */ func (a *Client) PcloudCloudinstancesSnapshotsGet(params *PcloudCloudinstancesSnapshotsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSnapshotsGetOK, error) { // TODO: Validate the params before sending @@ -120,7 +120,7 @@ func (a *Client) PcloudCloudinstancesSnapshotsGet(params *PcloudCloudinstancesSn } /* - PcloudCloudinstancesSnapshotsGetall lists all p VM instance snapshots for this cloud instance +PcloudCloudinstancesSnapshotsGetall lists all p VM instance snapshots for this cloud instance */ func (a *Client) PcloudCloudinstancesSnapshotsGetall(params *PcloudCloudinstancesSnapshotsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSnapshotsGetallOK, error) { // TODO: Validate the params before sending @@ -159,7 +159,7 @@ func (a *Client) PcloudCloudinstancesSnapshotsGetall(params *PcloudCloudinstance } /* - PcloudCloudinstancesSnapshotsPut updates a p VM instance snapshot +PcloudCloudinstancesSnapshotsPut updates a p VM instance snapshot */ func (a *Client) PcloudCloudinstancesSnapshotsPut(params *PcloudCloudinstancesSnapshotsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesSnapshotsPutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_parameters.go index ce1013739d7..b054bf63742 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesSnapshotsDeleteParamsWithHTTPClient(client *http.Cli } } -/* PcloudCloudinstancesSnapshotsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances snapshots delete operation. +/* +PcloudCloudinstancesSnapshotsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances snapshots delete operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesSnapshotsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go index db473201767..a920f11091e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesSnapshotsDeleteReader) ReadResponse(response runtim return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesSnapshotsDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesSnapshotsDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudCloudinstancesSnapshotsDeleteReader) ReadResponse(response runtim } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}] pcloud.cloudinstances.snapshots.delete", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudCloudinstancesSnapshotsDeleteAccepted() *PcloudCloudinstancesSnaps return &PcloudCloudinstancesSnapshotsDeleteAccepted{} } -/* PcloudCloudinstancesSnapshotsDeleteAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudinstancesSnapshotsDeleteAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +84,44 @@ type PcloudCloudinstancesSnapshotsDeleteAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudinstances snapshots delete accepted response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots delete accepted response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots delete accepted response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances snapshots delete accepted response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots delete accepted response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudinstances snapshots delete accepted response +func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) Code() int { + return 202 +} + func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsDeleteAccepted) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudCloudinstancesSnapshotsDeleteBadRequest() *PcloudCloudinstancesSna return &PcloudCloudinstancesSnapshotsDeleteBadRequest{} } -/* PcloudCloudinstancesSnapshotsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesSnapshotsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudCloudinstancesSnapshotsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots delete bad request response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots delete bad request response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots delete bad request response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots delete bad request response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots delete bad request response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances snapshots delete bad request response +func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudCloudinstancesSnapshotsDeleteUnauthorized() *PcloudCloudinstancesS return &PcloudCloudinstancesSnapshotsDeleteUnauthorized{} } -/* PcloudCloudinstancesSnapshotsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesSnapshotsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudCloudinstancesSnapshotsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots delete unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots delete unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots delete unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots delete unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots delete unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances snapshots delete unauthorized response +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ func (o *PcloudCloudinstancesSnapshotsDeleteUnauthorized) readResponse(response return nil } +// NewPcloudCloudinstancesSnapshotsDeleteForbidden creates a PcloudCloudinstancesSnapshotsDeleteForbidden with default headers values +func NewPcloudCloudinstancesSnapshotsDeleteForbidden() *PcloudCloudinstancesSnapshotsDeleteForbidden { + return &PcloudCloudinstancesSnapshotsDeleteForbidden{} +} + +/* +PcloudCloudinstancesSnapshotsDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesSnapshotsDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances snapshots delete forbidden response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots delete forbidden response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots delete forbidden response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots delete forbidden response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots delete forbidden response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances snapshots delete forbidden response +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSnapshotsDeleteForbidden) 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 +} + // NewPcloudCloudinstancesSnapshotsDeleteNotFound creates a PcloudCloudinstancesSnapshotsDeleteNotFound with default headers values func NewPcloudCloudinstancesSnapshotsDeleteNotFound() *PcloudCloudinstancesSnapshotsDeleteNotFound { return &PcloudCloudinstancesSnapshotsDeleteNotFound{} } -/* PcloudCloudinstancesSnapshotsDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesSnapshotsDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudCloudinstancesSnapshotsDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots delete not found response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots delete not found response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots delete not found response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots delete not found response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots delete not found response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances snapshots delete not found response +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudCloudinstancesSnapshotsDeleteGone() *PcloudCloudinstancesSnapshots return &PcloudCloudinstancesSnapshotsDeleteGone{} } -/* PcloudCloudinstancesSnapshotsDeleteGone describes a response with status code 410, with default header values. +/* +PcloudCloudinstancesSnapshotsDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -203,9 +422,44 @@ type PcloudCloudinstancesSnapshotsDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots delete gone response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots delete gone response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots delete gone response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots delete gone response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots delete gone response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud cloudinstances snapshots delete gone response +func (o *PcloudCloudinstancesSnapshotsDeleteGone) Code() int { + return 410 +} + func (o *PcloudCloudinstancesSnapshotsDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudCloudinstancesSnapshotsDeleteInternalServerError() *PcloudCloudins return &PcloudCloudinstancesSnapshotsDeleteInternalServerError{} } -/* PcloudCloudinstancesSnapshotsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesSnapshotsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudCloudinstancesSnapshotsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots delete internal server error response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots delete internal server error response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots delete internal server error response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances snapshots delete internal server error response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances snapshots delete internal server error response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances snapshots delete internal server error response +func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_parameters.go index 58857dc0eb0..d7c7a54ead9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesSnapshotsGetParamsWithHTTPClient(client *http.Client } } -/* PcloudCloudinstancesSnapshotsGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances snapshots get operation. +/* +PcloudCloudinstancesSnapshotsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances snapshots get operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesSnapshotsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go index 44ebe00012a..336535923ff 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesSnapshotsGetReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesSnapshotsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesSnapshotsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesSnapshotsGetReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}] pcloud.cloudinstances.snapshots.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesSnapshotsGetOK() *PcloudCloudinstancesSnapshotsGetOK return &PcloudCloudinstancesSnapshotsGetOK{} } -/* PcloudCloudinstancesSnapshotsGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesSnapshotsGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesSnapshotsGetOK struct { Payload *models.Snapshot } +// IsSuccess returns true when this pcloud cloudinstances snapshots get o k response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots get o k response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots get o k response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances snapshots get o k response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots get o k response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances snapshots get o k response +func (o *PcloudCloudinstancesSnapshotsGetOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesSnapshotsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetOK) GetPayload() *models.Snapshot { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesSnapshotsGetBadRequest() *PcloudCloudinstancesSnapsh return &PcloudCloudinstancesSnapshotsGetBadRequest{} } -/* PcloudCloudinstancesSnapshotsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesSnapshotsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesSnapshotsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots get bad request response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots get bad request response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots get bad request response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots get bad request response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots get bad request response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances snapshots get bad request response +func (o *PcloudCloudinstancesSnapshotsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesSnapshotsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesSnapshotsGetUnauthorized() *PcloudCloudinstancesSnap return &PcloudCloudinstancesSnapshotsGetUnauthorized{} } -/* PcloudCloudinstancesSnapshotsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesSnapshotsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesSnapshotsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots get unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots get unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots get unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots get unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots get unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances snapshots get unauthorized response +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudCloudinstancesSnapshotsGetUnauthorized) readResponse(response run return nil } +// NewPcloudCloudinstancesSnapshotsGetForbidden creates a PcloudCloudinstancesSnapshotsGetForbidden with default headers values +func NewPcloudCloudinstancesSnapshotsGetForbidden() *PcloudCloudinstancesSnapshotsGetForbidden { + return &PcloudCloudinstancesSnapshotsGetForbidden{} +} + +/* +PcloudCloudinstancesSnapshotsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesSnapshotsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances snapshots get forbidden response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots get forbidden response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots get forbidden response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots get forbidden response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots get forbidden response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances snapshots get forbidden response +func (o *PcloudCloudinstancesSnapshotsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesSnapshotsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSnapshotsGetForbidden) 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 +} + // NewPcloudCloudinstancesSnapshotsGetNotFound creates a PcloudCloudinstancesSnapshotsGetNotFound with default headers values func NewPcloudCloudinstancesSnapshotsGetNotFound() *PcloudCloudinstancesSnapshotsGetNotFound { return &PcloudCloudinstancesSnapshotsGetNotFound{} } -/* PcloudCloudinstancesSnapshotsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesSnapshotsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesSnapshotsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots get not found response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots get not found response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots get not found response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots get not found response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots get not found response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances snapshots get not found response +func (o *PcloudCloudinstancesSnapshotsGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesSnapshotsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesSnapshotsGetInternalServerError() *PcloudCloudinstan return &PcloudCloudinstancesSnapshotsGetInternalServerError{} } -/* PcloudCloudinstancesSnapshotsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesSnapshotsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesSnapshotsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots get internal server error response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots get internal server error response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots get internal server error response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances snapshots get internal server error response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances snapshots get internal server error response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances snapshots get internal server error response +func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_parameters.go index 281b70623c3..dcb111dc0e7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesSnapshotsGetallParamsWithHTTPClient(client *http.Cli } } -/* PcloudCloudinstancesSnapshotsGetallParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances snapshots getall operation. +/* +PcloudCloudinstancesSnapshotsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances snapshots getall operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesSnapshotsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go index c4dee1b560f..5cf8680ef37 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudCloudinstancesSnapshotsGetallReader) ReadResponse(response runtim return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesSnapshotsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -48,7 +60,7 @@ func (o *PcloudCloudinstancesSnapshotsGetallReader) ReadResponse(response runtim } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots] pcloud.cloudinstances.snapshots.getall", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudCloudinstancesSnapshotsGetallOK() *PcloudCloudinstancesSnapshotsGe return &PcloudCloudinstancesSnapshotsGetallOK{} } -/* PcloudCloudinstancesSnapshotsGetallOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesSnapshotsGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudCloudinstancesSnapshotsGetallOK struct { Payload *models.Snapshots } +// IsSuccess returns true when this pcloud cloudinstances snapshots getall o k response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots getall o k response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots getall o k response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances snapshots getall o k response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots getall o k response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances snapshots getall o k response +func (o *PcloudCloudinstancesSnapshotsGetallOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesSnapshotsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetallOK) GetPayload() *models.Snapshots { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudCloudinstancesSnapshotsGetallBadRequest() *PcloudCloudinstancesSna return &PcloudCloudinstancesSnapshotsGetallBadRequest{} } -/* PcloudCloudinstancesSnapshotsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesSnapshotsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudCloudinstancesSnapshotsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots getall bad request response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots getall bad request response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots getall bad request response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots getall bad request response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots getall bad request response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances snapshots getall bad request response +func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudCloudinstancesSnapshotsGetallUnauthorized() *PcloudCloudinstancesS return &PcloudCloudinstancesSnapshotsGetallUnauthorized{} } -/* PcloudCloudinstancesSnapshotsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesSnapshotsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudCloudinstancesSnapshotsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots getall unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots getall unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots getall unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots getall unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots getall unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances snapshots getall unauthorized response +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudCloudinstancesSnapshotsGetallUnauthorized) readResponse(response return nil } +// NewPcloudCloudinstancesSnapshotsGetallForbidden creates a PcloudCloudinstancesSnapshotsGetallForbidden with default headers values +func NewPcloudCloudinstancesSnapshotsGetallForbidden() *PcloudCloudinstancesSnapshotsGetallForbidden { + return &PcloudCloudinstancesSnapshotsGetallForbidden{} +} + +/* +PcloudCloudinstancesSnapshotsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesSnapshotsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances snapshots getall forbidden response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots getall forbidden response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots getall forbidden response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots getall forbidden response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots getall forbidden response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances snapshots getall forbidden response +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSnapshotsGetallForbidden) 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 +} + +// 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{} } -/* PcloudCloudinstancesSnapshotsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesSnapshotsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudCloudinstancesSnapshotsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots getall internal server error response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots getall internal server error response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots getall internal server error response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances snapshots getall internal server error response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances snapshots getall internal server error response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances snapshots getall internal server error response +func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots][%d] pcloudCloudinstancesSnapshotsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_parameters.go index 268a2dfe269..8692b11038c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudinstancesSnapshotsPutParamsWithHTTPClient(client *http.Client } } -/* PcloudCloudinstancesSnapshotsPutParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances snapshots put operation. +/* +PcloudCloudinstancesSnapshotsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances snapshots put operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesSnapshotsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go index 5dd9d99fac8..322ef9e34a7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesSnapshotsPutReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesSnapshotsPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesSnapshotsPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesSnapshotsPutReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}] pcloud.cloudinstances.snapshots.put", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesSnapshotsPutOK() *PcloudCloudinstancesSnapshotsPutOK return &PcloudCloudinstancesSnapshotsPutOK{} } -/* PcloudCloudinstancesSnapshotsPutOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesSnapshotsPutOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesSnapshotsPutOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudinstances snapshots put o k response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots put o k response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots put o k response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances snapshots put o k response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots put o k response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances snapshots put o k response +func (o *PcloudCloudinstancesSnapshotsPutOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesSnapshotsPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsPutOK) GetPayload() models.Object { return o.Payload } @@ -93,7 +135,8 @@ func NewPcloudCloudinstancesSnapshotsPutBadRequest() *PcloudCloudinstancesSnapsh return &PcloudCloudinstancesSnapshotsPutBadRequest{} } -/* PcloudCloudinstancesSnapshotsPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesSnapshotsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +144,44 @@ type PcloudCloudinstancesSnapshotsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots put bad request response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots put bad request response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots put bad request response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots put bad request response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots put bad request response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances snapshots put bad request response +func (o *PcloudCloudinstancesSnapshotsPutBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesSnapshotsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -125,7 +203,8 @@ func NewPcloudCloudinstancesSnapshotsPutUnauthorized() *PcloudCloudinstancesSnap return &PcloudCloudinstancesSnapshotsPutUnauthorized{} } -/* PcloudCloudinstancesSnapshotsPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesSnapshotsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -133,9 +212,44 @@ type PcloudCloudinstancesSnapshotsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots put unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots put unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots put unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots put unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots put unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances snapshots put unauthorized response +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -152,12 +266,81 @@ func (o *PcloudCloudinstancesSnapshotsPutUnauthorized) readResponse(response run return nil } +// NewPcloudCloudinstancesSnapshotsPutForbidden creates a PcloudCloudinstancesSnapshotsPutForbidden with default headers values +func NewPcloudCloudinstancesSnapshotsPutForbidden() *PcloudCloudinstancesSnapshotsPutForbidden { + return &PcloudCloudinstancesSnapshotsPutForbidden{} +} + +/* +PcloudCloudinstancesSnapshotsPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesSnapshotsPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances snapshots put forbidden response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots put forbidden response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots put forbidden response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots put forbidden response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots put forbidden response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances snapshots put forbidden response +func (o *PcloudCloudinstancesSnapshotsPutForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesSnapshotsPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesSnapshotsPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesSnapshotsPutForbidden) 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 +} + // NewPcloudCloudinstancesSnapshotsPutNotFound creates a PcloudCloudinstancesSnapshotsPutNotFound with default headers values func NewPcloudCloudinstancesSnapshotsPutNotFound() *PcloudCloudinstancesSnapshotsPutNotFound { return &PcloudCloudinstancesSnapshotsPutNotFound{} } -/* PcloudCloudinstancesSnapshotsPutNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesSnapshotsPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -165,9 +348,44 @@ type PcloudCloudinstancesSnapshotsPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots put not found response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots put not found response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots put not found response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances snapshots put not found response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances snapshots put not found response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances snapshots put not found response +func (o *PcloudCloudinstancesSnapshotsPutNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesSnapshotsPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -189,7 +407,8 @@ func NewPcloudCloudinstancesSnapshotsPutInternalServerError() *PcloudCloudinstan return &PcloudCloudinstancesSnapshotsPutInternalServerError{} } -/* PcloudCloudinstancesSnapshotsPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesSnapshotsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +416,44 @@ type PcloudCloudinstancesSnapshotsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances snapshots put internal server error response has a 2xx status code +func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances snapshots put internal server error response has a 3xx status code +func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances snapshots put internal server error response has a 4xx status code +func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances snapshots put internal server error response has a 5xx status code +func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances snapshots put internal server error response a status code equal to that given +func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances snapshots put internal server error response +func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/snapshots/{snapshot_id}][%d] pcloudCloudinstancesSnapshotsPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesSnapshotsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go index 061b527297d..cd76cbf1255 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go @@ -42,7 +42,7 @@ type ClientService interface { } /* - PcloudStoragecapacityPoolsGet storages capacity for a storage pool in a region +PcloudStoragecapacityPoolsGet storages capacity for a storage pool in a region */ func (a *Client) PcloudStoragecapacityPoolsGet(params *PcloudStoragecapacityPoolsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudStoragecapacityPoolsGetOK, error) { // TODO: Validate the params before sending @@ -81,7 +81,7 @@ func (a *Client) PcloudStoragecapacityPoolsGet(params *PcloudStoragecapacityPool } /* - PcloudStoragecapacityPoolsGetall storages capacity for all available storage pools in a region +PcloudStoragecapacityPoolsGetall storages capacity for all available storage pools in a region */ func (a *Client) PcloudStoragecapacityPoolsGetall(params *PcloudStoragecapacityPoolsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudStoragecapacityPoolsGetallOK, error) { // TODO: Validate the params before sending @@ -120,7 +120,7 @@ func (a *Client) PcloudStoragecapacityPoolsGetall(params *PcloudStoragecapacityP } /* - PcloudStoragecapacityTypesGet storages capacity for a storage type in a region +PcloudStoragecapacityTypesGet storages capacity for a storage type in a region */ func (a *Client) PcloudStoragecapacityTypesGet(params *PcloudStoragecapacityTypesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudStoragecapacityTypesGetOK, error) { // TODO: Validate the params before sending @@ -159,7 +159,7 @@ func (a *Client) PcloudStoragecapacityTypesGet(params *PcloudStoragecapacityType } /* - PcloudStoragecapacityTypesGetall storages capacity for all available storage types in a region +PcloudStoragecapacityTypesGetall storages capacity for all available storage types in a region */ func (a *Client) PcloudStoragecapacityTypesGetall(params *PcloudStoragecapacityTypesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudStoragecapacityTypesGetallOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_parameters.go index c2d5df80832..685a5b57f09 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudStoragecapacityPoolsGetParamsWithHTTPClient(client *http.Client) * } } -/* PcloudStoragecapacityPoolsGetParams contains all the parameters to send to the API endpoint - for the pcloud storagecapacity pools get operation. +/* +PcloudStoragecapacityPoolsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud storagecapacity pools get operation. + + Typically these are written to a http.Request. */ type PcloudStoragecapacityPoolsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go index d6abdcf9b65..041ad0f2f2d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go @@ -29,12 +29,24 @@ 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 { return nil, err } return nil, result + case 403: + result := NewPcloudStoragecapacityPoolsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudStoragecapacityPoolsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudStoragecapacityPoolsGetReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}] pcloud.storagecapacity.pools.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudStoragecapacityPoolsGetOK() *PcloudStoragecapacityPoolsGetOK { return &PcloudStoragecapacityPoolsGetOK{} } -/* PcloudStoragecapacityPoolsGetOK describes a response with status code 200, with default header values. +/* +PcloudStoragecapacityPoolsGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudStoragecapacityPoolsGetOK struct { Payload *models.StoragePoolCapacity } +// IsSuccess returns true when this pcloud storagecapacity pools get o k response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud storagecapacity pools get o k response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools get o k response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud storagecapacity pools get o k response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools get o k response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud storagecapacity pools get o k response +func (o *PcloudStoragecapacityPoolsGetOK) Code() int { + return 200 +} + func (o *PcloudStoragecapacityPoolsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetOK %+v", 200, o.Payload) } + +func (o *PcloudStoragecapacityPoolsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetOK %+v", 200, o.Payload) +} + func (o *PcloudStoragecapacityPoolsGetOK) GetPayload() *models.StoragePoolCapacity { return o.Payload } @@ -84,12 +132,81 @@ 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{} } -/* PcloudStoragecapacityPoolsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudStoragecapacityPoolsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudStoragecapacityPoolsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity pools get unauthorized response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools get unauthorized response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools get unauthorized response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity pools get unauthorized response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools get unauthorized response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud storagecapacity pools get unauthorized response +func (o *PcloudStoragecapacityPoolsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudStoragecapacityPoolsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudStoragecapacityPoolsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudStoragecapacityPoolsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ func (o *PcloudStoragecapacityPoolsGetUnauthorized) readResponse(response runtim return nil } +// NewPcloudStoragecapacityPoolsGetForbidden creates a PcloudStoragecapacityPoolsGetForbidden with default headers values +func NewPcloudStoragecapacityPoolsGetForbidden() *PcloudStoragecapacityPoolsGetForbidden { + return &PcloudStoragecapacityPoolsGetForbidden{} +} + +/* +PcloudStoragecapacityPoolsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudStoragecapacityPoolsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity pools get forbidden response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools get forbidden response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools get forbidden response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity pools get forbidden response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools get forbidden response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud storagecapacity pools get forbidden response +func (o *PcloudStoragecapacityPoolsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudStoragecapacityPoolsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityPoolsGetForbidden) 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 +} + // NewPcloudStoragecapacityPoolsGetNotFound creates a PcloudStoragecapacityPoolsGetNotFound with default headers values func NewPcloudStoragecapacityPoolsGetNotFound() *PcloudStoragecapacityPoolsGetNotFound { return &PcloudStoragecapacityPoolsGetNotFound{} } -/* PcloudStoragecapacityPoolsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudStoragecapacityPoolsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudStoragecapacityPoolsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity pools get not found response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools get not found response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools get not found response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity pools get not found response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools get not found response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud storagecapacity pools get not found response +func (o *PcloudStoragecapacityPoolsGetNotFound) Code() int { + return 404 +} + func (o *PcloudStoragecapacityPoolsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudStoragecapacityPoolsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudStoragecapacityPoolsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudStoragecapacityPoolsGetInternalServerError() *PcloudStoragecapacit return &PcloudStoragecapacityPoolsGetInternalServerError{} } -/* PcloudStoragecapacityPoolsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudStoragecapacityPoolsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudStoragecapacityPoolsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity pools get internal server error response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools get internal server error response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools get internal server error response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud storagecapacity pools get internal server error response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud storagecapacity pools get internal server error response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud storagecapacity pools get internal server error response +func (o *PcloudStoragecapacityPoolsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudStoragecapacityPoolsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudStoragecapacityPoolsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools/{storage_pool_name}][%d] pcloudStoragecapacityPoolsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudStoragecapacityPoolsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_parameters.go index e955e007b4b..4b3075cde9f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudStoragecapacityPoolsGetallParamsWithHTTPClient(client *http.Client } } -/* PcloudStoragecapacityPoolsGetallParams contains all the parameters to send to the API endpoint - for the pcloud storagecapacity pools getall operation. +/* +PcloudStoragecapacityPoolsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud storagecapacity pools getall operation. + + Typically these are written to a http.Request. */ type PcloudStoragecapacityPoolsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go index 6aa16ffe92c..100879044c5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go @@ -29,12 +29,30 @@ 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 { return nil, err } return nil, result + case 403: + result := NewPcloudStoragecapacityPoolsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -42,7 +60,7 @@ func (o *PcloudStoragecapacityPoolsGetallReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools] pcloud.storagecapacity.pools.getall", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewPcloudStoragecapacityPoolsGetallOK() *PcloudStoragecapacityPoolsGetallOK return &PcloudStoragecapacityPoolsGetallOK{} } -/* PcloudStoragecapacityPoolsGetallOK describes a response with status code 200, with default header values. +/* +PcloudStoragecapacityPoolsGetallOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type PcloudStoragecapacityPoolsGetallOK struct { Payload *models.StoragePoolsCapacity } +// IsSuccess returns true when this pcloud storagecapacity pools getall o k response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud storagecapacity pools getall o k response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools getall o k response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud storagecapacity pools getall o k response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools getall o k response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud storagecapacity pools getall o k response +func (o *PcloudStoragecapacityPoolsGetallOK) Code() int { + return 200 +} + func (o *PcloudStoragecapacityPoolsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudStoragecapacityPoolsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudStoragecapacityPoolsGetallOK) GetPayload() *models.StoragePoolsCapacity { return o.Payload } @@ -78,12 +132,81 @@ 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{} } -/* PcloudStoragecapacityPoolsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudStoragecapacityPoolsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -91,9 +214,44 @@ type PcloudStoragecapacityPoolsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity pools getall unauthorized response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools getall unauthorized response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools getall unauthorized response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity pools getall unauthorized response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools getall unauthorized response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud storagecapacity pools getall unauthorized response +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudStoragecapacityPoolsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudStoragecapacityPoolsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudStoragecapacityPoolsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -110,12 +268,149 @@ func (o *PcloudStoragecapacityPoolsGetallUnauthorized) readResponse(response run return nil } +// NewPcloudStoragecapacityPoolsGetallForbidden creates a PcloudStoragecapacityPoolsGetallForbidden with default headers values +func NewPcloudStoragecapacityPoolsGetallForbidden() *PcloudStoragecapacityPoolsGetallForbidden { + return &PcloudStoragecapacityPoolsGetallForbidden{} +} + +/* +PcloudStoragecapacityPoolsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudStoragecapacityPoolsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity pools getall forbidden response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools getall forbidden response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools getall forbidden response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity pools getall forbidden response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity pools getall forbidden response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud storagecapacity pools getall forbidden response +func (o *PcloudStoragecapacityPoolsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudStoragecapacityPoolsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudStoragecapacityPoolsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityPoolsGetallForbidden) 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 +} + +// 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{} } -/* PcloudStoragecapacityPoolsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudStoragecapacityPoolsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +418,44 @@ type PcloudStoragecapacityPoolsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity pools getall internal server error response has a 2xx status code +func (o *PcloudStoragecapacityPoolsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity pools getall internal server error response has a 3xx status code +func (o *PcloudStoragecapacityPoolsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity pools getall internal server error response has a 4xx status code +func (o *PcloudStoragecapacityPoolsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud storagecapacity pools getall internal server error response has a 5xx status code +func (o *PcloudStoragecapacityPoolsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud storagecapacity pools getall internal server error response a status code equal to that given +func (o *PcloudStoragecapacityPoolsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud storagecapacity pools getall internal server error response +func (o *PcloudStoragecapacityPoolsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudStoragecapacityPoolsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudStoragecapacityPoolsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-pools][%d] pcloudStoragecapacityPoolsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudStoragecapacityPoolsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_parameters.go index 51f3bb9b40d..a39e232a36e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudStoragecapacityTypesGetParamsWithHTTPClient(client *http.Client) * } } -/* PcloudStoragecapacityTypesGetParams contains all the parameters to send to the API endpoint - for the pcloud storagecapacity types get operation. +/* +PcloudStoragecapacityTypesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud storagecapacity types get operation. + + Typically these are written to a http.Request. */ type PcloudStoragecapacityTypesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go index 3623f47c005..9b491a303f9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go @@ -29,12 +29,24 @@ 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 { return nil, err } return nil, result + case 403: + result := NewPcloudStoragecapacityTypesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudStoragecapacityTypesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudStoragecapacityTypesGetReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}] pcloud.storagecapacity.types.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudStoragecapacityTypesGetOK() *PcloudStoragecapacityTypesGetOK { return &PcloudStoragecapacityTypesGetOK{} } -/* PcloudStoragecapacityTypesGetOK describes a response with status code 200, with default header values. +/* +PcloudStoragecapacityTypesGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudStoragecapacityTypesGetOK struct { Payload *models.StorageTypeCapacity } +// IsSuccess returns true when this pcloud storagecapacity types get o k response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud storagecapacity types get o k response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types get o k response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud storagecapacity types get o k response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types get o k response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud storagecapacity types get o k response +func (o *PcloudStoragecapacityTypesGetOK) Code() int { + return 200 +} + func (o *PcloudStoragecapacityTypesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetOK %+v", 200, o.Payload) } + +func (o *PcloudStoragecapacityTypesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetOK %+v", 200, o.Payload) +} + func (o *PcloudStoragecapacityTypesGetOK) GetPayload() *models.StorageTypeCapacity { return o.Payload } @@ -84,12 +132,81 @@ 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{} } -/* PcloudStoragecapacityTypesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudStoragecapacityTypesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -97,9 +214,44 @@ type PcloudStoragecapacityTypesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity types get unauthorized response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types get unauthorized response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types get unauthorized response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity types get unauthorized response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types get unauthorized response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud storagecapacity types get unauthorized response +func (o *PcloudStoragecapacityTypesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudStoragecapacityTypesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudStoragecapacityTypesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudStoragecapacityTypesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -116,12 +268,81 @@ func (o *PcloudStoragecapacityTypesGetUnauthorized) readResponse(response runtim return nil } +// NewPcloudStoragecapacityTypesGetForbidden creates a PcloudStoragecapacityTypesGetForbidden with default headers values +func NewPcloudStoragecapacityTypesGetForbidden() *PcloudStoragecapacityTypesGetForbidden { + return &PcloudStoragecapacityTypesGetForbidden{} +} + +/* +PcloudStoragecapacityTypesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudStoragecapacityTypesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity types get forbidden response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types get forbidden response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types get forbidden response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity types get forbidden response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types get forbidden response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud storagecapacity types get forbidden response +func (o *PcloudStoragecapacityTypesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudStoragecapacityTypesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityTypesGetForbidden) 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 +} + // NewPcloudStoragecapacityTypesGetNotFound creates a PcloudStoragecapacityTypesGetNotFound with default headers values func NewPcloudStoragecapacityTypesGetNotFound() *PcloudStoragecapacityTypesGetNotFound { return &PcloudStoragecapacityTypesGetNotFound{} } -/* PcloudStoragecapacityTypesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudStoragecapacityTypesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudStoragecapacityTypesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity types get not found response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types get not found response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types get not found response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity types get not found response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types get not found response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud storagecapacity types get not found response +func (o *PcloudStoragecapacityTypesGetNotFound) Code() int { + return 404 +} + func (o *PcloudStoragecapacityTypesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudStoragecapacityTypesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudStoragecapacityTypesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudStoragecapacityTypesGetInternalServerError() *PcloudStoragecapacit return &PcloudStoragecapacityTypesGetInternalServerError{} } -/* PcloudStoragecapacityTypesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudStoragecapacityTypesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudStoragecapacityTypesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity types get internal server error response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types get internal server error response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types get internal server error response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud storagecapacity types get internal server error response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud storagecapacity types get internal server error response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud storagecapacity types get internal server error response +func (o *PcloudStoragecapacityTypesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudStoragecapacityTypesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudStoragecapacityTypesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types/{storage_type_name}][%d] pcloudStoragecapacityTypesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudStoragecapacityTypesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_parameters.go index 50519ea2e9a..62a3922f434 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudStoragecapacityTypesGetallParamsWithHTTPClient(client *http.Client } } -/* PcloudStoragecapacityTypesGetallParams contains all the parameters to send to the API endpoint - for the pcloud storagecapacity types getall operation. +/* +PcloudStoragecapacityTypesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud storagecapacity types getall operation. + + Typically these are written to a http.Request. */ type PcloudStoragecapacityTypesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go index 97595cd310d..5017388036f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go @@ -29,12 +29,30 @@ 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 { return nil, err } return nil, result + case 403: + result := NewPcloudStoragecapacityTypesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -42,7 +60,7 @@ func (o *PcloudStoragecapacityTypesGetallReader) ReadResponse(response runtime.C } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types] pcloud.storagecapacity.types.getall", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewPcloudStoragecapacityTypesGetallOK() *PcloudStoragecapacityTypesGetallOK return &PcloudStoragecapacityTypesGetallOK{} } -/* PcloudStoragecapacityTypesGetallOK describes a response with status code 200, with default header values. +/* +PcloudStoragecapacityTypesGetallOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type PcloudStoragecapacityTypesGetallOK struct { Payload *models.StorageTypesCapacity } +// IsSuccess returns true when this pcloud storagecapacity types getall o k response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud storagecapacity types getall o k response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types getall o k response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud storagecapacity types getall o k response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types getall o k response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud storagecapacity types getall o k response +func (o *PcloudStoragecapacityTypesGetallOK) Code() int { + return 200 +} + func (o *PcloudStoragecapacityTypesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudStoragecapacityTypesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudStoragecapacityTypesGetallOK) GetPayload() *models.StorageTypesCapacity { return o.Payload } @@ -78,12 +132,81 @@ 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{} } -/* PcloudStoragecapacityTypesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudStoragecapacityTypesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -91,9 +214,44 @@ type PcloudStoragecapacityTypesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity types getall unauthorized response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types getall unauthorized response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types getall unauthorized response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity types getall unauthorized response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types getall unauthorized response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud storagecapacity types getall unauthorized response +func (o *PcloudStoragecapacityTypesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudStoragecapacityTypesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudStoragecapacityTypesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudStoragecapacityTypesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -110,12 +268,149 @@ func (o *PcloudStoragecapacityTypesGetallUnauthorized) readResponse(response run return nil } +// NewPcloudStoragecapacityTypesGetallForbidden creates a PcloudStoragecapacityTypesGetallForbidden with default headers values +func NewPcloudStoragecapacityTypesGetallForbidden() *PcloudStoragecapacityTypesGetallForbidden { + return &PcloudStoragecapacityTypesGetallForbidden{} +} + +/* +PcloudStoragecapacityTypesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudStoragecapacityTypesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud storagecapacity types getall forbidden response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types getall forbidden response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types getall forbidden response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud storagecapacity types getall forbidden response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud storagecapacity types getall forbidden response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud storagecapacity types getall forbidden response +func (o *PcloudStoragecapacityTypesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudStoragecapacityTypesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudStoragecapacityTypesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudStoragecapacityTypesGetallForbidden) 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 +} + +// 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{} } -/* PcloudStoragecapacityTypesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudStoragecapacityTypesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -123,9 +418,44 @@ type PcloudStoragecapacityTypesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud storagecapacity types getall internal server error response has a 2xx status code +func (o *PcloudStoragecapacityTypesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud storagecapacity types getall internal server error response has a 3xx status code +func (o *PcloudStoragecapacityTypesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud storagecapacity types getall internal server error response has a 4xx status code +func (o *PcloudStoragecapacityTypesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud storagecapacity types getall internal server error response has a 5xx status code +func (o *PcloudStoragecapacityTypesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud storagecapacity types getall internal server error response a status code equal to that given +func (o *PcloudStoragecapacityTypesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud storagecapacity types getall internal server error response +func (o *PcloudStoragecapacityTypesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudStoragecapacityTypesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudStoragecapacityTypesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-capacity/storage-types][%d] pcloudStoragecapacityTypesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudStoragecapacityTypesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go new file mode 100644 index 00000000000..b1185a8c6a0 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/p_cloud_storage_tiers_client.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_storage_tiers + +// 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 p cloud storage tiers API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for p cloud storage tiers 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 { + PcloudCloudinstancesStoragetiersGetall(params *PcloudCloudinstancesStoragetiersGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesStoragetiersGetallOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +PcloudCloudinstancesStoragetiersGetall lists all supported storage tiers for this cloud instance +*/ +func (a *Client) PcloudCloudinstancesStoragetiersGetall(params *PcloudCloudinstancesStoragetiersGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesStoragetiersGetallOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPcloudCloudinstancesStoragetiersGetallParams() + } + op := &runtime.ClientOperation{ + ID: "pcloud.cloudinstances.storagetiers.getall", + Method: "GET", + PathPattern: "/pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PcloudCloudinstancesStoragetiersGetallReader{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.(*PcloudCloudinstancesStoragetiersGetallOK) + 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 pcloud.cloudinstances.storagetiers.getall: 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_parameters.go new file mode 100644 index 00000000000..9dd21061160 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_storage_tiers + +// 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" +) + +// NewPcloudCloudinstancesStoragetiersGetallParams creates a new PcloudCloudinstancesStoragetiersGetallParams 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 NewPcloudCloudinstancesStoragetiersGetallParams() *PcloudCloudinstancesStoragetiersGetallParams { + return &PcloudCloudinstancesStoragetiersGetallParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewPcloudCloudinstancesStoragetiersGetallParamsWithTimeout creates a new PcloudCloudinstancesStoragetiersGetallParams object +// with the ability to set a timeout on a request. +func NewPcloudCloudinstancesStoragetiersGetallParamsWithTimeout(timeout time.Duration) *PcloudCloudinstancesStoragetiersGetallParams { + return &PcloudCloudinstancesStoragetiersGetallParams{ + timeout: timeout, + } +} + +// NewPcloudCloudinstancesStoragetiersGetallParamsWithContext creates a new PcloudCloudinstancesStoragetiersGetallParams object +// with the ability to set a context for a request. +func NewPcloudCloudinstancesStoragetiersGetallParamsWithContext(ctx context.Context) *PcloudCloudinstancesStoragetiersGetallParams { + return &PcloudCloudinstancesStoragetiersGetallParams{ + Context: ctx, + } +} + +// NewPcloudCloudinstancesStoragetiersGetallParamsWithHTTPClient creates a new PcloudCloudinstancesStoragetiersGetallParams object +// with the ability to set a custom HTTPClient for a request. +func NewPcloudCloudinstancesStoragetiersGetallParamsWithHTTPClient(client *http.Client) *PcloudCloudinstancesStoragetiersGetallParams { + return &PcloudCloudinstancesStoragetiersGetallParams{ + HTTPClient: client, + } +} + +/* +PcloudCloudinstancesStoragetiersGetallParams contains all the parameters to send to the API endpoint + + for the pcloud cloudinstances storagetiers getall operation. + + Typically these are written to a http.Request. +*/ +type PcloudCloudinstancesStoragetiersGetallParams struct { + + /* CloudInstanceID. + + Cloud Instance ID of a PCloud Instance + */ + CloudInstanceID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the pcloud cloudinstances storagetiers getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudCloudinstancesStoragetiersGetallParams) WithDefaults() *PcloudCloudinstancesStoragetiersGetallParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pcloud cloudinstances storagetiers getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PcloudCloudinstancesStoragetiersGetallParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the pcloud cloudinstances storagetiers getall params +func (o *PcloudCloudinstancesStoragetiersGetallParams) WithTimeout(timeout time.Duration) *PcloudCloudinstancesStoragetiersGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the pcloud cloudinstances storagetiers getall params +func (o *PcloudCloudinstancesStoragetiersGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the pcloud cloudinstances storagetiers getall params +func (o *PcloudCloudinstancesStoragetiersGetallParams) WithContext(ctx context.Context) *PcloudCloudinstancesStoragetiersGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the pcloud cloudinstances storagetiers getall params +func (o *PcloudCloudinstancesStoragetiersGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the pcloud cloudinstances storagetiers getall params +func (o *PcloudCloudinstancesStoragetiersGetallParams) WithHTTPClient(client *http.Client) *PcloudCloudinstancesStoragetiersGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the pcloud cloudinstances storagetiers getall params +func (o *PcloudCloudinstancesStoragetiersGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudInstanceID adds the cloudInstanceID to the pcloud cloudinstances storagetiers getall params +func (o *PcloudCloudinstancesStoragetiersGetallParams) WithCloudInstanceID(cloudInstanceID string) *PcloudCloudinstancesStoragetiersGetallParams { + o.SetCloudInstanceID(cloudInstanceID) + return o +} + +// SetCloudInstanceID adds the cloudInstanceId to the pcloud cloudinstances storagetiers getall params +func (o *PcloudCloudinstancesStoragetiersGetallParams) SetCloudInstanceID(cloudInstanceID string) { + o.CloudInstanceID = cloudInstanceID +} + +// WriteToRequest writes these params to a swagger request +func (o *PcloudCloudinstancesStoragetiersGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud_instance_id + if err := r.SetPathParam("cloud_instance_id", o.CloudInstanceID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go new file mode 100644 index 00000000000..e74971ae94b --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers/pcloud_cloudinstances_storagetiers_getall_responses.go @@ -0,0 +1,471 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package p_cloud_storage_tiers + +// 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" +) + +// PcloudCloudinstancesStoragetiersGetallReader is a Reader for the PcloudCloudinstancesStoragetiersGetall structure. +type PcloudCloudinstancesStoragetiersGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PcloudCloudinstancesStoragetiersGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPcloudCloudinstancesStoragetiersGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewPcloudCloudinstancesStoragetiersGetallBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 401: + result := NewPcloudCloudinstancesStoragetiersGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers] pcloud.cloudinstances.storagetiers.getall", response, response.Code()) + } +} + +// NewPcloudCloudinstancesStoragetiersGetallOK creates a PcloudCloudinstancesStoragetiersGetallOK with default headers values +func NewPcloudCloudinstancesStoragetiersGetallOK() *PcloudCloudinstancesStoragetiersGetallOK { + return &PcloudCloudinstancesStoragetiersGetallOK{} +} + +/* +PcloudCloudinstancesStoragetiersGetallOK describes a response with status code 200, with default header values. + +OK +*/ +type PcloudCloudinstancesStoragetiersGetallOK struct { + Payload models.RegionStorageTiers +} + +// IsSuccess returns true when this pcloud cloudinstances storagetiers getall o k response has a 2xx status code +func (o *PcloudCloudinstancesStoragetiersGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances storagetiers getall o k response has a 3xx status code +func (o *PcloudCloudinstancesStoragetiersGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances storagetiers getall o k response has a 4xx status code +func (o *PcloudCloudinstancesStoragetiersGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances storagetiers getall o k response has a 5xx status code +func (o *PcloudCloudinstancesStoragetiersGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances storagetiers getall o k response a status code equal to that given +func (o *PcloudCloudinstancesStoragetiersGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances storagetiers getall o k response +func (o *PcloudCloudinstancesStoragetiersGetallOK) Code() int { + return 200 +} + +func (o *PcloudCloudinstancesStoragetiersGetallOK) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallOK %+v", 200, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallOK %+v", 200, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallOK) GetPayload() models.RegionStorageTiers { + return o.Payload +} + +func (o *PcloudCloudinstancesStoragetiersGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPcloudCloudinstancesStoragetiersGetallBadRequest creates a PcloudCloudinstancesStoragetiersGetallBadRequest with default headers values +func NewPcloudCloudinstancesStoragetiersGetallBadRequest() *PcloudCloudinstancesStoragetiersGetallBadRequest { + return &PcloudCloudinstancesStoragetiersGetallBadRequest{} +} + +/* +PcloudCloudinstancesStoragetiersGetallBadRequest describes a response with status code 400, with default header values. + +Bad Request +*/ +type PcloudCloudinstancesStoragetiersGetallBadRequest struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances storagetiers getall bad request response has a 2xx status code +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances storagetiers getall bad request response has a 3xx status code +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances storagetiers getall bad request response has a 4xx status code +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances storagetiers getall bad request response has a 5xx status code +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances storagetiers getall bad request response a status code equal to that given +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances storagetiers getall bad request response +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) Code() int { + return 400 +} + +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallBadRequest %+v", 400, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesStoragetiersGetallBadRequest) 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 +} + +// NewPcloudCloudinstancesStoragetiersGetallUnauthorized creates a PcloudCloudinstancesStoragetiersGetallUnauthorized with default headers values +func NewPcloudCloudinstancesStoragetiersGetallUnauthorized() *PcloudCloudinstancesStoragetiersGetallUnauthorized { + return &PcloudCloudinstancesStoragetiersGetallUnauthorized{} +} + +/* +PcloudCloudinstancesStoragetiersGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type PcloudCloudinstancesStoragetiersGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances storagetiers getall unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances storagetiers getall unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances storagetiers getall unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances storagetiers getall unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances storagetiers getall unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances storagetiers getall unauthorized response +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) Code() int { + return 401 +} + +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesStoragetiersGetallUnauthorized) 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 +} + +// 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{} +} + +/* +PcloudCloudinstancesStoragetiersGetallInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type PcloudCloudinstancesStoragetiersGetallInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances storagetiers getall internal server error response has a 2xx status code +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances storagetiers getall internal server error response has a 3xx status code +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances storagetiers getall internal server error response has a 4xx status code +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances storagetiers getall internal server error response has a 5xx status code +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances storagetiers getall internal server error response a status code equal to that given +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances storagetiers getall internal server error response +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) Code() int { + return 500 +} + +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers][%d] pcloudCloudinstancesStoragetiersGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesStoragetiersGetallInternalServerError) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go index a94da9c21e4..a2c33346991 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - PcloudSystempoolsGet lists of available system pools within a particular data center +PcloudSystempoolsGet lists of available system pools within a particular data center */ func (a *Client) PcloudSystempoolsGet(params *PcloudSystempoolsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudSystempoolsGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_parameters.go index a727b64e5b0..13617473993 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudSystempoolsGetParamsWithHTTPClient(client *http.Client) *PcloudSys } } -/* PcloudSystempoolsGetParams contains all the parameters to send to the API endpoint - for the pcloud systempools get operation. +/* +PcloudSystempoolsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud systempools get operation. + + Typically these are written to a http.Request. */ type PcloudSystempoolsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go index 78089d7a0f4..f354158d1f9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go @@ -29,12 +29,30 @@ 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 { return nil, err } return nil, result + case 403: + result := NewPcloudSystempoolsGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -42,7 +60,7 @@ func (o *PcloudSystempoolsGetReader) ReadResponse(response runtime.ClientRespons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools] pcloud.systempools.get", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewPcloudSystempoolsGetOK() *PcloudSystempoolsGetOK { return &PcloudSystempoolsGetOK{} } -/* PcloudSystempoolsGetOK describes a response with status code 200, with default header values. +/* +PcloudSystempoolsGetOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type PcloudSystempoolsGetOK struct { Payload models.SystemPools } +// IsSuccess returns true when this pcloud systempools get o k response has a 2xx status code +func (o *PcloudSystempoolsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud systempools get o k response has a 3xx status code +func (o *PcloudSystempoolsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud systempools get o k response has a 4xx status code +func (o *PcloudSystempoolsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud systempools get o k response has a 5xx status code +func (o *PcloudSystempoolsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud systempools get o k response a status code equal to that given +func (o *PcloudSystempoolsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud systempools get o k response +func (o *PcloudSystempoolsGetOK) Code() int { + return 200 +} + func (o *PcloudSystempoolsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetOK %+v", 200, o.Payload) } + +func (o *PcloudSystempoolsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetOK %+v", 200, o.Payload) +} + func (o *PcloudSystempoolsGetOK) GetPayload() models.SystemPools { return o.Payload } @@ -76,12 +130,81 @@ 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{} } -/* PcloudSystempoolsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudSystempoolsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -89,9 +212,44 @@ type PcloudSystempoolsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud systempools get unauthorized response has a 2xx status code +func (o *PcloudSystempoolsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud systempools get unauthorized response has a 3xx status code +func (o *PcloudSystempoolsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud systempools get unauthorized response has a 4xx status code +func (o *PcloudSystempoolsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud systempools get unauthorized response has a 5xx status code +func (o *PcloudSystempoolsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud systempools get unauthorized response a status code equal to that given +func (o *PcloudSystempoolsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud systempools get unauthorized response +func (o *PcloudSystempoolsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudSystempoolsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudSystempoolsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudSystempoolsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -108,12 +266,149 @@ func (o *PcloudSystempoolsGetUnauthorized) readResponse(response runtime.ClientR return nil } +// NewPcloudSystempoolsGetForbidden creates a PcloudSystempoolsGetForbidden with default headers values +func NewPcloudSystempoolsGetForbidden() *PcloudSystempoolsGetForbidden { + return &PcloudSystempoolsGetForbidden{} +} + +/* +PcloudSystempoolsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudSystempoolsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud systempools get forbidden response has a 2xx status code +func (o *PcloudSystempoolsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud systempools get forbidden response has a 3xx status code +func (o *PcloudSystempoolsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud systempools get forbidden response has a 4xx status code +func (o *PcloudSystempoolsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud systempools get forbidden response has a 5xx status code +func (o *PcloudSystempoolsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud systempools get forbidden response a status code equal to that given +func (o *PcloudSystempoolsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud systempools get forbidden response +func (o *PcloudSystempoolsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudSystempoolsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSystempoolsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudSystempoolsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSystempoolsGetForbidden) 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 +} + +// 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{} } -/* PcloudSystempoolsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudSystempoolsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -121,9 +416,44 @@ type PcloudSystempoolsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud systempools get internal server error response has a 2xx status code +func (o *PcloudSystempoolsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud systempools get internal server error response has a 3xx status code +func (o *PcloudSystempoolsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud systempools get internal server error response has a 4xx status code +func (o *PcloudSystempoolsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud systempools get internal server error response has a 5xx status code +func (o *PcloudSystempoolsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud systempools get internal server error response a status code equal to that given +func (o *PcloudSystempoolsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud systempools get internal server error response +func (o *PcloudSystempoolsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudSystempoolsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudSystempoolsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/system-pools][%d] pcloudSystempoolsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudSystempoolsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/p_cloud_tasks_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/p_cloud_tasks_client.go index 22d71e5ec92..9327245ffe5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/p_cloud_tasks_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/p_cloud_tasks_client.go @@ -38,7 +38,7 @@ type ClientService interface { } /* - PcloudTasksDelete deletes a task +PcloudTasksDelete deletes a task */ func (a *Client) PcloudTasksDelete(params *PcloudTasksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTasksDeleteOK, error) { // TODO: Validate the params before sending @@ -77,7 +77,7 @@ func (a *Client) PcloudTasksDelete(params *PcloudTasksDeleteParams, authInfo run } /* - PcloudTasksGet gets a task +PcloudTasksGet gets a task */ func (a *Client) PcloudTasksGet(params *PcloudTasksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTasksGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_parameters.go index 641d712bc8a..ad07c23e976 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudTasksDeleteParamsWithHTTPClient(client *http.Client) *PcloudTasksD } } -/* PcloudTasksDeleteParams contains all the parameters to send to the API endpoint - for the pcloud tasks delete operation. +/* +PcloudTasksDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tasks delete operation. + + Typically these are written to a http.Request. */ type PcloudTasksDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go index 63e82c88155..2a53efc4183 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go @@ -41,6 +41,12 @@ func (o *PcloudTasksDeleteReader) ReadResponse(response runtime.ClientResponse, return nil, err } return nil, result + case 403: + result := NewPcloudTasksDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudTasksDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudTasksDeleteReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/tasks/{task_id}] pcloud.tasks.delete", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudTasksDeleteOK() *PcloudTasksDeleteOK { return &PcloudTasksDeleteOK{} } -/* PcloudTasksDeleteOK describes a response with status code 200, with default header values. +/* +PcloudTasksDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudTasksDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud tasks delete o k response has a 2xx status code +func (o *PcloudTasksDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tasks delete o k response has a 3xx status code +func (o *PcloudTasksDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks delete o k response has a 4xx status code +func (o *PcloudTasksDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tasks delete o k response has a 5xx status code +func (o *PcloudTasksDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks delete o k response a status code equal to that given +func (o *PcloudTasksDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tasks delete o k response +func (o *PcloudTasksDeleteOK) Code() int { + return 200 +} + func (o *PcloudTasksDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudTasksDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudTasksDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudTasksDeleteBadRequest() *PcloudTasksDeleteBadRequest { return &PcloudTasksDeleteBadRequest{} } -/* PcloudTasksDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudTasksDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudTasksDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks delete bad request response has a 2xx status code +func (o *PcloudTasksDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks delete bad request response has a 3xx status code +func (o *PcloudTasksDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks delete bad request response has a 4xx status code +func (o *PcloudTasksDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks delete bad request response has a 5xx status code +func (o *PcloudTasksDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks delete bad request response a status code equal to that given +func (o *PcloudTasksDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tasks delete bad request response +func (o *PcloudTasksDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudTasksDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTasksDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTasksDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudTasksDeleteUnauthorized() *PcloudTasksDeleteUnauthorized { return &PcloudTasksDeleteUnauthorized{} } -/* PcloudTasksDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTasksDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudTasksDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks delete unauthorized response has a 2xx status code +func (o *PcloudTasksDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks delete unauthorized response has a 3xx status code +func (o *PcloudTasksDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks delete unauthorized response has a 4xx status code +func (o *PcloudTasksDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks delete unauthorized response has a 5xx status code +func (o *PcloudTasksDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks delete unauthorized response a status code equal to that given +func (o *PcloudTasksDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tasks delete unauthorized response +func (o *PcloudTasksDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudTasksDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTasksDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTasksDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -158,12 +272,81 @@ func (o *PcloudTasksDeleteUnauthorized) readResponse(response runtime.ClientResp return nil } +// NewPcloudTasksDeleteForbidden creates a PcloudTasksDeleteForbidden with default headers values +func NewPcloudTasksDeleteForbidden() *PcloudTasksDeleteForbidden { + return &PcloudTasksDeleteForbidden{} +} + +/* +PcloudTasksDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudTasksDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tasks delete forbidden response has a 2xx status code +func (o *PcloudTasksDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks delete forbidden response has a 3xx status code +func (o *PcloudTasksDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks delete forbidden response has a 4xx status code +func (o *PcloudTasksDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks delete forbidden response has a 5xx status code +func (o *PcloudTasksDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks delete forbidden response a status code equal to that given +func (o *PcloudTasksDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tasks delete forbidden response +func (o *PcloudTasksDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudTasksDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTasksDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTasksDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTasksDeleteForbidden) 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 +} + // NewPcloudTasksDeleteNotFound creates a PcloudTasksDeleteNotFound with default headers values func NewPcloudTasksDeleteNotFound() *PcloudTasksDeleteNotFound { return &PcloudTasksDeleteNotFound{} } -/* PcloudTasksDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudTasksDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -171,9 +354,44 @@ type PcloudTasksDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks delete not found response has a 2xx status code +func (o *PcloudTasksDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks delete not found response has a 3xx status code +func (o *PcloudTasksDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks delete not found response has a 4xx status code +func (o *PcloudTasksDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks delete not found response has a 5xx status code +func (o *PcloudTasksDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks delete not found response a status code equal to that given +func (o *PcloudTasksDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tasks delete not found response +func (o *PcloudTasksDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudTasksDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudTasksDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudTasksDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -195,7 +413,8 @@ func NewPcloudTasksDeleteGone() *PcloudTasksDeleteGone { return &PcloudTasksDeleteGone{} } -/* PcloudTasksDeleteGone describes a response with status code 410, with default header values. +/* +PcloudTasksDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -203,9 +422,44 @@ type PcloudTasksDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks delete gone response has a 2xx status code +func (o *PcloudTasksDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks delete gone response has a 3xx status code +func (o *PcloudTasksDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks delete gone response has a 4xx status code +func (o *PcloudTasksDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks delete gone response has a 5xx status code +func (o *PcloudTasksDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks delete gone response a status code equal to that given +func (o *PcloudTasksDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud tasks delete gone response +func (o *PcloudTasksDeleteGone) Code() int { + return 410 +} + func (o *PcloudTasksDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudTasksDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudTasksDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudTasksDeleteInternalServerError() *PcloudTasksDeleteInternalServerE return &PcloudTasksDeleteInternalServerError{} } -/* PcloudTasksDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTasksDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudTasksDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks delete internal server error response has a 2xx status code +func (o *PcloudTasksDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks delete internal server error response has a 3xx status code +func (o *PcloudTasksDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks delete internal server error response has a 4xx status code +func (o *PcloudTasksDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tasks delete internal server error response has a 5xx status code +func (o *PcloudTasksDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tasks delete internal server error response a status code equal to that given +func (o *PcloudTasksDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tasks delete internal server error response +func (o *PcloudTasksDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudTasksDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTasksDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tasks/{task_id}][%d] pcloudTasksDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTasksDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_parameters.go index 756ff392bdb..5fd5d905f74 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudTasksGetParamsWithHTTPClient(client *http.Client) *PcloudTasksGetP } } -/* PcloudTasksGetParams contains all the parameters to send to the API endpoint - for the pcloud tasks get operation. +/* +PcloudTasksGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tasks get operation. + + Typically these are written to a http.Request. */ type PcloudTasksGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go index 607e52aa97a..801979a7466 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudTasksGetReader) ReadResponse(response runtime.ClientResponse, con return nil, err } return nil, result + case 403: + result := NewPcloudTasksGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudTasksGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudTasksGetReader) ReadResponse(response runtime.ClientResponse, con } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/tasks/{task_id}] pcloud.tasks.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudTasksGetOK() *PcloudTasksGetOK { return &PcloudTasksGetOK{} } -/* PcloudTasksGetOK describes a response with status code 200, with default header values. +/* +PcloudTasksGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudTasksGetOK struct { Payload *models.Task } +// IsSuccess returns true when this pcloud tasks get o k response has a 2xx status code +func (o *PcloudTasksGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tasks get o k response has a 3xx status code +func (o *PcloudTasksGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks get o k response has a 4xx status code +func (o *PcloudTasksGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tasks get o k response has a 5xx status code +func (o *PcloudTasksGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks get o k response a status code equal to that given +func (o *PcloudTasksGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tasks get o k response +func (o *PcloudTasksGetOK) Code() int { + return 200 +} + func (o *PcloudTasksGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetOK %+v", 200, o.Payload) } + +func (o *PcloudTasksGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetOK %+v", 200, o.Payload) +} + func (o *PcloudTasksGetOK) GetPayload() *models.Task { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudTasksGetBadRequest() *PcloudTasksGetBadRequest { return &PcloudTasksGetBadRequest{} } -/* PcloudTasksGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudTasksGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudTasksGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks get bad request response has a 2xx status code +func (o *PcloudTasksGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks get bad request response has a 3xx status code +func (o *PcloudTasksGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks get bad request response has a 4xx status code +func (o *PcloudTasksGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks get bad request response has a 5xx status code +func (o *PcloudTasksGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks get bad request response a status code equal to that given +func (o *PcloudTasksGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tasks get bad request response +func (o *PcloudTasksGetBadRequest) Code() int { + return 400 +} + func (o *PcloudTasksGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTasksGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTasksGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudTasksGetUnauthorized() *PcloudTasksGetUnauthorized { return &PcloudTasksGetUnauthorized{} } -/* PcloudTasksGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTasksGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudTasksGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks get unauthorized response has a 2xx status code +func (o *PcloudTasksGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks get unauthorized response has a 3xx status code +func (o *PcloudTasksGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks get unauthorized response has a 4xx status code +func (o *PcloudTasksGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks get unauthorized response has a 5xx status code +func (o *PcloudTasksGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks get unauthorized response a status code equal to that given +func (o *PcloudTasksGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tasks get unauthorized response +func (o *PcloudTasksGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudTasksGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTasksGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTasksGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudTasksGetUnauthorized) readResponse(response runtime.ClientRespons return nil } +// NewPcloudTasksGetForbidden creates a PcloudTasksGetForbidden with default headers values +func NewPcloudTasksGetForbidden() *PcloudTasksGetForbidden { + return &PcloudTasksGetForbidden{} +} + +/* +PcloudTasksGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudTasksGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tasks get forbidden response has a 2xx status code +func (o *PcloudTasksGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks get forbidden response has a 3xx status code +func (o *PcloudTasksGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks get forbidden response has a 4xx status code +func (o *PcloudTasksGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks get forbidden response has a 5xx status code +func (o *PcloudTasksGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks get forbidden response a status code equal to that given +func (o *PcloudTasksGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tasks get forbidden response +func (o *PcloudTasksGetForbidden) Code() int { + return 403 +} + +func (o *PcloudTasksGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTasksGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTasksGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTasksGetForbidden) 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 +} + // NewPcloudTasksGetNotFound creates a PcloudTasksGetNotFound with default headers values func NewPcloudTasksGetNotFound() *PcloudTasksGetNotFound { return &PcloudTasksGetNotFound{} } -/* PcloudTasksGetNotFound describes a response with status code 404, with default header values. +/* +PcloudTasksGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudTasksGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks get not found response has a 2xx status code +func (o *PcloudTasksGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks get not found response has a 3xx status code +func (o *PcloudTasksGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks get not found response has a 4xx status code +func (o *PcloudTasksGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tasks get not found response has a 5xx status code +func (o *PcloudTasksGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tasks get not found response a status code equal to that given +func (o *PcloudTasksGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tasks get not found response +func (o *PcloudTasksGetNotFound) Code() int { + return 404 +} + func (o *PcloudTasksGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudTasksGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudTasksGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudTasksGetInternalServerError() *PcloudTasksGetInternalServerError { return &PcloudTasksGetInternalServerError{} } -/* PcloudTasksGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTasksGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudTasksGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tasks get internal server error response has a 2xx status code +func (o *PcloudTasksGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tasks get internal server error response has a 3xx status code +func (o *PcloudTasksGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tasks get internal server error response has a 4xx status code +func (o *PcloudTasksGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tasks get internal server error response has a 5xx status code +func (o *PcloudTasksGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tasks get internal server error response a status code equal to that given +func (o *PcloudTasksGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tasks get internal server error response +func (o *PcloudTasksGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudTasksGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTasksGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tasks/{task_id}][%d] pcloudTasksGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTasksGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/p_cloud_tenants_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/p_cloud_tenants_client.go index 48cd87d9404..4d2b50aa30e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/p_cloud_tenants_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/p_cloud_tenants_client.go @@ -38,7 +38,7 @@ type ClientService interface { } /* - PcloudTenantsGet gets a tenant s current state information +PcloudTenantsGet gets a tenant s current state information */ func (a *Client) PcloudTenantsGet(params *PcloudTenantsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsGetOK, error) { // TODO: Validate the params before sending @@ -77,7 +77,7 @@ func (a *Client) PcloudTenantsGet(params *PcloudTenantsGetParams, authInfo runti } /* - PcloudTenantsPut updates a tenant +PcloudTenantsPut updates a tenant */ func (a *Client) PcloudTenantsPut(params *PcloudTenantsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsPutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_parameters.go index f6106baeb1c..43c00134dfb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudTenantsGetParamsWithHTTPClient(client *http.Client) *PcloudTenants } } -/* PcloudTenantsGetParams contains all the parameters to send to the API endpoint - for the pcloud tenants get operation. +/* +PcloudTenantsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tenants get operation. + + Typically these are written to a http.Request. */ type PcloudTenantsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go index a6ca2731433..a36443942a9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go @@ -60,7 +60,7 @@ func (o *PcloudTenantsGetReader) ReadResponse(response runtime.ClientResponse, c } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/tenants/{tenant_id}] pcloud.tenants.get", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudTenantsGetOK() *PcloudTenantsGetOK { return &PcloudTenantsGetOK{} } -/* PcloudTenantsGetOK describes a response with status code 200, with default header values. +/* +PcloudTenantsGetOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudTenantsGetOK struct { Payload *models.Tenant } +// IsSuccess returns true when this pcloud tenants get o k response has a 2xx status code +func (o *PcloudTenantsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tenants get o k response has a 3xx status code +func (o *PcloudTenantsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants get o k response has a 4xx status code +func (o *PcloudTenantsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants get o k response has a 5xx status code +func (o *PcloudTenantsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants get o k response a status code equal to that given +func (o *PcloudTenantsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tenants get o k response +func (o *PcloudTenantsGetOK) Code() int { + return 200 +} + func (o *PcloudTenantsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetOK %+v", 200, o.Payload) } + +func (o *PcloudTenantsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetOK %+v", 200, o.Payload) +} + func (o *PcloudTenantsGetOK) GetPayload() *models.Tenant { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudTenantsGetBadRequest() *PcloudTenantsGetBadRequest { return &PcloudTenantsGetBadRequest{} } -/* PcloudTenantsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudTenantsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudTenantsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants get bad request response has a 2xx status code +func (o *PcloudTenantsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants get bad request response has a 3xx status code +func (o *PcloudTenantsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants get bad request response has a 4xx status code +func (o *PcloudTenantsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants get bad request response has a 5xx status code +func (o *PcloudTenantsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants get bad request response a status code equal to that given +func (o *PcloudTenantsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tenants get bad request response +func (o *PcloudTenantsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudTenantsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTenantsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTenantsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudTenantsGetUnauthorized() *PcloudTenantsGetUnauthorized { return &PcloudTenantsGetUnauthorized{} } -/* PcloudTenantsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTenantsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudTenantsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants get unauthorized response has a 2xx status code +func (o *PcloudTenantsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants get unauthorized response has a 3xx status code +func (o *PcloudTenantsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants get unauthorized response has a 4xx status code +func (o *PcloudTenantsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants get unauthorized response has a 5xx status code +func (o *PcloudTenantsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants get unauthorized response a status code equal to that given +func (o *PcloudTenantsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tenants get unauthorized response +func (o *PcloudTenantsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudTenantsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTenantsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTenantsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudTenantsGetForbidden() *PcloudTenantsGetForbidden { return &PcloudTenantsGetForbidden{} } -/* PcloudTenantsGetForbidden describes a response with status code 403, with default header values. +/* +PcloudTenantsGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudTenantsGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants get forbidden response has a 2xx status code +func (o *PcloudTenantsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants get forbidden response has a 3xx status code +func (o *PcloudTenantsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants get forbidden response has a 4xx status code +func (o *PcloudTenantsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants get forbidden response has a 5xx status code +func (o *PcloudTenantsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants get forbidden response a status code equal to that given +func (o *PcloudTenantsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tenants get forbidden response +func (o *PcloudTenantsGetForbidden) Code() int { + return 403 +} + func (o *PcloudTenantsGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudTenantsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudTenantsGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudTenantsGetNotFound() *PcloudTenantsGetNotFound { return &PcloudTenantsGetNotFound{} } -/* PcloudTenantsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudTenantsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudTenantsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants get not found response has a 2xx status code +func (o *PcloudTenantsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants get not found response has a 3xx status code +func (o *PcloudTenantsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants get not found response has a 4xx status code +func (o *PcloudTenantsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants get not found response has a 5xx status code +func (o *PcloudTenantsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants get not found response a status code equal to that given +func (o *PcloudTenantsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tenants get not found response +func (o *PcloudTenantsGetNotFound) Code() int { + return 404 +} + func (o *PcloudTenantsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudTenantsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudTenantsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudTenantsGetInternalServerError() *PcloudTenantsGetInternalServerErr return &PcloudTenantsGetInternalServerError{} } -/* PcloudTenantsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTenantsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudTenantsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants get internal server error response has a 2xx status code +func (o *PcloudTenantsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants get internal server error response has a 3xx status code +func (o *PcloudTenantsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants get internal server error response has a 4xx status code +func (o *PcloudTenantsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants get internal server error response has a 5xx status code +func (o *PcloudTenantsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tenants get internal server error response a status code equal to that given +func (o *PcloudTenantsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tenants get internal server error response +func (o *PcloudTenantsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudTenantsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTenantsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTenantsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_parameters.go index 182262c5134..a6a09a26966 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudTenantsPutParamsWithHTTPClient(client *http.Client) *PcloudTenants } } -/* PcloudTenantsPutParams contains all the parameters to send to the API endpoint - for the pcloud tenants put operation. +/* +PcloudTenantsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tenants put operation. + + Typically these are written to a http.Request. */ type PcloudTenantsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go index 75fec044d2c..a047d725746 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +66,7 @@ func (o *PcloudTenantsPutReader) ReadResponse(response runtime.ClientResponse, c } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/tenants/{tenant_id}] pcloud.tenants.put", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudTenantsPutOK() *PcloudTenantsPutOK { return &PcloudTenantsPutOK{} } -/* PcloudTenantsPutOK describes a response with status code 200, with default header values. +/* +PcloudTenantsPutOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudTenantsPutOK struct { Payload *models.Tenant } +// IsSuccess returns true when this pcloud tenants put o k response has a 2xx status code +func (o *PcloudTenantsPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tenants put o k response has a 3xx status code +func (o *PcloudTenantsPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants put o k response has a 4xx status code +func (o *PcloudTenantsPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants put o k response has a 5xx status code +func (o *PcloudTenantsPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants put o k response a status code equal to that given +func (o *PcloudTenantsPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tenants put o k response +func (o *PcloudTenantsPutOK) Code() int { + return 200 +} + func (o *PcloudTenantsPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutOK %+v", 200, o.Payload) } + +func (o *PcloudTenantsPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutOK %+v", 200, o.Payload) +} + func (o *PcloudTenantsPutOK) GetPayload() *models.Tenant { return o.Payload } @@ -95,7 +143,8 @@ func NewPcloudTenantsPutBadRequest() *PcloudTenantsPutBadRequest { return &PcloudTenantsPutBadRequest{} } -/* PcloudTenantsPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudTenantsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +152,44 @@ type PcloudTenantsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants put bad request response has a 2xx status code +func (o *PcloudTenantsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants put bad request response has a 3xx status code +func (o *PcloudTenantsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants put bad request response has a 4xx status code +func (o *PcloudTenantsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants put bad request response has a 5xx status code +func (o *PcloudTenantsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants put bad request response a status code equal to that given +func (o *PcloudTenantsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tenants put bad request response +func (o *PcloudTenantsPutBadRequest) Code() int { + return 400 +} + func (o *PcloudTenantsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTenantsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTenantsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +211,8 @@ func NewPcloudTenantsPutUnauthorized() *PcloudTenantsPutUnauthorized { return &PcloudTenantsPutUnauthorized{} } -/* PcloudTenantsPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTenantsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +220,44 @@ type PcloudTenantsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants put unauthorized response has a 2xx status code +func (o *PcloudTenantsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants put unauthorized response has a 3xx status code +func (o *PcloudTenantsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants put unauthorized response has a 4xx status code +func (o *PcloudTenantsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants put unauthorized response has a 5xx status code +func (o *PcloudTenantsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants put unauthorized response a status code equal to that given +func (o *PcloudTenantsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tenants put unauthorized response +func (o *PcloudTenantsPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudTenantsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTenantsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTenantsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +274,149 @@ 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{} } -/* PcloudTenantsPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudTenantsPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -167,9 +424,44 @@ type PcloudTenantsPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants put unprocessable entity response has a 2xx status code +func (o *PcloudTenantsPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants put unprocessable entity response has a 3xx status code +func (o *PcloudTenantsPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants put unprocessable entity response has a 4xx status code +func (o *PcloudTenantsPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants put unprocessable entity response has a 5xx status code +func (o *PcloudTenantsPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants put unprocessable entity response a status code equal to that given +func (o *PcloudTenantsPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud tenants put unprocessable entity response +func (o *PcloudTenantsPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudTenantsPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudTenantsPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudTenantsPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -191,7 +483,8 @@ func NewPcloudTenantsPutInternalServerError() *PcloudTenantsPutInternalServerErr return &PcloudTenantsPutInternalServerError{} } -/* PcloudTenantsPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTenantsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +492,44 @@ type PcloudTenantsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants put internal server error response has a 2xx status code +func (o *PcloudTenantsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants put internal server error response has a 3xx status code +func (o *PcloudTenantsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants put internal server error response has a 4xx status code +func (o *PcloudTenantsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants put internal server error response has a 5xx status code +func (o *PcloudTenantsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tenants put internal server error response a status code equal to that given +func (o *PcloudTenantsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tenants put internal server error response +func (o *PcloudTenantsPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudTenantsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTenantsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}][%d] pcloudTenantsPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTenantsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go index d05737fe800..90906d7e81b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go @@ -44,7 +44,7 @@ type ClientService interface { } /* - PcloudTenantsSshkeysDelete deletes a tenant s SSH key +PcloudTenantsSshkeysDelete deletes a tenant s SSH key */ func (a *Client) PcloudTenantsSshkeysDelete(params *PcloudTenantsSshkeysDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysDeleteOK, error) { // TODO: Validate the params before sending @@ -83,7 +83,7 @@ func (a *Client) PcloudTenantsSshkeysDelete(params *PcloudTenantsSshkeysDeletePa } /* - PcloudTenantsSshkeysGet gets a tenant s SSH key by name +PcloudTenantsSshkeysGet gets a tenant s SSH key by name */ func (a *Client) PcloudTenantsSshkeysGet(params *PcloudTenantsSshkeysGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysGetOK, error) { // TODO: Validate the params before sending @@ -122,7 +122,7 @@ func (a *Client) PcloudTenantsSshkeysGet(params *PcloudTenantsSshkeysGetParams, } /* - PcloudTenantsSshkeysGetall lists a tenant s SSH keys +PcloudTenantsSshkeysGetall lists a tenant s SSH keys */ func (a *Client) PcloudTenantsSshkeysGetall(params *PcloudTenantsSshkeysGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysGetallOK, error) { // TODO: Validate the params before sending @@ -161,7 +161,7 @@ func (a *Client) PcloudTenantsSshkeysGetall(params *PcloudTenantsSshkeysGetallPa } /* - PcloudTenantsSshkeysPost adds a new SSH key to the tenant +PcloudTenantsSshkeysPost adds a new SSH key to the tenant */ func (a *Client) PcloudTenantsSshkeysPost(params *PcloudTenantsSshkeysPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysPostOK, *PcloudTenantsSshkeysPostCreated, error) { // TODO: Validate the params before sending @@ -201,7 +201,7 @@ func (a *Client) PcloudTenantsSshkeysPost(params *PcloudTenantsSshkeysPostParams } /* - PcloudTenantsSshkeysPut updates an SSH key +PcloudTenantsSshkeysPut updates an SSH key */ func (a *Client) PcloudTenantsSshkeysPut(params *PcloudTenantsSshkeysPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudTenantsSshkeysPutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_parameters.go index 0de6c32d747..0e02e65bd37 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudTenantsSshkeysDeleteParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudTenantsSshkeysDeleteParams contains all the parameters to send to the API endpoint - for the pcloud tenants sshkeys delete operation. +/* +PcloudTenantsSshkeysDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tenants sshkeys delete operation. + + Typically these are written to a http.Request. */ type PcloudTenantsSshkeysDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go index 2c0f8aa23d5..55bf83380d9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +66,7 @@ func (o *PcloudTenantsSshkeysDeleteReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}] pcloud.tenants.sshkeys.delete", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudTenantsSshkeysDeleteOK() *PcloudTenantsSshkeysDeleteOK { return &PcloudTenantsSshkeysDeleteOK{} } -/* PcloudTenantsSshkeysDeleteOK describes a response with status code 200, with default header values. +/* +PcloudTenantsSshkeysDeleteOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudTenantsSshkeysDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud tenants sshkeys delete o k response has a 2xx status code +func (o *PcloudTenantsSshkeysDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tenants sshkeys delete o k response has a 3xx status code +func (o *PcloudTenantsSshkeysDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys delete o k response has a 4xx status code +func (o *PcloudTenantsSshkeysDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys delete o k response has a 5xx status code +func (o *PcloudTenantsSshkeysDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys delete o k response a status code equal to that given +func (o *PcloudTenantsSshkeysDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tenants sshkeys delete o k response +func (o *PcloudTenantsSshkeysDeleteOK) Code() int { + return 200 +} + func (o *PcloudTenantsSshkeysDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudTenantsSshkeysDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudTenantsSshkeysDeleteOK) GetPayload() models.Object { return o.Payload } @@ -93,7 +141,8 @@ func NewPcloudTenantsSshkeysDeleteBadRequest() *PcloudTenantsSshkeysDeleteBadReq return &PcloudTenantsSshkeysDeleteBadRequest{} } -/* PcloudTenantsSshkeysDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudTenantsSshkeysDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +150,44 @@ type PcloudTenantsSshkeysDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys delete bad request response has a 2xx status code +func (o *PcloudTenantsSshkeysDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys delete bad request response has a 3xx status code +func (o *PcloudTenantsSshkeysDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys delete bad request response has a 4xx status code +func (o *PcloudTenantsSshkeysDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys delete bad request response has a 5xx status code +func (o *PcloudTenantsSshkeysDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys delete bad request response a status code equal to that given +func (o *PcloudTenantsSshkeysDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tenants sshkeys delete bad request response +func (o *PcloudTenantsSshkeysDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudTenantsSshkeysDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTenantsSshkeysDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTenantsSshkeysDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -125,7 +209,8 @@ func NewPcloudTenantsSshkeysDeleteUnauthorized() *PcloudTenantsSshkeysDeleteUnau return &PcloudTenantsSshkeysDeleteUnauthorized{} } -/* PcloudTenantsSshkeysDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTenantsSshkeysDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -133,9 +218,44 @@ type PcloudTenantsSshkeysDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys delete unauthorized response has a 2xx status code +func (o *PcloudTenantsSshkeysDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys delete unauthorized response has a 3xx status code +func (o *PcloudTenantsSshkeysDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys delete unauthorized response has a 4xx status code +func (o *PcloudTenantsSshkeysDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys delete unauthorized response has a 5xx status code +func (o *PcloudTenantsSshkeysDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys delete unauthorized response a status code equal to that given +func (o *PcloudTenantsSshkeysDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tenants sshkeys delete unauthorized response +func (o *PcloudTenantsSshkeysDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudTenantsSshkeysDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTenantsSshkeysDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTenantsSshkeysDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -152,12 +272,149 @@ 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{} } -/* PcloudTenantsSshkeysDeleteGone describes a response with status code 410, with default header values. +/* +PcloudTenantsSshkeysDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -165,9 +422,44 @@ type PcloudTenantsSshkeysDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys delete gone response has a 2xx status code +func (o *PcloudTenantsSshkeysDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys delete gone response has a 3xx status code +func (o *PcloudTenantsSshkeysDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys delete gone response has a 4xx status code +func (o *PcloudTenantsSshkeysDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys delete gone response has a 5xx status code +func (o *PcloudTenantsSshkeysDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys delete gone response a status code equal to that given +func (o *PcloudTenantsSshkeysDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud tenants sshkeys delete gone response +func (o *PcloudTenantsSshkeysDeleteGone) Code() int { + return 410 +} + func (o *PcloudTenantsSshkeysDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudTenantsSshkeysDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudTenantsSshkeysDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -189,7 +481,8 @@ func NewPcloudTenantsSshkeysDeleteInternalServerError() *PcloudTenantsSshkeysDel return &PcloudTenantsSshkeysDeleteInternalServerError{} } -/* PcloudTenantsSshkeysDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTenantsSshkeysDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +490,44 @@ type PcloudTenantsSshkeysDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys delete internal server error response has a 2xx status code +func (o *PcloudTenantsSshkeysDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys delete internal server error response has a 3xx status code +func (o *PcloudTenantsSshkeysDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys delete internal server error response has a 4xx status code +func (o *PcloudTenantsSshkeysDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys delete internal server error response has a 5xx status code +func (o *PcloudTenantsSshkeysDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tenants sshkeys delete internal server error response a status code equal to that given +func (o *PcloudTenantsSshkeysDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tenants sshkeys delete internal server error response +func (o *PcloudTenantsSshkeysDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudTenantsSshkeysDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTenantsSshkeysDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTenantsSshkeysDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_parameters.go index 574cc6ae919..d6eb58184af 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudTenantsSshkeysGetParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudTenantsSshkeysGetParams contains all the parameters to send to the API endpoint - for the pcloud tenants sshkeys get operation. +/* +PcloudTenantsSshkeysGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tenants sshkeys get operation. + + Typically these are written to a http.Request. */ type PcloudTenantsSshkeysGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go index f49bad3c0df..7b40732a1c6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudTenantsSshkeysGetReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 403: + result := NewPcloudTenantsSshkeysGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudTenantsSshkeysGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudTenantsSshkeysGetReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}] pcloud.tenants.sshkeys.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudTenantsSshkeysGetOK() *PcloudTenantsSshkeysGetOK { return &PcloudTenantsSshkeysGetOK{} } -/* PcloudTenantsSshkeysGetOK describes a response with status code 200, with default header values. +/* +PcloudTenantsSshkeysGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudTenantsSshkeysGetOK struct { Payload *models.SSHKey } +// IsSuccess returns true when this pcloud tenants sshkeys get o k response has a 2xx status code +func (o *PcloudTenantsSshkeysGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tenants sshkeys get o k response has a 3xx status code +func (o *PcloudTenantsSshkeysGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys get o k response has a 4xx status code +func (o *PcloudTenantsSshkeysGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys get o k response has a 5xx status code +func (o *PcloudTenantsSshkeysGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys get o k response a status code equal to that given +func (o *PcloudTenantsSshkeysGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tenants sshkeys get o k response +func (o *PcloudTenantsSshkeysGetOK) Code() int { + return 200 +} + func (o *PcloudTenantsSshkeysGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetOK %+v", 200, o.Payload) } + +func (o *PcloudTenantsSshkeysGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetOK %+v", 200, o.Payload) +} + func (o *PcloudTenantsSshkeysGetOK) GetPayload() *models.SSHKey { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudTenantsSshkeysGetBadRequest() *PcloudTenantsSshkeysGetBadRequest { return &PcloudTenantsSshkeysGetBadRequest{} } -/* PcloudTenantsSshkeysGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudTenantsSshkeysGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudTenantsSshkeysGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys get bad request response has a 2xx status code +func (o *PcloudTenantsSshkeysGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys get bad request response has a 3xx status code +func (o *PcloudTenantsSshkeysGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys get bad request response has a 4xx status code +func (o *PcloudTenantsSshkeysGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys get bad request response has a 5xx status code +func (o *PcloudTenantsSshkeysGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys get bad request response a status code equal to that given +func (o *PcloudTenantsSshkeysGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tenants sshkeys get bad request response +func (o *PcloudTenantsSshkeysGetBadRequest) Code() int { + return 400 +} + func (o *PcloudTenantsSshkeysGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTenantsSshkeysGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTenantsSshkeysGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudTenantsSshkeysGetUnauthorized() *PcloudTenantsSshkeysGetUnauthoriz return &PcloudTenantsSshkeysGetUnauthorized{} } -/* PcloudTenantsSshkeysGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTenantsSshkeysGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudTenantsSshkeysGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys get unauthorized response has a 2xx status code +func (o *PcloudTenantsSshkeysGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys get unauthorized response has a 3xx status code +func (o *PcloudTenantsSshkeysGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys get unauthorized response has a 4xx status code +func (o *PcloudTenantsSshkeysGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys get unauthorized response has a 5xx status code +func (o *PcloudTenantsSshkeysGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys get unauthorized response a status code equal to that given +func (o *PcloudTenantsSshkeysGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tenants sshkeys get unauthorized response +func (o *PcloudTenantsSshkeysGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudTenantsSshkeysGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTenantsSshkeysGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTenantsSshkeysGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudTenantsSshkeysGetUnauthorized) readResponse(response runtime.Clie return nil } +// NewPcloudTenantsSshkeysGetForbidden creates a PcloudTenantsSshkeysGetForbidden with default headers values +func NewPcloudTenantsSshkeysGetForbidden() *PcloudTenantsSshkeysGetForbidden { + return &PcloudTenantsSshkeysGetForbidden{} +} + +/* +PcloudTenantsSshkeysGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudTenantsSshkeysGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants sshkeys get forbidden response has a 2xx status code +func (o *PcloudTenantsSshkeysGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys get forbidden response has a 3xx status code +func (o *PcloudTenantsSshkeysGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys get forbidden response has a 4xx status code +func (o *PcloudTenantsSshkeysGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys get forbidden response has a 5xx status code +func (o *PcloudTenantsSshkeysGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys get forbidden response a status code equal to that given +func (o *PcloudTenantsSshkeysGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tenants sshkeys get forbidden response +func (o *PcloudTenantsSshkeysGetForbidden) Code() int { + return 403 +} + +func (o *PcloudTenantsSshkeysGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsSshkeysGetForbidden) 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 +} + // NewPcloudTenantsSshkeysGetNotFound creates a PcloudTenantsSshkeysGetNotFound with default headers values func NewPcloudTenantsSshkeysGetNotFound() *PcloudTenantsSshkeysGetNotFound { return &PcloudTenantsSshkeysGetNotFound{} } -/* PcloudTenantsSshkeysGetNotFound describes a response with status code 404, with default header values. +/* +PcloudTenantsSshkeysGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudTenantsSshkeysGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys get not found response has a 2xx status code +func (o *PcloudTenantsSshkeysGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys get not found response has a 3xx status code +func (o *PcloudTenantsSshkeysGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys get not found response has a 4xx status code +func (o *PcloudTenantsSshkeysGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys get not found response has a 5xx status code +func (o *PcloudTenantsSshkeysGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys get not found response a status code equal to that given +func (o *PcloudTenantsSshkeysGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tenants sshkeys get not found response +func (o *PcloudTenantsSshkeysGetNotFound) Code() int { + return 404 +} + func (o *PcloudTenantsSshkeysGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudTenantsSshkeysGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudTenantsSshkeysGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudTenantsSshkeysGetInternalServerError() *PcloudTenantsSshkeysGetInt return &PcloudTenantsSshkeysGetInternalServerError{} } -/* PcloudTenantsSshkeysGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTenantsSshkeysGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudTenantsSshkeysGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys get internal server error response has a 2xx status code +func (o *PcloudTenantsSshkeysGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys get internal server error response has a 3xx status code +func (o *PcloudTenantsSshkeysGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys get internal server error response has a 4xx status code +func (o *PcloudTenantsSshkeysGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys get internal server error response has a 5xx status code +func (o *PcloudTenantsSshkeysGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tenants sshkeys get internal server error response a status code equal to that given +func (o *PcloudTenantsSshkeysGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tenants sshkeys get internal server error response +func (o *PcloudTenantsSshkeysGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudTenantsSshkeysGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTenantsSshkeysGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTenantsSshkeysGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_parameters.go index 0e0e30b0411..ce7cb34d51a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudTenantsSshkeysGetallParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudTenantsSshkeysGetallParams contains all the parameters to send to the API endpoint - for the pcloud tenants sshkeys getall operation. +/* +PcloudTenantsSshkeysGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tenants sshkeys getall operation. + + Typically these are written to a http.Request. */ type PcloudTenantsSshkeysGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go index 700ea0eb980..fe2db9ec3bd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudTenantsSshkeysGetallReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 403: + result := NewPcloudTenantsSshkeysGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudTenantsSshkeysGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudTenantsSshkeysGetallReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys] pcloud.tenants.sshkeys.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudTenantsSshkeysGetallOK() *PcloudTenantsSshkeysGetallOK { return &PcloudTenantsSshkeysGetallOK{} } -/* PcloudTenantsSshkeysGetallOK describes a response with status code 200, with default header values. +/* +PcloudTenantsSshkeysGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudTenantsSshkeysGetallOK struct { Payload *models.SSHKeys } +// IsSuccess returns true when this pcloud tenants sshkeys getall o k response has a 2xx status code +func (o *PcloudTenantsSshkeysGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tenants sshkeys getall o k response has a 3xx status code +func (o *PcloudTenantsSshkeysGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys getall o k response has a 4xx status code +func (o *PcloudTenantsSshkeysGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys getall o k response has a 5xx status code +func (o *PcloudTenantsSshkeysGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys getall o k response a status code equal to that given +func (o *PcloudTenantsSshkeysGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tenants sshkeys getall o k response +func (o *PcloudTenantsSshkeysGetallOK) Code() int { + return 200 +} + func (o *PcloudTenantsSshkeysGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallOK %+v", 200, o.Payload) } + +func (o *PcloudTenantsSshkeysGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallOK %+v", 200, o.Payload) +} + func (o *PcloudTenantsSshkeysGetallOK) GetPayload() *models.SSHKeys { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudTenantsSshkeysGetallBadRequest() *PcloudTenantsSshkeysGetallBadReq return &PcloudTenantsSshkeysGetallBadRequest{} } -/* PcloudTenantsSshkeysGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudTenantsSshkeysGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudTenantsSshkeysGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys getall bad request response has a 2xx status code +func (o *PcloudTenantsSshkeysGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys getall bad request response has a 3xx status code +func (o *PcloudTenantsSshkeysGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys getall bad request response has a 4xx status code +func (o *PcloudTenantsSshkeysGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys getall bad request response has a 5xx status code +func (o *PcloudTenantsSshkeysGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys getall bad request response a status code equal to that given +func (o *PcloudTenantsSshkeysGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tenants sshkeys getall bad request response +func (o *PcloudTenantsSshkeysGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudTenantsSshkeysGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTenantsSshkeysGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTenantsSshkeysGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudTenantsSshkeysGetallUnauthorized() *PcloudTenantsSshkeysGetallUnau return &PcloudTenantsSshkeysGetallUnauthorized{} } -/* PcloudTenantsSshkeysGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTenantsSshkeysGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudTenantsSshkeysGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys getall unauthorized response has a 2xx status code +func (o *PcloudTenantsSshkeysGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys getall unauthorized response has a 3xx status code +func (o *PcloudTenantsSshkeysGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys getall unauthorized response has a 4xx status code +func (o *PcloudTenantsSshkeysGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys getall unauthorized response has a 5xx status code +func (o *PcloudTenantsSshkeysGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys getall unauthorized response a status code equal to that given +func (o *PcloudTenantsSshkeysGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tenants sshkeys getall unauthorized response +func (o *PcloudTenantsSshkeysGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudTenantsSshkeysGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTenantsSshkeysGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTenantsSshkeysGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudTenantsSshkeysGetallUnauthorized) readResponse(response runtime.C return nil } +// NewPcloudTenantsSshkeysGetallForbidden creates a PcloudTenantsSshkeysGetallForbidden with default headers values +func NewPcloudTenantsSshkeysGetallForbidden() *PcloudTenantsSshkeysGetallForbidden { + return &PcloudTenantsSshkeysGetallForbidden{} +} + +/* +PcloudTenantsSshkeysGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudTenantsSshkeysGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud tenants sshkeys getall forbidden response has a 2xx status code +func (o *PcloudTenantsSshkeysGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys getall forbidden response has a 3xx status code +func (o *PcloudTenantsSshkeysGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys getall forbidden response has a 4xx status code +func (o *PcloudTenantsSshkeysGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys getall forbidden response has a 5xx status code +func (o *PcloudTenantsSshkeysGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys getall forbidden response a status code equal to that given +func (o *PcloudTenantsSshkeysGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud tenants sshkeys getall forbidden response +func (o *PcloudTenantsSshkeysGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudTenantsSshkeysGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudTenantsSshkeysGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudTenantsSshkeysGetallForbidden) 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 +} + // NewPcloudTenantsSshkeysGetallNotFound creates a PcloudTenantsSshkeysGetallNotFound with default headers values func NewPcloudTenantsSshkeysGetallNotFound() *PcloudTenantsSshkeysGetallNotFound { return &PcloudTenantsSshkeysGetallNotFound{} } -/* PcloudTenantsSshkeysGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudTenantsSshkeysGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudTenantsSshkeysGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys getall not found response has a 2xx status code +func (o *PcloudTenantsSshkeysGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys getall not found response has a 3xx status code +func (o *PcloudTenantsSshkeysGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys getall not found response has a 4xx status code +func (o *PcloudTenantsSshkeysGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys getall not found response has a 5xx status code +func (o *PcloudTenantsSshkeysGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys getall not found response a status code equal to that given +func (o *PcloudTenantsSshkeysGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud tenants sshkeys getall not found response +func (o *PcloudTenantsSshkeysGetallNotFound) Code() int { + return 404 +} + func (o *PcloudTenantsSshkeysGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudTenantsSshkeysGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudTenantsSshkeysGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudTenantsSshkeysGetallInternalServerError() *PcloudTenantsSshkeysGet return &PcloudTenantsSshkeysGetallInternalServerError{} } -/* PcloudTenantsSshkeysGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTenantsSshkeysGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudTenantsSshkeysGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys getall internal server error response has a 2xx status code +func (o *PcloudTenantsSshkeysGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys getall internal server error response has a 3xx status code +func (o *PcloudTenantsSshkeysGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys getall internal server error response has a 4xx status code +func (o *PcloudTenantsSshkeysGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys getall internal server error response has a 5xx status code +func (o *PcloudTenantsSshkeysGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tenants sshkeys getall internal server error response a status code equal to that given +func (o *PcloudTenantsSshkeysGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tenants sshkeys getall internal server error response +func (o *PcloudTenantsSshkeysGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudTenantsSshkeysGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTenantsSshkeysGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTenantsSshkeysGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_parameters.go index 0f65423a5e5..1db66eb583b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudTenantsSshkeysPostParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudTenantsSshkeysPostParams contains all the parameters to send to the API endpoint - for the pcloud tenants sshkeys post operation. +/* +PcloudTenantsSshkeysPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tenants sshkeys post operation. + + Typically these are written to a http.Request. */ type PcloudTenantsSshkeysPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go index 2717b7ea58b..44d8ed2aa1b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +78,7 @@ func (o *PcloudTenantsSshkeysPostReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys] pcloud.tenants.sshkeys.post", response, response.Code()) } } @@ -75,7 +87,8 @@ func NewPcloudTenantsSshkeysPostOK() *PcloudTenantsSshkeysPostOK { return &PcloudTenantsSshkeysPostOK{} } -/* PcloudTenantsSshkeysPostOK describes a response with status code 200, with default header values. +/* +PcloudTenantsSshkeysPostOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +96,44 @@ type PcloudTenantsSshkeysPostOK struct { Payload *models.SSHKey } +// IsSuccess returns true when this pcloud tenants sshkeys post o k response has a 2xx status code +func (o *PcloudTenantsSshkeysPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tenants sshkeys post o k response has a 3xx status code +func (o *PcloudTenantsSshkeysPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post o k response has a 4xx status code +func (o *PcloudTenantsSshkeysPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys post o k response has a 5xx status code +func (o *PcloudTenantsSshkeysPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys post o k response a status code equal to that given +func (o *PcloudTenantsSshkeysPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tenants sshkeys post o k response +func (o *PcloudTenantsSshkeysPostOK) Code() int { + return 200 +} + func (o *PcloudTenantsSshkeysPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostOK %+v", 200, o.Payload) } + +func (o *PcloudTenantsSshkeysPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostOK %+v", 200, o.Payload) +} + func (o *PcloudTenantsSshkeysPostOK) GetPayload() *models.SSHKey { return o.Payload } @@ -107,7 +155,8 @@ func NewPcloudTenantsSshkeysPostCreated() *PcloudTenantsSshkeysPostCreated { return &PcloudTenantsSshkeysPostCreated{} } -/* PcloudTenantsSshkeysPostCreated describes a response with status code 201, with default header values. +/* +PcloudTenantsSshkeysPostCreated describes a response with status code 201, with default header values. Created */ @@ -115,9 +164,44 @@ type PcloudTenantsSshkeysPostCreated struct { Payload *models.SSHKey } +// IsSuccess returns true when this pcloud tenants sshkeys post created response has a 2xx status code +func (o *PcloudTenantsSshkeysPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tenants sshkeys post created response has a 3xx status code +func (o *PcloudTenantsSshkeysPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post created response has a 4xx status code +func (o *PcloudTenantsSshkeysPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys post created response has a 5xx status code +func (o *PcloudTenantsSshkeysPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys post created response a status code equal to that given +func (o *PcloudTenantsSshkeysPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud tenants sshkeys post created response +func (o *PcloudTenantsSshkeysPostCreated) Code() int { + return 201 +} + func (o *PcloudTenantsSshkeysPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostCreated %+v", 201, o.Payload) } + +func (o *PcloudTenantsSshkeysPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostCreated %+v", 201, o.Payload) +} + func (o *PcloudTenantsSshkeysPostCreated) GetPayload() *models.SSHKey { return o.Payload } @@ -139,7 +223,8 @@ func NewPcloudTenantsSshkeysPostBadRequest() *PcloudTenantsSshkeysPostBadRequest return &PcloudTenantsSshkeysPostBadRequest{} } -/* PcloudTenantsSshkeysPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudTenantsSshkeysPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -147,9 +232,44 @@ type PcloudTenantsSshkeysPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys post bad request response has a 2xx status code +func (o *PcloudTenantsSshkeysPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys post bad request response has a 3xx status code +func (o *PcloudTenantsSshkeysPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post bad request response has a 4xx status code +func (o *PcloudTenantsSshkeysPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys post bad request response has a 5xx status code +func (o *PcloudTenantsSshkeysPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys post bad request response a status code equal to that given +func (o *PcloudTenantsSshkeysPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tenants sshkeys post bad request response +func (o *PcloudTenantsSshkeysPostBadRequest) Code() int { + return 400 +} + func (o *PcloudTenantsSshkeysPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTenantsSshkeysPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTenantsSshkeysPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -171,7 +291,8 @@ func NewPcloudTenantsSshkeysPostUnauthorized() *PcloudTenantsSshkeysPostUnauthor return &PcloudTenantsSshkeysPostUnauthorized{} } -/* PcloudTenantsSshkeysPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTenantsSshkeysPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -179,9 +300,44 @@ type PcloudTenantsSshkeysPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys post unauthorized response has a 2xx status code +func (o *PcloudTenantsSshkeysPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys post unauthorized response has a 3xx status code +func (o *PcloudTenantsSshkeysPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post unauthorized response has a 4xx status code +func (o *PcloudTenantsSshkeysPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys post unauthorized response has a 5xx status code +func (o *PcloudTenantsSshkeysPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys post unauthorized response a status code equal to that given +func (o *PcloudTenantsSshkeysPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tenants sshkeys post unauthorized response +func (o *PcloudTenantsSshkeysPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudTenantsSshkeysPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTenantsSshkeysPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTenantsSshkeysPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -198,12 +354,149 @@ 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{} } -/* PcloudTenantsSshkeysPostConflict describes a response with status code 409, with default header values. +/* +PcloudTenantsSshkeysPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +504,44 @@ type PcloudTenantsSshkeysPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys post conflict response has a 2xx status code +func (o *PcloudTenantsSshkeysPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys post conflict response has a 3xx status code +func (o *PcloudTenantsSshkeysPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post conflict response has a 4xx status code +func (o *PcloudTenantsSshkeysPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys post conflict response has a 5xx status code +func (o *PcloudTenantsSshkeysPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys post conflict response a status code equal to that given +func (o *PcloudTenantsSshkeysPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud tenants sshkeys post conflict response +func (o *PcloudTenantsSshkeysPostConflict) Code() int { + return 409 +} + func (o *PcloudTenantsSshkeysPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostConflict %+v", 409, o.Payload) } + +func (o *PcloudTenantsSshkeysPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostConflict %+v", 409, o.Payload) +} + func (o *PcloudTenantsSshkeysPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +563,8 @@ func NewPcloudTenantsSshkeysPostUnprocessableEntity() *PcloudTenantsSshkeysPostU return &PcloudTenantsSshkeysPostUnprocessableEntity{} } -/* PcloudTenantsSshkeysPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudTenantsSshkeysPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +572,44 @@ type PcloudTenantsSshkeysPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys post unprocessable entity response has a 2xx status code +func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys post unprocessable entity response has a 3xx status code +func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post unprocessable entity response has a 4xx status code +func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys post unprocessable entity response has a 5xx status code +func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys post unprocessable entity response a status code equal to that given +func (o *PcloudTenantsSshkeysPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud tenants sshkeys post unprocessable entity response +func (o *PcloudTenantsSshkeysPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudTenantsSshkeysPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudTenantsSshkeysPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudTenantsSshkeysPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +631,8 @@ func NewPcloudTenantsSshkeysPostInternalServerError() *PcloudTenantsSshkeysPostI return &PcloudTenantsSshkeysPostInternalServerError{} } -/* PcloudTenantsSshkeysPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTenantsSshkeysPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +640,44 @@ type PcloudTenantsSshkeysPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys post internal server error response has a 2xx status code +func (o *PcloudTenantsSshkeysPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys post internal server error response has a 3xx status code +func (o *PcloudTenantsSshkeysPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys post internal server error response has a 4xx status code +func (o *PcloudTenantsSshkeysPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys post internal server error response has a 5xx status code +func (o *PcloudTenantsSshkeysPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tenants sshkeys post internal server error response a status code equal to that given +func (o *PcloudTenantsSshkeysPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tenants sshkeys post internal server error response +func (o *PcloudTenantsSshkeysPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudTenantsSshkeysPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTenantsSshkeysPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/tenants/{tenant_id}/sshkeys][%d] pcloudTenantsSshkeysPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTenantsSshkeysPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_parameters.go index af532745052..dec8247f11d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudTenantsSshkeysPutParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudTenantsSshkeysPutParams contains all the parameters to send to the API endpoint - for the pcloud tenants sshkeys put operation. +/* +PcloudTenantsSshkeysPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud tenants sshkeys put operation. + + Typically these are written to a http.Request. */ type PcloudTenantsSshkeysPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go index 5d091866f57..21beb65a44f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +66,7 @@ func (o *PcloudTenantsSshkeysPutReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}] pcloud.tenants.sshkeys.put", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudTenantsSshkeysPutOK() *PcloudTenantsSshkeysPutOK { return &PcloudTenantsSshkeysPutOK{} } -/* PcloudTenantsSshkeysPutOK describes a response with status code 200, with default header values. +/* +PcloudTenantsSshkeysPutOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +84,44 @@ type PcloudTenantsSshkeysPutOK struct { Payload *models.SSHKey } +// IsSuccess returns true when this pcloud tenants sshkeys put o k response has a 2xx status code +func (o *PcloudTenantsSshkeysPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud tenants sshkeys put o k response has a 3xx status code +func (o *PcloudTenantsSshkeysPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys put o k response has a 4xx status code +func (o *PcloudTenantsSshkeysPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys put o k response has a 5xx status code +func (o *PcloudTenantsSshkeysPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys put o k response a status code equal to that given +func (o *PcloudTenantsSshkeysPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud tenants sshkeys put o k response +func (o *PcloudTenantsSshkeysPutOK) Code() int { + return 200 +} + func (o *PcloudTenantsSshkeysPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutOK %+v", 200, o.Payload) } + +func (o *PcloudTenantsSshkeysPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutOK %+v", 200, o.Payload) +} + func (o *PcloudTenantsSshkeysPutOK) GetPayload() *models.SSHKey { return o.Payload } @@ -95,7 +143,8 @@ func NewPcloudTenantsSshkeysPutBadRequest() *PcloudTenantsSshkeysPutBadRequest { return &PcloudTenantsSshkeysPutBadRequest{} } -/* PcloudTenantsSshkeysPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudTenantsSshkeysPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +152,44 @@ type PcloudTenantsSshkeysPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys put bad request response has a 2xx status code +func (o *PcloudTenantsSshkeysPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys put bad request response has a 3xx status code +func (o *PcloudTenantsSshkeysPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys put bad request response has a 4xx status code +func (o *PcloudTenantsSshkeysPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys put bad request response has a 5xx status code +func (o *PcloudTenantsSshkeysPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys put bad request response a status code equal to that given +func (o *PcloudTenantsSshkeysPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud tenants sshkeys put bad request response +func (o *PcloudTenantsSshkeysPutBadRequest) Code() int { + return 400 +} + func (o *PcloudTenantsSshkeysPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudTenantsSshkeysPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudTenantsSshkeysPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +211,8 @@ func NewPcloudTenantsSshkeysPutUnauthorized() *PcloudTenantsSshkeysPutUnauthoriz return &PcloudTenantsSshkeysPutUnauthorized{} } -/* PcloudTenantsSshkeysPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudTenantsSshkeysPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +220,44 @@ type PcloudTenantsSshkeysPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys put unauthorized response has a 2xx status code +func (o *PcloudTenantsSshkeysPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys put unauthorized response has a 3xx status code +func (o *PcloudTenantsSshkeysPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys put unauthorized response has a 4xx status code +func (o *PcloudTenantsSshkeysPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys put unauthorized response has a 5xx status code +func (o *PcloudTenantsSshkeysPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys put unauthorized response a status code equal to that given +func (o *PcloudTenantsSshkeysPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud tenants sshkeys put unauthorized response +func (o *PcloudTenantsSshkeysPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudTenantsSshkeysPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudTenantsSshkeysPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudTenantsSshkeysPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +274,149 @@ 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{} } -/* PcloudTenantsSshkeysPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudTenantsSshkeysPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -167,9 +424,44 @@ type PcloudTenantsSshkeysPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys put unprocessable entity response has a 2xx status code +func (o *PcloudTenantsSshkeysPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys put unprocessable entity response has a 3xx status code +func (o *PcloudTenantsSshkeysPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys put unprocessable entity response has a 4xx status code +func (o *PcloudTenantsSshkeysPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud tenants sshkeys put unprocessable entity response has a 5xx status code +func (o *PcloudTenantsSshkeysPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud tenants sshkeys put unprocessable entity response a status code equal to that given +func (o *PcloudTenantsSshkeysPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud tenants sshkeys put unprocessable entity response +func (o *PcloudTenantsSshkeysPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudTenantsSshkeysPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudTenantsSshkeysPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudTenantsSshkeysPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -191,7 +483,8 @@ func NewPcloudTenantsSshkeysPutInternalServerError() *PcloudTenantsSshkeysPutInt return &PcloudTenantsSshkeysPutInternalServerError{} } -/* PcloudTenantsSshkeysPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudTenantsSshkeysPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +492,44 @@ type PcloudTenantsSshkeysPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud tenants sshkeys put internal server error response has a 2xx status code +func (o *PcloudTenantsSshkeysPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud tenants sshkeys put internal server error response has a 3xx status code +func (o *PcloudTenantsSshkeysPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud tenants sshkeys put internal server error response has a 4xx status code +func (o *PcloudTenantsSshkeysPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud tenants sshkeys put internal server error response has a 5xx status code +func (o *PcloudTenantsSshkeysPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud tenants sshkeys put internal server error response a status code equal to that given +func (o *PcloudTenantsSshkeysPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud tenants sshkeys put internal server error response +func (o *PcloudTenantsSshkeysPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudTenantsSshkeysPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudTenantsSshkeysPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/tenants/{tenant_id}/sshkeys/{sshkey_name}][%d] pcloudTenantsSshkeysPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudTenantsSshkeysPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go index 95a58fbebb0..33aac598d83 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go @@ -56,9 +56,9 @@ type ClientService interface { } /* - PcloudVpnconnectionsDelete deletes v p n connection +PcloudVpnconnectionsDelete deletes v p n connection - Delete VPN Connection (by its identifier) +Delete VPN Connection (by its identifier) */ func (a *Client) PcloudVpnconnectionsDelete(params *PcloudVpnconnectionsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsDeleteAccepted, error) { // TODO: Validate the params before sending @@ -97,9 +97,9 @@ func (a *Client) PcloudVpnconnectionsDelete(params *PcloudVpnconnectionsDeletePa } /* - PcloudVpnconnectionsGet gets v p n connection +PcloudVpnconnectionsGet gets v p n connection - Get a VPN Connection +Get a VPN Connection */ func (a *Client) PcloudVpnconnectionsGet(params *PcloudVpnconnectionsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsGetOK, error) { // TODO: Validate the params before sending @@ -138,9 +138,9 @@ func (a *Client) PcloudVpnconnectionsGet(params *PcloudVpnconnectionsGetParams, } /* - PcloudVpnconnectionsGetall gets all v p n connections +PcloudVpnconnectionsGetall gets all v p n connections - Get all VPN Connections +Get all VPN Connections */ func (a *Client) PcloudVpnconnectionsGetall(params *PcloudVpnconnectionsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsGetallOK, error) { // TODO: Validate the params before sending @@ -179,9 +179,9 @@ func (a *Client) PcloudVpnconnectionsGetall(params *PcloudVpnconnectionsGetallPa } /* - PcloudVpnconnectionsNetworksDelete detaches network +PcloudVpnconnectionsNetworksDelete detaches network - Detach network from a specific VPN Connection +Detach network from a specific VPN Connection */ func (a *Client) PcloudVpnconnectionsNetworksDelete(params *PcloudVpnconnectionsNetworksDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsNetworksDeleteAccepted, error) { // TODO: Validate the params before sending @@ -220,9 +220,9 @@ func (a *Client) PcloudVpnconnectionsNetworksDelete(params *PcloudVpnconnections } /* - PcloudVpnconnectionsNetworksGet gets attached networks +PcloudVpnconnectionsNetworksGet gets attached networks - Get a list of network IDs attached to a VPN Connection +Get a list of network IDs attached to a VPN Connection */ func (a *Client) PcloudVpnconnectionsNetworksGet(params *PcloudVpnconnectionsNetworksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsNetworksGetOK, error) { // TODO: Validate the params before sending @@ -261,9 +261,9 @@ func (a *Client) PcloudVpnconnectionsNetworksGet(params *PcloudVpnconnectionsNet } /* - PcloudVpnconnectionsNetworksPut attaches network +PcloudVpnconnectionsNetworksPut attaches network - Attach a network to a VPN Connection +Attach a network to a VPN Connection */ func (a *Client) PcloudVpnconnectionsNetworksPut(params *PcloudVpnconnectionsNetworksPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsNetworksPutAccepted, error) { // TODO: Validate the params before sending @@ -302,9 +302,9 @@ func (a *Client) PcloudVpnconnectionsNetworksPut(params *PcloudVpnconnectionsNet } /* - PcloudVpnconnectionsPeersubnetsDelete detaches peer subnet +PcloudVpnconnectionsPeersubnetsDelete detaches peer subnet - Detach peer subnet from a VPN Connection +Detach peer subnet from a VPN Connection */ func (a *Client) PcloudVpnconnectionsPeersubnetsDelete(params *PcloudVpnconnectionsPeersubnetsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPeersubnetsDeleteOK, error) { // TODO: Validate the params before sending @@ -343,9 +343,9 @@ func (a *Client) PcloudVpnconnectionsPeersubnetsDelete(params *PcloudVpnconnecti } /* - PcloudVpnconnectionsPeersubnetsGet gets peer subnets +PcloudVpnconnectionsPeersubnetsGet gets peer subnets - Get a list of peer subnets attached to a specific VPN Connection +Get a list of peer subnets attached to a specific VPN Connection */ func (a *Client) PcloudVpnconnectionsPeersubnetsGet(params *PcloudVpnconnectionsPeersubnetsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPeersubnetsGetOK, error) { // TODO: Validate the params before sending @@ -384,9 +384,9 @@ func (a *Client) PcloudVpnconnectionsPeersubnetsGet(params *PcloudVpnconnections } /* - PcloudVpnconnectionsPeersubnetsPut attaches peer subnet +PcloudVpnconnectionsPeersubnetsPut attaches peer subnet - Attach peer subnet to a VPN Connection +Attach peer subnet to a VPN Connection */ func (a *Client) PcloudVpnconnectionsPeersubnetsPut(params *PcloudVpnconnectionsPeersubnetsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPeersubnetsPutOK, error) { // TODO: Validate the params before sending @@ -425,9 +425,9 @@ func (a *Client) PcloudVpnconnectionsPeersubnetsPut(params *PcloudVpnconnections } /* - PcloudVpnconnectionsPost creates v p n connection +PcloudVpnconnectionsPost creates v p n connection - Create a new VPN Connection +Create a new VPN Connection */ func (a *Client) PcloudVpnconnectionsPost(params *PcloudVpnconnectionsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPostAccepted, error) { // TODO: Validate the params before sending @@ -466,9 +466,9 @@ func (a *Client) PcloudVpnconnectionsPost(params *PcloudVpnconnectionsPostParams } /* - PcloudVpnconnectionsPut updates v p n connection +PcloudVpnconnectionsPut updates v p n connection - update a VPN Connection (by its identifier) +update a VPN Connection (by its identifier) */ func (a *Client) PcloudVpnconnectionsPut(params *PcloudVpnconnectionsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVpnconnectionsPutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_parameters.go index 6bb03a9b94b..17957da78e6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVpnconnectionsDeleteParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudVpnconnectionsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections delete operation. +/* +PcloudVpnconnectionsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections delete operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go index cd546b15228..3ae8b3a6434 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go @@ -60,7 +60,7 @@ func (o *PcloudVpnconnectionsDeleteReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}] pcloud.vpnconnections.delete", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudVpnconnectionsDeleteAccepted() *PcloudVpnconnectionsDeleteAccepted return &PcloudVpnconnectionsDeleteAccepted{} } -/* PcloudVpnconnectionsDeleteAccepted describes a response with status code 202, with default header values. +/* +PcloudVpnconnectionsDeleteAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +78,44 @@ type PcloudVpnconnectionsDeleteAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud vpnconnections delete accepted response has a 2xx status code +func (o *PcloudVpnconnectionsDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections delete accepted response has a 3xx status code +func (o *PcloudVpnconnectionsDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections delete accepted response has a 4xx status code +func (o *PcloudVpnconnectionsDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections delete accepted response has a 5xx status code +func (o *PcloudVpnconnectionsDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections delete accepted response a status code equal to that given +func (o *PcloudVpnconnectionsDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud vpnconnections delete accepted response +func (o *PcloudVpnconnectionsDeleteAccepted) Code() int { + return 202 +} + func (o *PcloudVpnconnectionsDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteAccepted %+v", 202, o.Payload) } + +func (o *PcloudVpnconnectionsDeleteAccepted) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteAccepted %+v", 202, o.Payload) +} + func (o *PcloudVpnconnectionsDeleteAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudVpnconnectionsDeleteBadRequest() *PcloudVpnconnectionsDeleteBadReq return &PcloudVpnconnectionsDeleteBadRequest{} } -/* PcloudVpnconnectionsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudVpnconnectionsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections delete bad request response has a 2xx status code +func (o *PcloudVpnconnectionsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections delete bad request response has a 3xx status code +func (o *PcloudVpnconnectionsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections delete bad request response has a 4xx status code +func (o *PcloudVpnconnectionsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections delete bad request response has a 5xx status code +func (o *PcloudVpnconnectionsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections delete bad request response a status code equal to that given +func (o *PcloudVpnconnectionsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections delete bad request response +func (o *PcloudVpnconnectionsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudVpnconnectionsDeleteUnauthorized() *PcloudVpnconnectionsDeleteUnau return &PcloudVpnconnectionsDeleteUnauthorized{} } -/* PcloudVpnconnectionsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudVpnconnectionsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections delete unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections delete unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections delete unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections delete unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections delete unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections delete unauthorized response +func (o *PcloudVpnconnectionsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudVpnconnectionsDeleteForbidden() *PcloudVpnconnectionsDeleteForbidd return &PcloudVpnconnectionsDeleteForbidden{} } -/* PcloudVpnconnectionsDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudVpnconnectionsDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections delete forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections delete forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections delete forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections delete forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections delete forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections delete forbidden response +func (o *PcloudVpnconnectionsDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudVpnconnectionsDeleteNotFound() *PcloudVpnconnectionsDeleteNotFound return &PcloudVpnconnectionsDeleteNotFound{} } -/* PcloudVpnconnectionsDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudVpnconnectionsDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudVpnconnectionsDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections delete not found response has a 2xx status code +func (o *PcloudVpnconnectionsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections delete not found response has a 3xx status code +func (o *PcloudVpnconnectionsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections delete not found response has a 4xx status code +func (o *PcloudVpnconnectionsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections delete not found response has a 5xx status code +func (o *PcloudVpnconnectionsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections delete not found response a status code equal to that given +func (o *PcloudVpnconnectionsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections delete not found response +func (o *PcloudVpnconnectionsDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudVpnconnectionsDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudVpnconnectionsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudVpnconnectionsDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudVpnconnectionsDeleteInternalServerError() *PcloudVpnconnectionsDel return &PcloudVpnconnectionsDeleteInternalServerError{} } -/* PcloudVpnconnectionsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudVpnconnectionsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections delete internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections delete internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections delete internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections delete internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections delete internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections delete internal server error response +func (o *PcloudVpnconnectionsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_parameters.go index 9e34b4962b0..a9a6cc5a7b8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVpnconnectionsGetParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudVpnconnectionsGetParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections get operation. +/* +PcloudVpnconnectionsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections get operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go index 79413add9d7..0d4d0982faf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go @@ -66,7 +66,7 @@ func (o *PcloudVpnconnectionsGetReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}] pcloud.vpnconnections.get", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudVpnconnectionsGetOK() *PcloudVpnconnectionsGetOK { return &PcloudVpnconnectionsGetOK{} } -/* PcloudVpnconnectionsGetOK describes a response with status code 200, with default header values. +/* +PcloudVpnconnectionsGetOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudVpnconnectionsGetOK struct { Payload *models.VPNConnection } +// IsSuccess returns true when this pcloud vpnconnections get o k response has a 2xx status code +func (o *PcloudVpnconnectionsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections get o k response has a 3xx status code +func (o *PcloudVpnconnectionsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections get o k response has a 4xx status code +func (o *PcloudVpnconnectionsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections get o k response has a 5xx status code +func (o *PcloudVpnconnectionsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections get o k response a status code equal to that given +func (o *PcloudVpnconnectionsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud vpnconnections get o k response +func (o *PcloudVpnconnectionsGetOK) Code() int { + return 200 +} + func (o *PcloudVpnconnectionsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetOK %+v", 200, o.Payload) } + +func (o *PcloudVpnconnectionsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetOK %+v", 200, o.Payload) +} + func (o *PcloudVpnconnectionsGetOK) GetPayload() *models.VPNConnection { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudVpnconnectionsGetBadRequest() *PcloudVpnconnectionsGetBadRequest { return &PcloudVpnconnectionsGetBadRequest{} } -/* PcloudVpnconnectionsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudVpnconnectionsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections get bad request response has a 2xx status code +func (o *PcloudVpnconnectionsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections get bad request response has a 3xx status code +func (o *PcloudVpnconnectionsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections get bad request response has a 4xx status code +func (o *PcloudVpnconnectionsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections get bad request response has a 5xx status code +func (o *PcloudVpnconnectionsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections get bad request response a status code equal to that given +func (o *PcloudVpnconnectionsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections get bad request response +func (o *PcloudVpnconnectionsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudVpnconnectionsGetUnauthorized() *PcloudVpnconnectionsGetUnauthoriz return &PcloudVpnconnectionsGetUnauthorized{} } -/* PcloudVpnconnectionsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudVpnconnectionsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections get unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections get unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections get unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections get unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections get unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections get unauthorized response +func (o *PcloudVpnconnectionsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudVpnconnectionsGetForbidden() *PcloudVpnconnectionsGetForbidden { return &PcloudVpnconnectionsGetForbidden{} } -/* PcloudVpnconnectionsGetForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudVpnconnectionsGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections get forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections get forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections get forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections get forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections get forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections get forbidden response +func (o *PcloudVpnconnectionsGetForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudVpnconnectionsGetNotFound() *PcloudVpnconnectionsGetNotFound { return &PcloudVpnconnectionsGetNotFound{} } -/* PcloudVpnconnectionsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudVpnconnectionsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -211,9 +356,44 @@ type PcloudVpnconnectionsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections get not found response has a 2xx status code +func (o *PcloudVpnconnectionsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections get not found response has a 3xx status code +func (o *PcloudVpnconnectionsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections get not found response has a 4xx status code +func (o *PcloudVpnconnectionsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections get not found response has a 5xx status code +func (o *PcloudVpnconnectionsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections get not found response a status code equal to that given +func (o *PcloudVpnconnectionsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections get not found response +func (o *PcloudVpnconnectionsGetNotFound) Code() int { + return 404 +} + func (o *PcloudVpnconnectionsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudVpnconnectionsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudVpnconnectionsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudVpnconnectionsGetUnprocessableEntity() *PcloudVpnconnectionsGetUnp return &PcloudVpnconnectionsGetUnprocessableEntity{} } -/* PcloudVpnconnectionsGetUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVpnconnectionsGetUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +424,44 @@ type PcloudVpnconnectionsGetUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections get unprocessable entity response has a 2xx status code +func (o *PcloudVpnconnectionsGetUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections get unprocessable entity response has a 3xx status code +func (o *PcloudVpnconnectionsGetUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections get unprocessable entity response has a 4xx status code +func (o *PcloudVpnconnectionsGetUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections get unprocessable entity response has a 5xx status code +func (o *PcloudVpnconnectionsGetUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections get unprocessable entity response a status code equal to that given +func (o *PcloudVpnconnectionsGetUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud vpnconnections get unprocessable entity response +func (o *PcloudVpnconnectionsGetUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVpnconnectionsGetUnprocessableEntity) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVpnconnectionsGetUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVpnconnectionsGetUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudVpnconnectionsGetInternalServerError() *PcloudVpnconnectionsGetInt return &PcloudVpnconnectionsGetInternalServerError{} } -/* PcloudVpnconnectionsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudVpnconnectionsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections get internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections get internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections get internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections get internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections get internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections get internal server error response +func (o *PcloudVpnconnectionsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_parameters.go index 08d55e3aecd..d5e20f44f2c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVpnconnectionsGetallParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudVpnconnectionsGetallParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections getall operation. +/* +PcloudVpnconnectionsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections getall operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go index 487398c79ce..6eda5280ad6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go @@ -60,7 +60,7 @@ func (o *PcloudVpnconnectionsGetallReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections] pcloud.vpnconnections.getall", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudVpnconnectionsGetallOK() *PcloudVpnconnectionsGetallOK { return &PcloudVpnconnectionsGetallOK{} } -/* PcloudVpnconnectionsGetallOK describes a response with status code 200, with default header values. +/* +PcloudVpnconnectionsGetallOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudVpnconnectionsGetallOK struct { Payload *models.VPNConnections } +// IsSuccess returns true when this pcloud vpnconnections getall o k response has a 2xx status code +func (o *PcloudVpnconnectionsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections getall o k response has a 3xx status code +func (o *PcloudVpnconnectionsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections getall o k response has a 4xx status code +func (o *PcloudVpnconnectionsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections getall o k response has a 5xx status code +func (o *PcloudVpnconnectionsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections getall o k response a status code equal to that given +func (o *PcloudVpnconnectionsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud vpnconnections getall o k response +func (o *PcloudVpnconnectionsGetallOK) Code() int { + return 200 +} + func (o *PcloudVpnconnectionsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudVpnconnectionsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudVpnconnectionsGetallOK) GetPayload() *models.VPNConnections { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudVpnconnectionsGetallBadRequest() *PcloudVpnconnectionsGetallBadReq return &PcloudVpnconnectionsGetallBadRequest{} } -/* PcloudVpnconnectionsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudVpnconnectionsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections getall bad request response has a 2xx status code +func (o *PcloudVpnconnectionsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections getall bad request response has a 3xx status code +func (o *PcloudVpnconnectionsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections getall bad request response has a 4xx status code +func (o *PcloudVpnconnectionsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections getall bad request response has a 5xx status code +func (o *PcloudVpnconnectionsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections getall bad request response a status code equal to that given +func (o *PcloudVpnconnectionsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections getall bad request response +func (o *PcloudVpnconnectionsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudVpnconnectionsGetallUnauthorized() *PcloudVpnconnectionsGetallUnau return &PcloudVpnconnectionsGetallUnauthorized{} } -/* PcloudVpnconnectionsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudVpnconnectionsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections getall unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections getall unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections getall unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections getall unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections getall unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections getall unauthorized response +func (o *PcloudVpnconnectionsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudVpnconnectionsGetallForbidden() *PcloudVpnconnectionsGetallForbidd return &PcloudVpnconnectionsGetallForbidden{} } -/* PcloudVpnconnectionsGetallForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsGetallForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudVpnconnectionsGetallForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections getall forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections getall forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections getall forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections getall forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections getall forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections getall forbidden response +func (o *PcloudVpnconnectionsGetallForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsGetallForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsGetallForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudVpnconnectionsGetallNotFound() *PcloudVpnconnectionsGetallNotFound return &PcloudVpnconnectionsGetallNotFound{} } -/* PcloudVpnconnectionsGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudVpnconnectionsGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudVpnconnectionsGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections getall not found response has a 2xx status code +func (o *PcloudVpnconnectionsGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections getall not found response has a 3xx status code +func (o *PcloudVpnconnectionsGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections getall not found response has a 4xx status code +func (o *PcloudVpnconnectionsGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections getall not found response has a 5xx status code +func (o *PcloudVpnconnectionsGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections getall not found response a status code equal to that given +func (o *PcloudVpnconnectionsGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections getall not found response +func (o *PcloudVpnconnectionsGetallNotFound) Code() int { + return 404 +} + func (o *PcloudVpnconnectionsGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudVpnconnectionsGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudVpnconnectionsGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudVpnconnectionsGetallInternalServerError() *PcloudVpnconnectionsGet return &PcloudVpnconnectionsGetallInternalServerError{} } -/* PcloudVpnconnectionsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudVpnconnectionsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections getall internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections getall internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections getall internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections getall internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections getall internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections getall internal server error response +func (o *PcloudVpnconnectionsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_parameters.go index a7b4b14a236..30362f815f4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVpnconnectionsNetworksDeleteParamsWithHTTPClient(client *http.Clie } } -/* PcloudVpnconnectionsNetworksDeleteParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections networks delete operation. +/* +PcloudVpnconnectionsNetworksDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections networks delete operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsNetworksDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go index 4d2685a4b9d..76f62a5a37d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go @@ -66,7 +66,7 @@ func (o *PcloudVpnconnectionsNetworksDeleteReader) ReadResponse(response runtime } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks] pcloud.vpnconnections.networks.delete", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudVpnconnectionsNetworksDeleteAccepted() *PcloudVpnconnectionsNetwor return &PcloudVpnconnectionsNetworksDeleteAccepted{} } -/* PcloudVpnconnectionsNetworksDeleteAccepted describes a response with status code 202, with default header values. +/* +PcloudVpnconnectionsNetworksDeleteAccepted describes a response with status code 202, with default header values. Accepted */ @@ -83,9 +84,44 @@ type PcloudVpnconnectionsNetworksDeleteAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud vpnconnections networks delete accepted response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections networks delete accepted response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks delete accepted response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections networks delete accepted response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks delete accepted response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud vpnconnections networks delete accepted response +func (o *PcloudVpnconnectionsNetworksDeleteAccepted) Code() int { + return 202 +} + func (o *PcloudVpnconnectionsNetworksDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksDeleteAccepted) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteAccepted %+v", 202, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksDeleteAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudVpnconnectionsNetworksDeleteBadRequest() *PcloudVpnconnectionsNetw return &PcloudVpnconnectionsNetworksDeleteBadRequest{} } -/* PcloudVpnconnectionsNetworksDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsNetworksDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudVpnconnectionsNetworksDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks delete bad request response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks delete bad request response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks delete bad request response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks delete bad request response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks delete bad request response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections networks delete bad request response +func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudVpnconnectionsNetworksDeleteUnauthorized() *PcloudVpnconnectionsNe return &PcloudVpnconnectionsNetworksDeleteUnauthorized{} } -/* PcloudVpnconnectionsNetworksDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsNetworksDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudVpnconnectionsNetworksDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks delete unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks delete unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks delete unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks delete unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks delete unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections networks delete unauthorized response +func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudVpnconnectionsNetworksDeleteForbidden() *PcloudVpnconnectionsNetwo return &PcloudVpnconnectionsNetworksDeleteForbidden{} } -/* PcloudVpnconnectionsNetworksDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsNetworksDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudVpnconnectionsNetworksDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks delete forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks delete forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks delete forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks delete forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks delete forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections networks delete forbidden response +func (o *PcloudVpnconnectionsNetworksDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsNetworksDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudVpnconnectionsNetworksDeleteNotFound() *PcloudVpnconnectionsNetwor return &PcloudVpnconnectionsNetworksDeleteNotFound{} } -/* PcloudVpnconnectionsNetworksDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudVpnconnectionsNetworksDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -211,9 +356,44 @@ type PcloudVpnconnectionsNetworksDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks delete not found response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks delete not found response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks delete not found response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks delete not found response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks delete not found response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections networks delete not found response +func (o *PcloudVpnconnectionsNetworksDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudVpnconnectionsNetworksDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudVpnconnectionsNetworksDeleteUnprocessableEntity() *PcloudVpnconnec return &PcloudVpnconnectionsNetworksDeleteUnprocessableEntity{} } -/* PcloudVpnconnectionsNetworksDeleteUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVpnconnectionsNetworksDeleteUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +424,44 @@ type PcloudVpnconnectionsNetworksDeleteUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks delete unprocessable entity response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks delete unprocessable entity response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks delete unprocessable entity response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks delete unprocessable entity response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks delete unprocessable entity response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud vpnconnections networks delete unprocessable entity response +func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksDeleteUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudVpnconnectionsNetworksDeleteInternalServerError() *PcloudVpnconnec return &PcloudVpnconnectionsNetworksDeleteInternalServerError{} } -/* PcloudVpnconnectionsNetworksDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsNetworksDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudVpnconnectionsNetworksDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks delete internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks delete internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks delete internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections networks delete internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections networks delete internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections networks delete internal server error response +func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_parameters.go index a09738cfa28..10be75f09f9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVpnconnectionsNetworksGetParamsWithHTTPClient(client *http.Client) } } -/* PcloudVpnconnectionsNetworksGetParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections networks get operation. +/* +PcloudVpnconnectionsNetworksGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections networks get operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsNetworksGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go index de86c27f685..d7a825bbbe6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go @@ -60,7 +60,7 @@ func (o *PcloudVpnconnectionsNetworksGetReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks] pcloud.vpnconnections.networks.get", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudVpnconnectionsNetworksGetOK() *PcloudVpnconnectionsNetworksGetOK { return &PcloudVpnconnectionsNetworksGetOK{} } -/* PcloudVpnconnectionsNetworksGetOK describes a response with status code 200, with default header values. +/* +PcloudVpnconnectionsNetworksGetOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudVpnconnectionsNetworksGetOK struct { Payload *models.NetworkIDs } +// IsSuccess returns true when this pcloud vpnconnections networks get o k response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections networks get o k response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks get o k response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections networks get o k response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks get o k response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud vpnconnections networks get o k response +func (o *PcloudVpnconnectionsNetworksGetOK) Code() int { + return 200 +} + func (o *PcloudVpnconnectionsNetworksGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetOK %+v", 200, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetOK %+v", 200, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksGetOK) GetPayload() *models.NetworkIDs { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudVpnconnectionsNetworksGetBadRequest() *PcloudVpnconnectionsNetwork return &PcloudVpnconnectionsNetworksGetBadRequest{} } -/* PcloudVpnconnectionsNetworksGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsNetworksGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudVpnconnectionsNetworksGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks get bad request response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks get bad request response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks get bad request response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks get bad request response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks get bad request response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections networks get bad request response +func (o *PcloudVpnconnectionsNetworksGetBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsNetworksGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudVpnconnectionsNetworksGetUnauthorized() *PcloudVpnconnectionsNetwo return &PcloudVpnconnectionsNetworksGetUnauthorized{} } -/* PcloudVpnconnectionsNetworksGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsNetworksGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudVpnconnectionsNetworksGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks get unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks get unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks get unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks get unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks get unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections networks get unauthorized response +func (o *PcloudVpnconnectionsNetworksGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsNetworksGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudVpnconnectionsNetworksGetForbidden() *PcloudVpnconnectionsNetworks return &PcloudVpnconnectionsNetworksGetForbidden{} } -/* PcloudVpnconnectionsNetworksGetForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsNetworksGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudVpnconnectionsNetworksGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks get forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks get forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks get forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks get forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks get forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections networks get forbidden response +func (o *PcloudVpnconnectionsNetworksGetForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsNetworksGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudVpnconnectionsNetworksGetNotFound() *PcloudVpnconnectionsNetworksG return &PcloudVpnconnectionsNetworksGetNotFound{} } -/* PcloudVpnconnectionsNetworksGetNotFound describes a response with status code 404, with default header values. +/* +PcloudVpnconnectionsNetworksGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudVpnconnectionsNetworksGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks get not found response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks get not found response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks get not found response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks get not found response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks get not found response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections networks get not found response +func (o *PcloudVpnconnectionsNetworksGetNotFound) Code() int { + return 404 +} + func (o *PcloudVpnconnectionsNetworksGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudVpnconnectionsNetworksGetInternalServerError() *PcloudVpnconnectio return &PcloudVpnconnectionsNetworksGetInternalServerError{} } -/* PcloudVpnconnectionsNetworksGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsNetworksGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudVpnconnectionsNetworksGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks get internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks get internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks get internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections networks get internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections networks get internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections networks get internal server error response +func (o *PcloudVpnconnectionsNetworksGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsNetworksGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_parameters.go index 1cd48aa1573..9d7258f9750 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVpnconnectionsNetworksPutParamsWithHTTPClient(client *http.Client) } } -/* PcloudVpnconnectionsNetworksPutParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections networks put operation. +/* +PcloudVpnconnectionsNetworksPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections networks put operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsNetworksPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go index 4bcc8502d9b..f88d90353d4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go @@ -66,7 +66,7 @@ func (o *PcloudVpnconnectionsNetworksPutReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks] pcloud.vpnconnections.networks.put", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudVpnconnectionsNetworksPutAccepted() *PcloudVpnconnectionsNetworksP return &PcloudVpnconnectionsNetworksPutAccepted{} } -/* PcloudVpnconnectionsNetworksPutAccepted describes a response with status code 202, with default header values. +/* +PcloudVpnconnectionsNetworksPutAccepted describes a response with status code 202, with default header values. Accepted */ @@ -83,9 +84,44 @@ type PcloudVpnconnectionsNetworksPutAccepted struct { Payload *models.JobReference } +// IsSuccess returns true when this pcloud vpnconnections networks put accepted response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksPutAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections networks put accepted response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksPutAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks put accepted response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksPutAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections networks put accepted response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksPutAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks put accepted response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksPutAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud vpnconnections networks put accepted response +func (o *PcloudVpnconnectionsNetworksPutAccepted) Code() int { + return 202 +} + func (o *PcloudVpnconnectionsNetworksPutAccepted) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutAccepted %+v", 202, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksPutAccepted) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutAccepted %+v", 202, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksPutAccepted) GetPayload() *models.JobReference { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudVpnconnectionsNetworksPutBadRequest() *PcloudVpnconnectionsNetwork return &PcloudVpnconnectionsNetworksPutBadRequest{} } -/* PcloudVpnconnectionsNetworksPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsNetworksPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudVpnconnectionsNetworksPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks put bad request response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks put bad request response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks put bad request response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks put bad request response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks put bad request response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections networks put bad request response +func (o *PcloudVpnconnectionsNetworksPutBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsNetworksPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudVpnconnectionsNetworksPutUnauthorized() *PcloudVpnconnectionsNetwo return &PcloudVpnconnectionsNetworksPutUnauthorized{} } -/* PcloudVpnconnectionsNetworksPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsNetworksPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudVpnconnectionsNetworksPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks put unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks put unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks put unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks put unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks put unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections networks put unauthorized response +func (o *PcloudVpnconnectionsNetworksPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsNetworksPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudVpnconnectionsNetworksPutForbidden() *PcloudVpnconnectionsNetworks return &PcloudVpnconnectionsNetworksPutForbidden{} } -/* PcloudVpnconnectionsNetworksPutForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsNetworksPutForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudVpnconnectionsNetworksPutForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks put forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks put forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks put forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks put forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks put forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections networks put forbidden response +func (o *PcloudVpnconnectionsNetworksPutForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsNetworksPutForbidden) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksPutForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudVpnconnectionsNetworksPutNotFound() *PcloudVpnconnectionsNetworksP return &PcloudVpnconnectionsNetworksPutNotFound{} } -/* PcloudVpnconnectionsNetworksPutNotFound describes a response with status code 404, with default header values. +/* +PcloudVpnconnectionsNetworksPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -211,9 +356,44 @@ type PcloudVpnconnectionsNetworksPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks put not found response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks put not found response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks put not found response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks put not found response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks put not found response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections networks put not found response +func (o *PcloudVpnconnectionsNetworksPutNotFound) Code() int { + return 404 +} + func (o *PcloudVpnconnectionsNetworksPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudVpnconnectionsNetworksPutUnprocessableEntity() *PcloudVpnconnectio return &PcloudVpnconnectionsNetworksPutUnprocessableEntity{} } -/* PcloudVpnconnectionsNetworksPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVpnconnectionsNetworksPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +424,44 @@ type PcloudVpnconnectionsNetworksPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks put unprocessable entity response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks put unprocessable entity response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks put unprocessable entity response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections networks put unprocessable entity response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections networks put unprocessable entity response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud vpnconnections networks put unprocessable entity response +func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudVpnconnectionsNetworksPutInternalServerError() *PcloudVpnconnectio return &PcloudVpnconnectionsNetworksPutInternalServerError{} } -/* PcloudVpnconnectionsNetworksPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsNetworksPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudVpnconnectionsNetworksPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections networks put internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsNetworksPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections networks put internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsNetworksPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections networks put internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsNetworksPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections networks put internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsNetworksPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections networks put internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsNetworksPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections networks put internal server error response +func (o *PcloudVpnconnectionsNetworksPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsNetworksPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsNetworksPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/networks][%d] pcloudVpnconnectionsNetworksPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsNetworksPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_parameters.go index 5834aeab041..998b56730e7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVpnconnectionsPeersubnetsDeleteParamsWithHTTPClient(client *http.C } } -/* PcloudVpnconnectionsPeersubnetsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections peersubnets delete operation. +/* +PcloudVpnconnectionsPeersubnetsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections peersubnets delete operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsPeersubnetsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go index 5b6d05ba598..7679711ff1e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudVpnconnectionsPeersubnetsDeleteReader) ReadResponse(response runt } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets] pcloud.vpnconnections.peersubnets.delete", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudVpnconnectionsPeersubnetsDeleteOK() *PcloudVpnconnectionsPeersubne return &PcloudVpnconnectionsPeersubnetsDeleteOK{} } -/* PcloudVpnconnectionsPeersubnetsDeleteOK describes a response with status code 200, with default header values. +/* +PcloudVpnconnectionsPeersubnetsDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudVpnconnectionsPeersubnetsDeleteOK struct { Payload *models.PeerSubnets } +// IsSuccess returns true when this pcloud vpnconnections peersubnets delete o k response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets delete o k response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets delete o k response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets delete o k response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets delete o k response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets delete o k response +func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) Code() int { + return 200 +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteOK) GetPayload() *models.PeerSubnets { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudVpnconnectionsPeersubnetsDeleteBadRequest() *PcloudVpnconnectionsP return &PcloudVpnconnectionsPeersubnetsDeleteBadRequest{} } -/* PcloudVpnconnectionsPeersubnetsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsPeersubnetsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudVpnconnectionsPeersubnetsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets delete bad request response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets delete bad request response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets delete bad request response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets delete bad request response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets delete bad request response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets delete bad request response +func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudVpnconnectionsPeersubnetsDeleteUnauthorized() *PcloudVpnconnection return &PcloudVpnconnectionsPeersubnetsDeleteUnauthorized{} } -/* PcloudVpnconnectionsPeersubnetsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsPeersubnetsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudVpnconnectionsPeersubnetsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets delete unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets delete unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets delete unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets delete unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets delete unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets delete unauthorized response +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +279,8 @@ func NewPcloudVpnconnectionsPeersubnetsDeleteForbidden() *PcloudVpnconnectionsPe return &PcloudVpnconnectionsPeersubnetsDeleteForbidden{} } -/* PcloudVpnconnectionsPeersubnetsDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsPeersubnetsDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +288,44 @@ type PcloudVpnconnectionsPeersubnetsDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets delete forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets delete forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets delete forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets delete forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets delete forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets delete forbidden response +func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -192,12 +342,81 @@ 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{} } -/* PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +424,44 @@ type PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets delete unprocessable entity response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets delete unprocessable entity response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets delete unprocessable entity response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets delete unprocessable entity response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets delete unprocessable entity response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets delete unprocessable entity response +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudVpnconnectionsPeersubnetsDeleteInternalServerError() *PcloudVpncon return &PcloudVpnconnectionsPeersubnetsDeleteInternalServerError{} } -/* PcloudVpnconnectionsPeersubnetsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsPeersubnetsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudVpnconnectionsPeersubnetsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets delete internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets delete internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets delete internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets delete internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections peersubnets delete internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets delete internal server error response +func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_parameters.go index d17411fda91..8e05c88f13d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVpnconnectionsPeersubnetsGetParamsWithHTTPClient(client *http.Clie } } -/* PcloudVpnconnectionsPeersubnetsGetParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections peersubnets get operation. +/* +PcloudVpnconnectionsPeersubnetsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections peersubnets get operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsPeersubnetsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go index 6f9e64ef18f..b441a2ad666 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go @@ -60,7 +60,7 @@ func (o *PcloudVpnconnectionsPeersubnetsGetReader) ReadResponse(response runtime } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets] pcloud.vpnconnections.peersubnets.get", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudVpnconnectionsPeersubnetsGetOK() *PcloudVpnconnectionsPeersubnetsG return &PcloudVpnconnectionsPeersubnetsGetOK{} } -/* PcloudVpnconnectionsPeersubnetsGetOK describes a response with status code 200, with default header values. +/* +PcloudVpnconnectionsPeersubnetsGetOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudVpnconnectionsPeersubnetsGetOK struct { Payload *models.PeerSubnets } +// IsSuccess returns true when this pcloud vpnconnections peersubnets get o k response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets get o k response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets get o k response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets get o k response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets get o k response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets get o k response +func (o *PcloudVpnconnectionsPeersubnetsGetOK) Code() int { + return 200 +} + func (o *PcloudVpnconnectionsPeersubnetsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetOK %+v", 200, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetOK %+v", 200, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsGetOK) GetPayload() *models.PeerSubnets { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudVpnconnectionsPeersubnetsGetBadRequest() *PcloudVpnconnectionsPeer return &PcloudVpnconnectionsPeersubnetsGetBadRequest{} } -/* PcloudVpnconnectionsPeersubnetsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsPeersubnetsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudVpnconnectionsPeersubnetsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets get bad request response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets get bad request response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets get bad request response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets get bad request response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets get bad request response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets get bad request response +func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudVpnconnectionsPeersubnetsGetUnauthorized() *PcloudVpnconnectionsPe return &PcloudVpnconnectionsPeersubnetsGetUnauthorized{} } -/* PcloudVpnconnectionsPeersubnetsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsPeersubnetsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudVpnconnectionsPeersubnetsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets get unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets get unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets get unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets get unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets get unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets get unauthorized response +func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudVpnconnectionsPeersubnetsGetForbidden() *PcloudVpnconnectionsPeers return &PcloudVpnconnectionsPeersubnetsGetForbidden{} } -/* PcloudVpnconnectionsPeersubnetsGetForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsPeersubnetsGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudVpnconnectionsPeersubnetsGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets get forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets get forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets get forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets get forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets get forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets get forbidden response +func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudVpnconnectionsPeersubnetsGetNotFound() *PcloudVpnconnectionsPeersu return &PcloudVpnconnectionsPeersubnetsGetNotFound{} } -/* PcloudVpnconnectionsPeersubnetsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudVpnconnectionsPeersubnetsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudVpnconnectionsPeersubnetsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets get not found response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets get not found response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets get not found response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets get not found response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets get not found response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets get not found response +func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) Code() int { + return 404 +} + func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudVpnconnectionsPeersubnetsGetInternalServerError() *PcloudVpnconnec return &PcloudVpnconnectionsPeersubnetsGetInternalServerError{} } -/* PcloudVpnconnectionsPeersubnetsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsPeersubnetsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudVpnconnectionsPeersubnetsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets get internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets get internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets get internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets get internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections peersubnets get internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets get internal server error response +func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_parameters.go index 0f74fcc1555..4d15c6d5c74 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVpnconnectionsPeersubnetsPutParamsWithHTTPClient(client *http.Clie } } -/* PcloudVpnconnectionsPeersubnetsPutParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections peersubnets put operation. +/* +PcloudVpnconnectionsPeersubnetsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections peersubnets put operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsPeersubnetsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go index a9967c9a47c..76504c51656 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudVpnconnectionsPeersubnetsPutReader) ReadResponse(response runtime } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets] pcloud.vpnconnections.peersubnets.put", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudVpnconnectionsPeersubnetsPutOK() *PcloudVpnconnectionsPeersubnetsP return &PcloudVpnconnectionsPeersubnetsPutOK{} } -/* PcloudVpnconnectionsPeersubnetsPutOK describes a response with status code 200, with default header values. +/* +PcloudVpnconnectionsPeersubnetsPutOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudVpnconnectionsPeersubnetsPutOK struct { Payload *models.PeerSubnets } +// IsSuccess returns true when this pcloud vpnconnections peersubnets put o k response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets put o k response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets put o k response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets put o k response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets put o k response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets put o k response +func (o *PcloudVpnconnectionsPeersubnetsPutOK) Code() int { + return 200 +} + func (o *PcloudVpnconnectionsPeersubnetsPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutOK %+v", 200, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutOK %+v", 200, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsPutOK) GetPayload() *models.PeerSubnets { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudVpnconnectionsPeersubnetsPutBadRequest() *PcloudVpnconnectionsPeer return &PcloudVpnconnectionsPeersubnetsPutBadRequest{} } -/* PcloudVpnconnectionsPeersubnetsPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsPeersubnetsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudVpnconnectionsPeersubnetsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets put bad request response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets put bad request response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets put bad request response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets put bad request response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets put bad request response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets put bad request response +func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudVpnconnectionsPeersubnetsPutUnauthorized() *PcloudVpnconnectionsPe return &PcloudVpnconnectionsPeersubnetsPutUnauthorized{} } -/* PcloudVpnconnectionsPeersubnetsPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsPeersubnetsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudVpnconnectionsPeersubnetsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets put unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets put unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets put unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets put unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets put unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets put unauthorized response +func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +279,8 @@ func NewPcloudVpnconnectionsPeersubnetsPutForbidden() *PcloudVpnconnectionsPeers return &PcloudVpnconnectionsPeersubnetsPutForbidden{} } -/* PcloudVpnconnectionsPeersubnetsPutForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsPeersubnetsPutForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +288,44 @@ type PcloudVpnconnectionsPeersubnetsPutForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets put forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets put forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets put forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets put forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets put forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets put forbidden response +func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsPutForbidden) GetPayload() *models.Error { return o.Payload } @@ -192,12 +342,81 @@ 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{} } -/* PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +424,44 @@ type PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets put unprocessable entity response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets put unprocessable entity response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets put unprocessable entity response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets put unprocessable entity response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections peersubnets put unprocessable entity response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets put unprocessable entity response +func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudVpnconnectionsPeersubnetsPutInternalServerError() *PcloudVpnconnec return &PcloudVpnconnectionsPeersubnetsPutInternalServerError{} } -/* PcloudVpnconnectionsPeersubnetsPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsPeersubnetsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudVpnconnectionsPeersubnetsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections peersubnets put internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections peersubnets put internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections peersubnets put internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections peersubnets put internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections peersubnets put internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections peersubnets put internal server error response +func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}/peer-subnets][%d] pcloudVpnconnectionsPeersubnetsPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsPeersubnetsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_parameters.go index 0c10162117b..ae5b6423754 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVpnconnectionsPostParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudVpnconnectionsPostParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections post operation. +/* +PcloudVpnconnectionsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections post operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go index c4f1f0a6181..9611191bd29 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudVpnconnectionsPostReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections] pcloud.vpnconnections.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudVpnconnectionsPostAccepted() *PcloudVpnconnectionsPostAccepted { return &PcloudVpnconnectionsPostAccepted{} } -/* PcloudVpnconnectionsPostAccepted describes a response with status code 202, with default header values. +/* +PcloudVpnconnectionsPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -83,9 +90,44 @@ type PcloudVpnconnectionsPostAccepted struct { Payload *models.VPNConnectionCreateResponse } +// IsSuccess returns true when this pcloud vpnconnections post accepted response has a 2xx status code +func (o *PcloudVpnconnectionsPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections post accepted response has a 3xx status code +func (o *PcloudVpnconnectionsPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections post accepted response has a 4xx status code +func (o *PcloudVpnconnectionsPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections post accepted response has a 5xx status code +func (o *PcloudVpnconnectionsPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections post accepted response a status code equal to that given +func (o *PcloudVpnconnectionsPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud vpnconnections post accepted response +func (o *PcloudVpnconnectionsPostAccepted) Code() int { + return 202 +} + func (o *PcloudVpnconnectionsPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudVpnconnectionsPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudVpnconnectionsPostAccepted) GetPayload() *models.VPNConnectionCreateResponse { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudVpnconnectionsPostBadRequest() *PcloudVpnconnectionsPostBadRequest return &PcloudVpnconnectionsPostBadRequest{} } -/* PcloudVpnconnectionsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudVpnconnectionsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections post bad request response has a 2xx status code +func (o *PcloudVpnconnectionsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections post bad request response has a 3xx status code +func (o *PcloudVpnconnectionsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections post bad request response has a 4xx status code +func (o *PcloudVpnconnectionsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections post bad request response has a 5xx status code +func (o *PcloudVpnconnectionsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections post bad request response a status code equal to that given +func (o *PcloudVpnconnectionsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections post bad request response +func (o *PcloudVpnconnectionsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudVpnconnectionsPostUnauthorized() *PcloudVpnconnectionsPostUnauthor return &PcloudVpnconnectionsPostUnauthorized{} } -/* PcloudVpnconnectionsPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudVpnconnectionsPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections post unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections post unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections post unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections post unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections post unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections post unauthorized response +func (o *PcloudVpnconnectionsPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +285,8 @@ func NewPcloudVpnconnectionsPostForbidden() *PcloudVpnconnectionsPostForbidden { return &PcloudVpnconnectionsPostForbidden{} } -/* PcloudVpnconnectionsPostForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +294,44 @@ type PcloudVpnconnectionsPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections post forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections post forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections post forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections post forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections post forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections post forbidden response +func (o *PcloudVpnconnectionsPostForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -198,12 +348,81 @@ 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{} } -/* PcloudVpnconnectionsPostConflict describes a response with status code 409, with default header values. +/* +PcloudVpnconnectionsPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +430,44 @@ type PcloudVpnconnectionsPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections post conflict response has a 2xx status code +func (o *PcloudVpnconnectionsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections post conflict response has a 3xx status code +func (o *PcloudVpnconnectionsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections post conflict response has a 4xx status code +func (o *PcloudVpnconnectionsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections post conflict response has a 5xx status code +func (o *PcloudVpnconnectionsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections post conflict response a status code equal to that given +func (o *PcloudVpnconnectionsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud vpnconnections post conflict response +func (o *PcloudVpnconnectionsPostConflict) Code() int { + return 409 +} + func (o *PcloudVpnconnectionsPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostConflict %+v", 409, o.Payload) } + +func (o *PcloudVpnconnectionsPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostConflict %+v", 409, o.Payload) +} + func (o *PcloudVpnconnectionsPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudVpnconnectionsPostUnprocessableEntity() *PcloudVpnconnectionsPostU return &PcloudVpnconnectionsPostUnprocessableEntity{} } -/* PcloudVpnconnectionsPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVpnconnectionsPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudVpnconnectionsPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections post unprocessable entity response has a 2xx status code +func (o *PcloudVpnconnectionsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections post unprocessable entity response has a 3xx status code +func (o *PcloudVpnconnectionsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections post unprocessable entity response has a 4xx status code +func (o *PcloudVpnconnectionsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections post unprocessable entity response has a 5xx status code +func (o *PcloudVpnconnectionsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections post unprocessable entity response a status code equal to that given +func (o *PcloudVpnconnectionsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud vpnconnections post unprocessable entity response +func (o *PcloudVpnconnectionsPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVpnconnectionsPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVpnconnectionsPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVpnconnectionsPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudVpnconnectionsPostInternalServerError() *PcloudVpnconnectionsPostI return &PcloudVpnconnectionsPostInternalServerError{} } -/* PcloudVpnconnectionsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudVpnconnectionsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections post internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections post internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections post internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections post internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections post internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections post internal server error response +func (o *PcloudVpnconnectionsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections][%d] pcloudVpnconnectionsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_parameters.go index 5775cb00858..55b6b90cbab 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVpnconnectionsPutParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudVpnconnectionsPutParams contains all the parameters to send to the API endpoint - for the pcloud vpnconnections put operation. +/* +PcloudVpnconnectionsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud vpnconnections put operation. + + Typically these are written to a http.Request. */ type PcloudVpnconnectionsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go index 2e2026de05c..d5e359ebc68 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go @@ -66,7 +66,7 @@ func (o *PcloudVpnconnectionsPutReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}] pcloud.vpnconnections.put", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudVpnconnectionsPutOK() *PcloudVpnconnectionsPutOK { return &PcloudVpnconnectionsPutOK{} } -/* PcloudVpnconnectionsPutOK describes a response with status code 200, with default header values. +/* +PcloudVpnconnectionsPutOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudVpnconnectionsPutOK struct { Payload *models.VPNConnection } +// IsSuccess returns true when this pcloud vpnconnections put o k response has a 2xx status code +func (o *PcloudVpnconnectionsPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud vpnconnections put o k response has a 3xx status code +func (o *PcloudVpnconnectionsPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections put o k response has a 4xx status code +func (o *PcloudVpnconnectionsPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections put o k response has a 5xx status code +func (o *PcloudVpnconnectionsPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections put o k response a status code equal to that given +func (o *PcloudVpnconnectionsPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud vpnconnections put o k response +func (o *PcloudVpnconnectionsPutOK) Code() int { + return 200 +} + func (o *PcloudVpnconnectionsPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutOK %+v", 200, o.Payload) } + +func (o *PcloudVpnconnectionsPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutOK %+v", 200, o.Payload) +} + func (o *PcloudVpnconnectionsPutOK) GetPayload() *models.VPNConnection { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudVpnconnectionsPutBadRequest() *PcloudVpnconnectionsPutBadRequest { return &PcloudVpnconnectionsPutBadRequest{} } -/* PcloudVpnconnectionsPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudVpnconnectionsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudVpnconnectionsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections put bad request response has a 2xx status code +func (o *PcloudVpnconnectionsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections put bad request response has a 3xx status code +func (o *PcloudVpnconnectionsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections put bad request response has a 4xx status code +func (o *PcloudVpnconnectionsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections put bad request response has a 5xx status code +func (o *PcloudVpnconnectionsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections put bad request response a status code equal to that given +func (o *PcloudVpnconnectionsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud vpnconnections put bad request response +func (o *PcloudVpnconnectionsPutBadRequest) Code() int { + return 400 +} + func (o *PcloudVpnconnectionsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVpnconnectionsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVpnconnectionsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudVpnconnectionsPutUnauthorized() *PcloudVpnconnectionsPutUnauthoriz return &PcloudVpnconnectionsPutUnauthorized{} } -/* PcloudVpnconnectionsPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVpnconnectionsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudVpnconnectionsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections put unauthorized response has a 2xx status code +func (o *PcloudVpnconnectionsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections put unauthorized response has a 3xx status code +func (o *PcloudVpnconnectionsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections put unauthorized response has a 4xx status code +func (o *PcloudVpnconnectionsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections put unauthorized response has a 5xx status code +func (o *PcloudVpnconnectionsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections put unauthorized response a status code equal to that given +func (o *PcloudVpnconnectionsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud vpnconnections put unauthorized response +func (o *PcloudVpnconnectionsPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudVpnconnectionsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVpnconnectionsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVpnconnectionsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudVpnconnectionsPutForbidden() *PcloudVpnconnectionsPutForbidden { return &PcloudVpnconnectionsPutForbidden{} } -/* PcloudVpnconnectionsPutForbidden describes a response with status code 403, with default header values. +/* +PcloudVpnconnectionsPutForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudVpnconnectionsPutForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections put forbidden response has a 2xx status code +func (o *PcloudVpnconnectionsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections put forbidden response has a 3xx status code +func (o *PcloudVpnconnectionsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections put forbidden response has a 4xx status code +func (o *PcloudVpnconnectionsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections put forbidden response has a 5xx status code +func (o *PcloudVpnconnectionsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections put forbidden response a status code equal to that given +func (o *PcloudVpnconnectionsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud vpnconnections put forbidden response +func (o *PcloudVpnconnectionsPutForbidden) Code() int { + return 403 +} + func (o *PcloudVpnconnectionsPutForbidden) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutForbidden %+v", 403, o.Payload) } + +func (o *PcloudVpnconnectionsPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutForbidden %+v", 403, o.Payload) +} + func (o *PcloudVpnconnectionsPutForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudVpnconnectionsPutNotFound() *PcloudVpnconnectionsPutNotFound { return &PcloudVpnconnectionsPutNotFound{} } -/* PcloudVpnconnectionsPutNotFound describes a response with status code 404, with default header values. +/* +PcloudVpnconnectionsPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -211,9 +356,44 @@ type PcloudVpnconnectionsPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections put not found response has a 2xx status code +func (o *PcloudVpnconnectionsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections put not found response has a 3xx status code +func (o *PcloudVpnconnectionsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections put not found response has a 4xx status code +func (o *PcloudVpnconnectionsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections put not found response has a 5xx status code +func (o *PcloudVpnconnectionsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections put not found response a status code equal to that given +func (o *PcloudVpnconnectionsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud vpnconnections put not found response +func (o *PcloudVpnconnectionsPutNotFound) Code() int { + return 404 +} + func (o *PcloudVpnconnectionsPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudVpnconnectionsPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudVpnconnectionsPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudVpnconnectionsPutUnprocessableEntity() *PcloudVpnconnectionsPutUnp return &PcloudVpnconnectionsPutUnprocessableEntity{} } -/* PcloudVpnconnectionsPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVpnconnectionsPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +424,44 @@ type PcloudVpnconnectionsPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections put unprocessable entity response has a 2xx status code +func (o *PcloudVpnconnectionsPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections put unprocessable entity response has a 3xx status code +func (o *PcloudVpnconnectionsPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections put unprocessable entity response has a 4xx status code +func (o *PcloudVpnconnectionsPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud vpnconnections put unprocessable entity response has a 5xx status code +func (o *PcloudVpnconnectionsPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud vpnconnections put unprocessable entity response a status code equal to that given +func (o *PcloudVpnconnectionsPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud vpnconnections put unprocessable entity response +func (o *PcloudVpnconnectionsPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVpnconnectionsPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVpnconnectionsPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVpnconnectionsPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudVpnconnectionsPutInternalServerError() *PcloudVpnconnectionsPutInt return &PcloudVpnconnectionsPutInternalServerError{} } -/* PcloudVpnconnectionsPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVpnconnectionsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudVpnconnectionsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud vpnconnections put internal server error response has a 2xx status code +func (o *PcloudVpnconnectionsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud vpnconnections put internal server error response has a 3xx status code +func (o *PcloudVpnconnectionsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud vpnconnections put internal server error response has a 4xx status code +func (o *PcloudVpnconnectionsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud vpnconnections put internal server error response has a 5xx status code +func (o *PcloudVpnconnectionsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud vpnconnections put internal server error response a status code equal to that given +func (o *PcloudVpnconnectionsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud vpnconnections put internal server error response +func (o *PcloudVpnconnectionsPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudVpnconnectionsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVpnconnectionsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/vpn-connections/{vpn_connection_id}][%d] pcloudVpnconnectionsPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVpnconnectionsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go index 677be4f2fbb..65300d6d30c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go @@ -54,9 +54,9 @@ type ClientService interface { } /* - PcloudIkepoliciesDelete deletes i k e policy +PcloudIkepoliciesDelete deletes i k e policy - Delete an IKE Policy (by its unique identifier) +Delete an IKE Policy (by its unique identifier) */ func (a *Client) PcloudIkepoliciesDelete(params *PcloudIkepoliciesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesDeleteOK, error) { // TODO: Validate the params before sending @@ -95,9 +95,9 @@ func (a *Client) PcloudIkepoliciesDelete(params *PcloudIkepoliciesDeleteParams, } /* - PcloudIkepoliciesGet gets the specified i k e policy +PcloudIkepoliciesGet gets the specified i k e policy - Get an IKE Policy (by its unique identifier) +Get an IKE Policy (by its unique identifier) */ func (a *Client) PcloudIkepoliciesGet(params *PcloudIkepoliciesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesGetOK, error) { // TODO: Validate the params before sending @@ -136,9 +136,9 @@ func (a *Client) PcloudIkepoliciesGet(params *PcloudIkepoliciesGetParams, authIn } /* - PcloudIkepoliciesGetall gets all i k e policies +PcloudIkepoliciesGetall gets all i k e policies - List all IKE Policies with all attributes +List all IKE Policies with all attributes */ func (a *Client) PcloudIkepoliciesGetall(params *PcloudIkepoliciesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesGetallOK, error) { // TODO: Validate the params before sending @@ -177,9 +177,9 @@ func (a *Client) PcloudIkepoliciesGetall(params *PcloudIkepoliciesGetallParams, } /* - PcloudIkepoliciesPost adds i k e policy +PcloudIkepoliciesPost adds i k e policy - Add a new IKE Policy +Add a new IKE Policy */ func (a *Client) PcloudIkepoliciesPost(params *PcloudIkepoliciesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesPostOK, error) { // TODO: Validate the params before sending @@ -218,9 +218,9 @@ func (a *Client) PcloudIkepoliciesPost(params *PcloudIkepoliciesPostParams, auth } /* - PcloudIkepoliciesPut updates i k e policy +PcloudIkepoliciesPut updates i k e policy - update an IKE Policy (by its unique identifier) +update an IKE Policy (by its unique identifier) */ func (a *Client) PcloudIkepoliciesPut(params *PcloudIkepoliciesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIkepoliciesPutOK, error) { // TODO: Validate the params before sending @@ -259,9 +259,9 @@ func (a *Client) PcloudIkepoliciesPut(params *PcloudIkepoliciesPutParams, authIn } /* - PcloudIpsecpoliciesDelete deletes IP sec policy +PcloudIpsecpoliciesDelete deletes IP sec policy - Delete an IPSec Policy (by its unique identifier) +Delete an IPSec Policy (by its unique identifier) */ func (a *Client) PcloudIpsecpoliciesDelete(params *PcloudIpsecpoliciesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesDeleteOK, error) { // TODO: Validate the params before sending @@ -300,9 +300,9 @@ func (a *Client) PcloudIpsecpoliciesDelete(params *PcloudIpsecpoliciesDeletePara } /* - PcloudIpsecpoliciesGet gets the specified IP sec policy +PcloudIpsecpoliciesGet gets the specified IP sec policy - Get an IPSec Policy (by its unique identifier) +Get an IPSec Policy (by its unique identifier) */ func (a *Client) PcloudIpsecpoliciesGet(params *PcloudIpsecpoliciesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesGetOK, error) { // TODO: Validate the params before sending @@ -341,9 +341,9 @@ func (a *Client) PcloudIpsecpoliciesGet(params *PcloudIpsecpoliciesGetParams, au } /* - PcloudIpsecpoliciesGetall gets all IP sec policies +PcloudIpsecpoliciesGetall gets all IP sec policies - Get all IPSec Policies with all their attributes +Get all IPSec Policies with all their attributes */ func (a *Client) PcloudIpsecpoliciesGetall(params *PcloudIpsecpoliciesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesGetallOK, error) { // TODO: Validate the params before sending @@ -382,9 +382,9 @@ func (a *Client) PcloudIpsecpoliciesGetall(params *PcloudIpsecpoliciesGetallPara } /* - PcloudIpsecpoliciesPost adds IP sec policy +PcloudIpsecpoliciesPost adds IP sec policy - Add a new IPSec Policy +Add a new IPSec Policy */ func (a *Client) PcloudIpsecpoliciesPost(params *PcloudIpsecpoliciesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesPostOK, error) { // TODO: Validate the params before sending @@ -423,9 +423,9 @@ func (a *Client) PcloudIpsecpoliciesPost(params *PcloudIpsecpoliciesPostParams, } /* - PcloudIpsecpoliciesPut updates IP sec policy +PcloudIpsecpoliciesPut updates IP sec policy - update an IPSec Policy +update an IPSec Policy */ func (a *Client) PcloudIpsecpoliciesPut(params *PcloudIpsecpoliciesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudIpsecpoliciesPutOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_parameters.go index 7463101da64..cebd8de705d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudIkepoliciesDeleteParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudIkepoliciesDeleteParams contains all the parameters to send to the API endpoint - for the pcloud ikepolicies delete operation. +/* +PcloudIkepoliciesDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ikepolicies delete operation. + + Typically these are written to a http.Request. */ type PcloudIkepoliciesDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go index 6e717941063..353903c5802 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go @@ -60,7 +60,7 @@ func (o *PcloudIkepoliciesDeleteReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}] pcloud.ikepolicies.delete", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudIkepoliciesDeleteOK() *PcloudIkepoliciesDeleteOK { return &PcloudIkepoliciesDeleteOK{} } -/* PcloudIkepoliciesDeleteOK describes a response with status code 200, with default header values. +/* +PcloudIkepoliciesDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudIkepoliciesDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud ikepolicies delete o k response has a 2xx status code +func (o *PcloudIkepoliciesDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ikepolicies delete o k response has a 3xx status code +func (o *PcloudIkepoliciesDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies delete o k response has a 4xx status code +func (o *PcloudIkepoliciesDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies delete o k response has a 5xx status code +func (o *PcloudIkepoliciesDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies delete o k response a status code equal to that given +func (o *PcloudIkepoliciesDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ikepolicies delete o k response +func (o *PcloudIkepoliciesDeleteOK) Code() int { + return 200 +} + func (o *PcloudIkepoliciesDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudIkepoliciesDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudIkepoliciesDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +135,8 @@ func NewPcloudIkepoliciesDeleteBadRequest() *PcloudIkepoliciesDeleteBadRequest { return &PcloudIkepoliciesDeleteBadRequest{} } -/* PcloudIkepoliciesDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudIkepoliciesDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +144,44 @@ type PcloudIkepoliciesDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies delete bad request response has a 2xx status code +func (o *PcloudIkepoliciesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies delete bad request response has a 3xx status code +func (o *PcloudIkepoliciesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies delete bad request response has a 4xx status code +func (o *PcloudIkepoliciesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies delete bad request response has a 5xx status code +func (o *PcloudIkepoliciesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies delete bad request response a status code equal to that given +func (o *PcloudIkepoliciesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ikepolicies delete bad request response +func (o *PcloudIkepoliciesDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudIkepoliciesDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIkepoliciesDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIkepoliciesDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +203,8 @@ func NewPcloudIkepoliciesDeleteUnauthorized() *PcloudIkepoliciesDeleteUnauthoriz return &PcloudIkepoliciesDeleteUnauthorized{} } -/* PcloudIkepoliciesDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIkepoliciesDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +212,44 @@ type PcloudIkepoliciesDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies delete unauthorized response has a 2xx status code +func (o *PcloudIkepoliciesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies delete unauthorized response has a 3xx status code +func (o *PcloudIkepoliciesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies delete unauthorized response has a 4xx status code +func (o *PcloudIkepoliciesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies delete unauthorized response has a 5xx status code +func (o *PcloudIkepoliciesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies delete unauthorized response a status code equal to that given +func (o *PcloudIkepoliciesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ikepolicies delete unauthorized response +func (o *PcloudIkepoliciesDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudIkepoliciesDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIkepoliciesDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIkepoliciesDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -163,7 +271,8 @@ func NewPcloudIkepoliciesDeleteForbidden() *PcloudIkepoliciesDeleteForbidden { return &PcloudIkepoliciesDeleteForbidden{} } -/* PcloudIkepoliciesDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudIkepoliciesDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -171,9 +280,44 @@ type PcloudIkepoliciesDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies delete forbidden response has a 2xx status code +func (o *PcloudIkepoliciesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies delete forbidden response has a 3xx status code +func (o *PcloudIkepoliciesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies delete forbidden response has a 4xx status code +func (o *PcloudIkepoliciesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies delete forbidden response has a 5xx status code +func (o *PcloudIkepoliciesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies delete forbidden response a status code equal to that given +func (o *PcloudIkepoliciesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ikepolicies delete forbidden response +func (o *PcloudIkepoliciesDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudIkepoliciesDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudIkepoliciesDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudIkepoliciesDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -195,7 +339,8 @@ func NewPcloudIkepoliciesDeleteNotFound() *PcloudIkepoliciesDeleteNotFound { return &PcloudIkepoliciesDeleteNotFound{} } -/* PcloudIkepoliciesDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudIkepoliciesDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -203,9 +348,44 @@ type PcloudIkepoliciesDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies delete not found response has a 2xx status code +func (o *PcloudIkepoliciesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies delete not found response has a 3xx status code +func (o *PcloudIkepoliciesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies delete not found response has a 4xx status code +func (o *PcloudIkepoliciesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies delete not found response has a 5xx status code +func (o *PcloudIkepoliciesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies delete not found response a status code equal to that given +func (o *PcloudIkepoliciesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ikepolicies delete not found response +func (o *PcloudIkepoliciesDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudIkepoliciesDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudIkepoliciesDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudIkepoliciesDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -227,7 +407,8 @@ func NewPcloudIkepoliciesDeleteInternalServerError() *PcloudIkepoliciesDeleteInt return &PcloudIkepoliciesDeleteInternalServerError{} } -/* PcloudIkepoliciesDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIkepoliciesDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +416,44 @@ type PcloudIkepoliciesDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies delete internal server error response has a 2xx status code +func (o *PcloudIkepoliciesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies delete internal server error response has a 3xx status code +func (o *PcloudIkepoliciesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies delete internal server error response has a 4xx status code +func (o *PcloudIkepoliciesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies delete internal server error response has a 5xx status code +func (o *PcloudIkepoliciesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ikepolicies delete internal server error response a status code equal to that given +func (o *PcloudIkepoliciesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ikepolicies delete internal server error response +func (o *PcloudIkepoliciesDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudIkepoliciesDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIkepoliciesDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIkepoliciesDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_parameters.go index 9a0318cff3d..7c6ac1e81e0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudIkepoliciesGetParamsWithHTTPClient(client *http.Client) *PcloudIke } } -/* PcloudIkepoliciesGetParams contains all the parameters to send to the API endpoint - for the pcloud ikepolicies get operation. +/* +PcloudIkepoliciesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ikepolicies get operation. + + Typically these are written to a http.Request. */ type PcloudIkepoliciesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go index d6d3b799c0f..b8cf3d12597 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go @@ -66,7 +66,7 @@ func (o *PcloudIkepoliciesGetReader) ReadResponse(response runtime.ClientRespons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}] pcloud.ikepolicies.get", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudIkepoliciesGetOK() *PcloudIkepoliciesGetOK { return &PcloudIkepoliciesGetOK{} } -/* PcloudIkepoliciesGetOK describes a response with status code 200, with default header values. +/* +PcloudIkepoliciesGetOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudIkepoliciesGetOK struct { Payload *models.IKEPolicy } +// IsSuccess returns true when this pcloud ikepolicies get o k response has a 2xx status code +func (o *PcloudIkepoliciesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ikepolicies get o k response has a 3xx status code +func (o *PcloudIkepoliciesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies get o k response has a 4xx status code +func (o *PcloudIkepoliciesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies get o k response has a 5xx status code +func (o *PcloudIkepoliciesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies get o k response a status code equal to that given +func (o *PcloudIkepoliciesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ikepolicies get o k response +func (o *PcloudIkepoliciesGetOK) Code() int { + return 200 +} + func (o *PcloudIkepoliciesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetOK %+v", 200, o.Payload) } + +func (o *PcloudIkepoliciesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetOK %+v", 200, o.Payload) +} + func (o *PcloudIkepoliciesGetOK) GetPayload() *models.IKEPolicy { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudIkepoliciesGetBadRequest() *PcloudIkepoliciesGetBadRequest { return &PcloudIkepoliciesGetBadRequest{} } -/* PcloudIkepoliciesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudIkepoliciesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudIkepoliciesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies get bad request response has a 2xx status code +func (o *PcloudIkepoliciesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies get bad request response has a 3xx status code +func (o *PcloudIkepoliciesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies get bad request response has a 4xx status code +func (o *PcloudIkepoliciesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies get bad request response has a 5xx status code +func (o *PcloudIkepoliciesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies get bad request response a status code equal to that given +func (o *PcloudIkepoliciesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ikepolicies get bad request response +func (o *PcloudIkepoliciesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudIkepoliciesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIkepoliciesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIkepoliciesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudIkepoliciesGetUnauthorized() *PcloudIkepoliciesGetUnauthorized { return &PcloudIkepoliciesGetUnauthorized{} } -/* PcloudIkepoliciesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIkepoliciesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudIkepoliciesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies get unauthorized response has a 2xx status code +func (o *PcloudIkepoliciesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies get unauthorized response has a 3xx status code +func (o *PcloudIkepoliciesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies get unauthorized response has a 4xx status code +func (o *PcloudIkepoliciesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies get unauthorized response has a 5xx status code +func (o *PcloudIkepoliciesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies get unauthorized response a status code equal to that given +func (o *PcloudIkepoliciesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ikepolicies get unauthorized response +func (o *PcloudIkepoliciesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudIkepoliciesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIkepoliciesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIkepoliciesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudIkepoliciesGetForbidden() *PcloudIkepoliciesGetForbidden { return &PcloudIkepoliciesGetForbidden{} } -/* PcloudIkepoliciesGetForbidden describes a response with status code 403, with default header values. +/* +PcloudIkepoliciesGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudIkepoliciesGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies get forbidden response has a 2xx status code +func (o *PcloudIkepoliciesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies get forbidden response has a 3xx status code +func (o *PcloudIkepoliciesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies get forbidden response has a 4xx status code +func (o *PcloudIkepoliciesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies get forbidden response has a 5xx status code +func (o *PcloudIkepoliciesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies get forbidden response a status code equal to that given +func (o *PcloudIkepoliciesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ikepolicies get forbidden response +func (o *PcloudIkepoliciesGetForbidden) Code() int { + return 403 +} + func (o *PcloudIkepoliciesGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudIkepoliciesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudIkepoliciesGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudIkepoliciesGetNotFound() *PcloudIkepoliciesGetNotFound { return &PcloudIkepoliciesGetNotFound{} } -/* PcloudIkepoliciesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudIkepoliciesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -211,9 +356,44 @@ type PcloudIkepoliciesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies get not found response has a 2xx status code +func (o *PcloudIkepoliciesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies get not found response has a 3xx status code +func (o *PcloudIkepoliciesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies get not found response has a 4xx status code +func (o *PcloudIkepoliciesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies get not found response has a 5xx status code +func (o *PcloudIkepoliciesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies get not found response a status code equal to that given +func (o *PcloudIkepoliciesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ikepolicies get not found response +func (o *PcloudIkepoliciesGetNotFound) Code() int { + return 404 +} + func (o *PcloudIkepoliciesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudIkepoliciesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudIkepoliciesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudIkepoliciesGetUnprocessableEntity() *PcloudIkepoliciesGetUnprocess return &PcloudIkepoliciesGetUnprocessableEntity{} } -/* PcloudIkepoliciesGetUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudIkepoliciesGetUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +424,44 @@ type PcloudIkepoliciesGetUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies get unprocessable entity response has a 2xx status code +func (o *PcloudIkepoliciesGetUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies get unprocessable entity response has a 3xx status code +func (o *PcloudIkepoliciesGetUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies get unprocessable entity response has a 4xx status code +func (o *PcloudIkepoliciesGetUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies get unprocessable entity response has a 5xx status code +func (o *PcloudIkepoliciesGetUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies get unprocessable entity response a status code equal to that given +func (o *PcloudIkepoliciesGetUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud ikepolicies get unprocessable entity response +func (o *PcloudIkepoliciesGetUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudIkepoliciesGetUnprocessableEntity) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudIkepoliciesGetUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudIkepoliciesGetUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudIkepoliciesGetInternalServerError() *PcloudIkepoliciesGetInternalS return &PcloudIkepoliciesGetInternalServerError{} } -/* PcloudIkepoliciesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIkepoliciesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudIkepoliciesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies get internal server error response has a 2xx status code +func (o *PcloudIkepoliciesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies get internal server error response has a 3xx status code +func (o *PcloudIkepoliciesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies get internal server error response has a 4xx status code +func (o *PcloudIkepoliciesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies get internal server error response has a 5xx status code +func (o *PcloudIkepoliciesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ikepolicies get internal server error response a status code equal to that given +func (o *PcloudIkepoliciesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ikepolicies get internal server error response +func (o *PcloudIkepoliciesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudIkepoliciesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIkepoliciesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIkepoliciesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_parameters.go index c83d29a40df..a72e0935e81 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudIkepoliciesGetallParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudIkepoliciesGetallParams contains all the parameters to send to the API endpoint - for the pcloud ikepolicies getall operation. +/* +PcloudIkepoliciesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ikepolicies getall operation. + + Typically these are written to a http.Request. */ type PcloudIkepoliciesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go index 8286d8f0ba2..26fab72877b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go @@ -60,7 +60,7 @@ func (o *PcloudIkepoliciesGetallReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies] pcloud.ikepolicies.getall", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudIkepoliciesGetallOK() *PcloudIkepoliciesGetallOK { return &PcloudIkepoliciesGetallOK{} } -/* PcloudIkepoliciesGetallOK describes a response with status code 200, with default header values. +/* +PcloudIkepoliciesGetallOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudIkepoliciesGetallOK struct { Payload *models.IKEPolicies } +// IsSuccess returns true when this pcloud ikepolicies getall o k response has a 2xx status code +func (o *PcloudIkepoliciesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ikepolicies getall o k response has a 3xx status code +func (o *PcloudIkepoliciesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies getall o k response has a 4xx status code +func (o *PcloudIkepoliciesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies getall o k response has a 5xx status code +func (o *PcloudIkepoliciesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies getall o k response a status code equal to that given +func (o *PcloudIkepoliciesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ikepolicies getall o k response +func (o *PcloudIkepoliciesGetallOK) Code() int { + return 200 +} + func (o *PcloudIkepoliciesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudIkepoliciesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudIkepoliciesGetallOK) GetPayload() *models.IKEPolicies { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudIkepoliciesGetallBadRequest() *PcloudIkepoliciesGetallBadRequest { return &PcloudIkepoliciesGetallBadRequest{} } -/* PcloudIkepoliciesGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudIkepoliciesGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudIkepoliciesGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies getall bad request response has a 2xx status code +func (o *PcloudIkepoliciesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies getall bad request response has a 3xx status code +func (o *PcloudIkepoliciesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies getall bad request response has a 4xx status code +func (o *PcloudIkepoliciesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies getall bad request response has a 5xx status code +func (o *PcloudIkepoliciesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies getall bad request response a status code equal to that given +func (o *PcloudIkepoliciesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ikepolicies getall bad request response +func (o *PcloudIkepoliciesGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudIkepoliciesGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIkepoliciesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIkepoliciesGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudIkepoliciesGetallUnauthorized() *PcloudIkepoliciesGetallUnauthoriz return &PcloudIkepoliciesGetallUnauthorized{} } -/* PcloudIkepoliciesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIkepoliciesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudIkepoliciesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies getall unauthorized response has a 2xx status code +func (o *PcloudIkepoliciesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies getall unauthorized response has a 3xx status code +func (o *PcloudIkepoliciesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies getall unauthorized response has a 4xx status code +func (o *PcloudIkepoliciesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies getall unauthorized response has a 5xx status code +func (o *PcloudIkepoliciesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies getall unauthorized response a status code equal to that given +func (o *PcloudIkepoliciesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ikepolicies getall unauthorized response +func (o *PcloudIkepoliciesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudIkepoliciesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIkepoliciesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIkepoliciesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudIkepoliciesGetallForbidden() *PcloudIkepoliciesGetallForbidden { return &PcloudIkepoliciesGetallForbidden{} } -/* PcloudIkepoliciesGetallForbidden describes a response with status code 403, with default header values. +/* +PcloudIkepoliciesGetallForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudIkepoliciesGetallForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies getall forbidden response has a 2xx status code +func (o *PcloudIkepoliciesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies getall forbidden response has a 3xx status code +func (o *PcloudIkepoliciesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies getall forbidden response has a 4xx status code +func (o *PcloudIkepoliciesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies getall forbidden response has a 5xx status code +func (o *PcloudIkepoliciesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies getall forbidden response a status code equal to that given +func (o *PcloudIkepoliciesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ikepolicies getall forbidden response +func (o *PcloudIkepoliciesGetallForbidden) Code() int { + return 403 +} + func (o *PcloudIkepoliciesGetallForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallForbidden %+v", 403, o.Payload) } + +func (o *PcloudIkepoliciesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallForbidden %+v", 403, o.Payload) +} + func (o *PcloudIkepoliciesGetallForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudIkepoliciesGetallNotFound() *PcloudIkepoliciesGetallNotFound { return &PcloudIkepoliciesGetallNotFound{} } -/* PcloudIkepoliciesGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudIkepoliciesGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudIkepoliciesGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies getall not found response has a 2xx status code +func (o *PcloudIkepoliciesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies getall not found response has a 3xx status code +func (o *PcloudIkepoliciesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies getall not found response has a 4xx status code +func (o *PcloudIkepoliciesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies getall not found response has a 5xx status code +func (o *PcloudIkepoliciesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies getall not found response a status code equal to that given +func (o *PcloudIkepoliciesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ikepolicies getall not found response +func (o *PcloudIkepoliciesGetallNotFound) Code() int { + return 404 +} + func (o *PcloudIkepoliciesGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudIkepoliciesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudIkepoliciesGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudIkepoliciesGetallInternalServerError() *PcloudIkepoliciesGetallInt return &PcloudIkepoliciesGetallInternalServerError{} } -/* PcloudIkepoliciesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIkepoliciesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudIkepoliciesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies getall internal server error response has a 2xx status code +func (o *PcloudIkepoliciesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies getall internal server error response has a 3xx status code +func (o *PcloudIkepoliciesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies getall internal server error response has a 4xx status code +func (o *PcloudIkepoliciesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies getall internal server error response has a 5xx status code +func (o *PcloudIkepoliciesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ikepolicies getall internal server error response a status code equal to that given +func (o *PcloudIkepoliciesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ikepolicies getall internal server error response +func (o *PcloudIkepoliciesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudIkepoliciesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIkepoliciesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIkepoliciesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_parameters.go index 57d82f091a6..5fdca243051 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudIkepoliciesPostParamsWithHTTPClient(client *http.Client) *PcloudIk } } -/* PcloudIkepoliciesPostParams contains all the parameters to send to the API endpoint - for the pcloud ikepolicies post operation. +/* +PcloudIkepoliciesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ikepolicies post operation. + + Typically these are written to a http.Request. */ type PcloudIkepoliciesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go index 3b3d81964d7..998093538f4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go @@ -66,7 +66,7 @@ func (o *PcloudIkepoliciesPostReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies] pcloud.ikepolicies.post", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudIkepoliciesPostOK() *PcloudIkepoliciesPostOK { return &PcloudIkepoliciesPostOK{} } -/* PcloudIkepoliciesPostOK describes a response with status code 200, with default header values. +/* +PcloudIkepoliciesPostOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudIkepoliciesPostOK struct { Payload *models.IKEPolicy } +// IsSuccess returns true when this pcloud ikepolicies post o k response has a 2xx status code +func (o *PcloudIkepoliciesPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ikepolicies post o k response has a 3xx status code +func (o *PcloudIkepoliciesPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies post o k response has a 4xx status code +func (o *PcloudIkepoliciesPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies post o k response has a 5xx status code +func (o *PcloudIkepoliciesPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies post o k response a status code equal to that given +func (o *PcloudIkepoliciesPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ikepolicies post o k response +func (o *PcloudIkepoliciesPostOK) Code() int { + return 200 +} + func (o *PcloudIkepoliciesPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostOK %+v", 200, o.Payload) } + +func (o *PcloudIkepoliciesPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostOK %+v", 200, o.Payload) +} + func (o *PcloudIkepoliciesPostOK) GetPayload() *models.IKEPolicy { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudIkepoliciesPostBadRequest() *PcloudIkepoliciesPostBadRequest { return &PcloudIkepoliciesPostBadRequest{} } -/* PcloudIkepoliciesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudIkepoliciesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudIkepoliciesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies post bad request response has a 2xx status code +func (o *PcloudIkepoliciesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies post bad request response has a 3xx status code +func (o *PcloudIkepoliciesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies post bad request response has a 4xx status code +func (o *PcloudIkepoliciesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies post bad request response has a 5xx status code +func (o *PcloudIkepoliciesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies post bad request response a status code equal to that given +func (o *PcloudIkepoliciesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ikepolicies post bad request response +func (o *PcloudIkepoliciesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudIkepoliciesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIkepoliciesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIkepoliciesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudIkepoliciesPostUnauthorized() *PcloudIkepoliciesPostUnauthorized { return &PcloudIkepoliciesPostUnauthorized{} } -/* PcloudIkepoliciesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIkepoliciesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudIkepoliciesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies post unauthorized response has a 2xx status code +func (o *PcloudIkepoliciesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies post unauthorized response has a 3xx status code +func (o *PcloudIkepoliciesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies post unauthorized response has a 4xx status code +func (o *PcloudIkepoliciesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies post unauthorized response has a 5xx status code +func (o *PcloudIkepoliciesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies post unauthorized response a status code equal to that given +func (o *PcloudIkepoliciesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ikepolicies post unauthorized response +func (o *PcloudIkepoliciesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudIkepoliciesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIkepoliciesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIkepoliciesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudIkepoliciesPostForbidden() *PcloudIkepoliciesPostForbidden { return &PcloudIkepoliciesPostForbidden{} } -/* PcloudIkepoliciesPostForbidden describes a response with status code 403, with default header values. +/* +PcloudIkepoliciesPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudIkepoliciesPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies post forbidden response has a 2xx status code +func (o *PcloudIkepoliciesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies post forbidden response has a 3xx status code +func (o *PcloudIkepoliciesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies post forbidden response has a 4xx status code +func (o *PcloudIkepoliciesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies post forbidden response has a 5xx status code +func (o *PcloudIkepoliciesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies post forbidden response a status code equal to that given +func (o *PcloudIkepoliciesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ikepolicies post forbidden response +func (o *PcloudIkepoliciesPostForbidden) Code() int { + return 403 +} + func (o *PcloudIkepoliciesPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudIkepoliciesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudIkepoliciesPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudIkepoliciesPostConflict() *PcloudIkepoliciesPostConflict { return &PcloudIkepoliciesPostConflict{} } -/* PcloudIkepoliciesPostConflict describes a response with status code 409, with default header values. +/* +PcloudIkepoliciesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +356,44 @@ type PcloudIkepoliciesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies post conflict response has a 2xx status code +func (o *PcloudIkepoliciesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies post conflict response has a 3xx status code +func (o *PcloudIkepoliciesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies post conflict response has a 4xx status code +func (o *PcloudIkepoliciesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies post conflict response has a 5xx status code +func (o *PcloudIkepoliciesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies post conflict response a status code equal to that given +func (o *PcloudIkepoliciesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud ikepolicies post conflict response +func (o *PcloudIkepoliciesPostConflict) Code() int { + return 409 +} + func (o *PcloudIkepoliciesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudIkepoliciesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudIkepoliciesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudIkepoliciesPostUnprocessableEntity() *PcloudIkepoliciesPostUnproce return &PcloudIkepoliciesPostUnprocessableEntity{} } -/* PcloudIkepoliciesPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudIkepoliciesPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +424,44 @@ type PcloudIkepoliciesPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies post unprocessable entity response has a 2xx status code +func (o *PcloudIkepoliciesPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies post unprocessable entity response has a 3xx status code +func (o *PcloudIkepoliciesPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies post unprocessable entity response has a 4xx status code +func (o *PcloudIkepoliciesPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies post unprocessable entity response has a 5xx status code +func (o *PcloudIkepoliciesPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies post unprocessable entity response a status code equal to that given +func (o *PcloudIkepoliciesPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud ikepolicies post unprocessable entity response +func (o *PcloudIkepoliciesPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudIkepoliciesPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudIkepoliciesPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudIkepoliciesPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudIkepoliciesPostInternalServerError() *PcloudIkepoliciesPostInterna return &PcloudIkepoliciesPostInternalServerError{} } -/* PcloudIkepoliciesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIkepoliciesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudIkepoliciesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies post internal server error response has a 2xx status code +func (o *PcloudIkepoliciesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies post internal server error response has a 3xx status code +func (o *PcloudIkepoliciesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies post internal server error response has a 4xx status code +func (o *PcloudIkepoliciesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies post internal server error response has a 5xx status code +func (o *PcloudIkepoliciesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ikepolicies post internal server error response a status code equal to that given +func (o *PcloudIkepoliciesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ikepolicies post internal server error response +func (o *PcloudIkepoliciesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudIkepoliciesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIkepoliciesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies][%d] pcloudIkepoliciesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIkepoliciesPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_parameters.go index c845b8aee92..3301ab28f0d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudIkepoliciesPutParamsWithHTTPClient(client *http.Client) *PcloudIke } } -/* PcloudIkepoliciesPutParams contains all the parameters to send to the API endpoint - for the pcloud ikepolicies put operation. +/* +PcloudIkepoliciesPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ikepolicies put operation. + + Typically these are written to a http.Request. */ type PcloudIkepoliciesPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go index b9350c86f88..ea4472aa56b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudIkepoliciesPutReader) ReadResponse(response runtime.ClientRespons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}] pcloud.ikepolicies.put", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudIkepoliciesPutOK() *PcloudIkepoliciesPutOK { return &PcloudIkepoliciesPutOK{} } -/* PcloudIkepoliciesPutOK describes a response with status code 200, with default header values. +/* +PcloudIkepoliciesPutOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudIkepoliciesPutOK struct { Payload *models.IKEPolicy } +// IsSuccess returns true when this pcloud ikepolicies put o k response has a 2xx status code +func (o *PcloudIkepoliciesPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ikepolicies put o k response has a 3xx status code +func (o *PcloudIkepoliciesPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies put o k response has a 4xx status code +func (o *PcloudIkepoliciesPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies put o k response has a 5xx status code +func (o *PcloudIkepoliciesPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies put o k response a status code equal to that given +func (o *PcloudIkepoliciesPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ikepolicies put o k response +func (o *PcloudIkepoliciesPutOK) Code() int { + return 200 +} + func (o *PcloudIkepoliciesPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutOK %+v", 200, o.Payload) } + +func (o *PcloudIkepoliciesPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutOK %+v", 200, o.Payload) +} + func (o *PcloudIkepoliciesPutOK) GetPayload() *models.IKEPolicy { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudIkepoliciesPutBadRequest() *PcloudIkepoliciesPutBadRequest { return &PcloudIkepoliciesPutBadRequest{} } -/* PcloudIkepoliciesPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudIkepoliciesPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudIkepoliciesPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies put bad request response has a 2xx status code +func (o *PcloudIkepoliciesPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies put bad request response has a 3xx status code +func (o *PcloudIkepoliciesPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies put bad request response has a 4xx status code +func (o *PcloudIkepoliciesPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies put bad request response has a 5xx status code +func (o *PcloudIkepoliciesPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies put bad request response a status code equal to that given +func (o *PcloudIkepoliciesPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ikepolicies put bad request response +func (o *PcloudIkepoliciesPutBadRequest) Code() int { + return 400 +} + func (o *PcloudIkepoliciesPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIkepoliciesPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIkepoliciesPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudIkepoliciesPutUnauthorized() *PcloudIkepoliciesPutUnauthorized { return &PcloudIkepoliciesPutUnauthorized{} } -/* PcloudIkepoliciesPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIkepoliciesPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudIkepoliciesPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies put unauthorized response has a 2xx status code +func (o *PcloudIkepoliciesPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies put unauthorized response has a 3xx status code +func (o *PcloudIkepoliciesPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies put unauthorized response has a 4xx status code +func (o *PcloudIkepoliciesPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies put unauthorized response has a 5xx status code +func (o *PcloudIkepoliciesPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies put unauthorized response a status code equal to that given +func (o *PcloudIkepoliciesPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ikepolicies put unauthorized response +func (o *PcloudIkepoliciesPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudIkepoliciesPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIkepoliciesPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIkepoliciesPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +279,8 @@ func NewPcloudIkepoliciesPutForbidden() *PcloudIkepoliciesPutForbidden { return &PcloudIkepoliciesPutForbidden{} } -/* PcloudIkepoliciesPutForbidden describes a response with status code 403, with default header values. +/* +PcloudIkepoliciesPutForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +288,44 @@ type PcloudIkepoliciesPutForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies put forbidden response has a 2xx status code +func (o *PcloudIkepoliciesPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies put forbidden response has a 3xx status code +func (o *PcloudIkepoliciesPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies put forbidden response has a 4xx status code +func (o *PcloudIkepoliciesPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies put forbidden response has a 5xx status code +func (o *PcloudIkepoliciesPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies put forbidden response a status code equal to that given +func (o *PcloudIkepoliciesPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ikepolicies put forbidden response +func (o *PcloudIkepoliciesPutForbidden) Code() int { + return 403 +} + func (o *PcloudIkepoliciesPutForbidden) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutForbidden %+v", 403, o.Payload) } + +func (o *PcloudIkepoliciesPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutForbidden %+v", 403, o.Payload) +} + func (o *PcloudIkepoliciesPutForbidden) GetPayload() *models.Error { return o.Payload } @@ -192,12 +342,81 @@ 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{} } -/* PcloudIkepoliciesPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudIkepoliciesPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +424,44 @@ type PcloudIkepoliciesPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies put unprocessable entity response has a 2xx status code +func (o *PcloudIkepoliciesPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies put unprocessable entity response has a 3xx status code +func (o *PcloudIkepoliciesPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies put unprocessable entity response has a 4xx status code +func (o *PcloudIkepoliciesPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ikepolicies put unprocessable entity response has a 5xx status code +func (o *PcloudIkepoliciesPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ikepolicies put unprocessable entity response a status code equal to that given +func (o *PcloudIkepoliciesPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud ikepolicies put unprocessable entity response +func (o *PcloudIkepoliciesPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudIkepoliciesPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudIkepoliciesPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudIkepoliciesPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudIkepoliciesPutInternalServerError() *PcloudIkepoliciesPutInternalS return &PcloudIkepoliciesPutInternalServerError{} } -/* PcloudIkepoliciesPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIkepoliciesPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudIkepoliciesPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ikepolicies put internal server error response has a 2xx status code +func (o *PcloudIkepoliciesPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ikepolicies put internal server error response has a 3xx status code +func (o *PcloudIkepoliciesPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ikepolicies put internal server error response has a 4xx status code +func (o *PcloudIkepoliciesPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ikepolicies put internal server error response has a 5xx status code +func (o *PcloudIkepoliciesPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ikepolicies put internal server error response a status code equal to that given +func (o *PcloudIkepoliciesPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ikepolicies put internal server error response +func (o *PcloudIkepoliciesPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudIkepoliciesPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIkepoliciesPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ike-policies/{ike_policy_id}][%d] pcloudIkepoliciesPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIkepoliciesPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_parameters.go index fdd67659cc2..00f4b2ec95e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudIpsecpoliciesDeleteParamsWithHTTPClient(client *http.Client) *Pclo } } -/* PcloudIpsecpoliciesDeleteParams contains all the parameters to send to the API endpoint - for the pcloud ipsecpolicies delete operation. +/* +PcloudIpsecpoliciesDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ipsecpolicies delete operation. + + Typically these are written to a http.Request. */ type PcloudIpsecpoliciesDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go index 0d01bf97cd6..b37281584d8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go @@ -60,7 +60,7 @@ func (o *PcloudIpsecpoliciesDeleteReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}] pcloud.ipsecpolicies.delete", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudIpsecpoliciesDeleteOK() *PcloudIpsecpoliciesDeleteOK { return &PcloudIpsecpoliciesDeleteOK{} } -/* PcloudIpsecpoliciesDeleteOK describes a response with status code 200, with default header values. +/* +PcloudIpsecpoliciesDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudIpsecpoliciesDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud ipsecpolicies delete o k response has a 2xx status code +func (o *PcloudIpsecpoliciesDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ipsecpolicies delete o k response has a 3xx status code +func (o *PcloudIpsecpoliciesDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies delete o k response has a 4xx status code +func (o *PcloudIpsecpoliciesDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies delete o k response has a 5xx status code +func (o *PcloudIpsecpoliciesDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies delete o k response a status code equal to that given +func (o *PcloudIpsecpoliciesDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ipsecpolicies delete o k response +func (o *PcloudIpsecpoliciesDeleteOK) Code() int { + return 200 +} + func (o *PcloudIpsecpoliciesDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudIpsecpoliciesDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudIpsecpoliciesDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +135,8 @@ func NewPcloudIpsecpoliciesDeleteBadRequest() *PcloudIpsecpoliciesDeleteBadReque return &PcloudIpsecpoliciesDeleteBadRequest{} } -/* PcloudIpsecpoliciesDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudIpsecpoliciesDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +144,44 @@ type PcloudIpsecpoliciesDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies delete bad request response has a 2xx status code +func (o *PcloudIpsecpoliciesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies delete bad request response has a 3xx status code +func (o *PcloudIpsecpoliciesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies delete bad request response has a 4xx status code +func (o *PcloudIpsecpoliciesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies delete bad request response has a 5xx status code +func (o *PcloudIpsecpoliciesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies delete bad request response a status code equal to that given +func (o *PcloudIpsecpoliciesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ipsecpolicies delete bad request response +func (o *PcloudIpsecpoliciesDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudIpsecpoliciesDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIpsecpoliciesDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIpsecpoliciesDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +203,8 @@ func NewPcloudIpsecpoliciesDeleteUnauthorized() *PcloudIpsecpoliciesDeleteUnauth return &PcloudIpsecpoliciesDeleteUnauthorized{} } -/* PcloudIpsecpoliciesDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIpsecpoliciesDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +212,44 @@ type PcloudIpsecpoliciesDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies delete unauthorized response has a 2xx status code +func (o *PcloudIpsecpoliciesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies delete unauthorized response has a 3xx status code +func (o *PcloudIpsecpoliciesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies delete unauthorized response has a 4xx status code +func (o *PcloudIpsecpoliciesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies delete unauthorized response has a 5xx status code +func (o *PcloudIpsecpoliciesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies delete unauthorized response a status code equal to that given +func (o *PcloudIpsecpoliciesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ipsecpolicies delete unauthorized response +func (o *PcloudIpsecpoliciesDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudIpsecpoliciesDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIpsecpoliciesDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIpsecpoliciesDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -163,7 +271,8 @@ func NewPcloudIpsecpoliciesDeleteForbidden() *PcloudIpsecpoliciesDeleteForbidden return &PcloudIpsecpoliciesDeleteForbidden{} } -/* PcloudIpsecpoliciesDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudIpsecpoliciesDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -171,9 +280,44 @@ type PcloudIpsecpoliciesDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies delete forbidden response has a 2xx status code +func (o *PcloudIpsecpoliciesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies delete forbidden response has a 3xx status code +func (o *PcloudIpsecpoliciesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies delete forbidden response has a 4xx status code +func (o *PcloudIpsecpoliciesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies delete forbidden response has a 5xx status code +func (o *PcloudIpsecpoliciesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies delete forbidden response a status code equal to that given +func (o *PcloudIpsecpoliciesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ipsecpolicies delete forbidden response +func (o *PcloudIpsecpoliciesDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudIpsecpoliciesDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudIpsecpoliciesDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudIpsecpoliciesDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -195,7 +339,8 @@ func NewPcloudIpsecpoliciesDeleteNotFound() *PcloudIpsecpoliciesDeleteNotFound { return &PcloudIpsecpoliciesDeleteNotFound{} } -/* PcloudIpsecpoliciesDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudIpsecpoliciesDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -203,9 +348,44 @@ type PcloudIpsecpoliciesDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies delete not found response has a 2xx status code +func (o *PcloudIpsecpoliciesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies delete not found response has a 3xx status code +func (o *PcloudIpsecpoliciesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies delete not found response has a 4xx status code +func (o *PcloudIpsecpoliciesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies delete not found response has a 5xx status code +func (o *PcloudIpsecpoliciesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies delete not found response a status code equal to that given +func (o *PcloudIpsecpoliciesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ipsecpolicies delete not found response +func (o *PcloudIpsecpoliciesDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudIpsecpoliciesDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudIpsecpoliciesDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudIpsecpoliciesDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -227,7 +407,8 @@ func NewPcloudIpsecpoliciesDeleteInternalServerError() *PcloudIpsecpoliciesDelet return &PcloudIpsecpoliciesDeleteInternalServerError{} } -/* PcloudIpsecpoliciesDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIpsecpoliciesDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +416,44 @@ type PcloudIpsecpoliciesDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies delete internal server error response has a 2xx status code +func (o *PcloudIpsecpoliciesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies delete internal server error response has a 3xx status code +func (o *PcloudIpsecpoliciesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies delete internal server error response has a 4xx status code +func (o *PcloudIpsecpoliciesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies delete internal server error response has a 5xx status code +func (o *PcloudIpsecpoliciesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ipsecpolicies delete internal server error response a status code equal to that given +func (o *PcloudIpsecpoliciesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ipsecpolicies delete internal server error response +func (o *PcloudIpsecpoliciesDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudIpsecpoliciesDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIpsecpoliciesDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIpsecpoliciesDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_parameters.go index 8f24e703cb7..c1aee0b14be 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudIpsecpoliciesGetParamsWithHTTPClient(client *http.Client) *PcloudI } } -/* PcloudIpsecpoliciesGetParams contains all the parameters to send to the API endpoint - for the pcloud ipsecpolicies get operation. +/* +PcloudIpsecpoliciesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ipsecpolicies get operation. + + Typically these are written to a http.Request. */ type PcloudIpsecpoliciesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go index ddaa9a9b8e9..a8c9bb3fac9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go @@ -66,7 +66,7 @@ func (o *PcloudIpsecpoliciesGetReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}] pcloud.ipsecpolicies.get", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudIpsecpoliciesGetOK() *PcloudIpsecpoliciesGetOK { return &PcloudIpsecpoliciesGetOK{} } -/* PcloudIpsecpoliciesGetOK describes a response with status code 200, with default header values. +/* +PcloudIpsecpoliciesGetOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudIpsecpoliciesGetOK struct { Payload *models.IPSecPolicy } +// IsSuccess returns true when this pcloud ipsecpolicies get o k response has a 2xx status code +func (o *PcloudIpsecpoliciesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ipsecpolicies get o k response has a 3xx status code +func (o *PcloudIpsecpoliciesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies get o k response has a 4xx status code +func (o *PcloudIpsecpoliciesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies get o k response has a 5xx status code +func (o *PcloudIpsecpoliciesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies get o k response a status code equal to that given +func (o *PcloudIpsecpoliciesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ipsecpolicies get o k response +func (o *PcloudIpsecpoliciesGetOK) Code() int { + return 200 +} + func (o *PcloudIpsecpoliciesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetOK %+v", 200, o.Payload) } + +func (o *PcloudIpsecpoliciesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetOK %+v", 200, o.Payload) +} + func (o *PcloudIpsecpoliciesGetOK) GetPayload() *models.IPSecPolicy { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudIpsecpoliciesGetBadRequest() *PcloudIpsecpoliciesGetBadRequest { return &PcloudIpsecpoliciesGetBadRequest{} } -/* PcloudIpsecpoliciesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudIpsecpoliciesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudIpsecpoliciesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies get bad request response has a 2xx status code +func (o *PcloudIpsecpoliciesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies get bad request response has a 3xx status code +func (o *PcloudIpsecpoliciesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies get bad request response has a 4xx status code +func (o *PcloudIpsecpoliciesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies get bad request response has a 5xx status code +func (o *PcloudIpsecpoliciesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies get bad request response a status code equal to that given +func (o *PcloudIpsecpoliciesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ipsecpolicies get bad request response +func (o *PcloudIpsecpoliciesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudIpsecpoliciesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIpsecpoliciesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIpsecpoliciesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudIpsecpoliciesGetUnauthorized() *PcloudIpsecpoliciesGetUnauthorized return &PcloudIpsecpoliciesGetUnauthorized{} } -/* PcloudIpsecpoliciesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIpsecpoliciesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudIpsecpoliciesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies get unauthorized response has a 2xx status code +func (o *PcloudIpsecpoliciesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies get unauthorized response has a 3xx status code +func (o *PcloudIpsecpoliciesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies get unauthorized response has a 4xx status code +func (o *PcloudIpsecpoliciesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies get unauthorized response has a 5xx status code +func (o *PcloudIpsecpoliciesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies get unauthorized response a status code equal to that given +func (o *PcloudIpsecpoliciesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ipsecpolicies get unauthorized response +func (o *PcloudIpsecpoliciesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudIpsecpoliciesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIpsecpoliciesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIpsecpoliciesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudIpsecpoliciesGetForbidden() *PcloudIpsecpoliciesGetForbidden { return &PcloudIpsecpoliciesGetForbidden{} } -/* PcloudIpsecpoliciesGetForbidden describes a response with status code 403, with default header values. +/* +PcloudIpsecpoliciesGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudIpsecpoliciesGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies get forbidden response has a 2xx status code +func (o *PcloudIpsecpoliciesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies get forbidden response has a 3xx status code +func (o *PcloudIpsecpoliciesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies get forbidden response has a 4xx status code +func (o *PcloudIpsecpoliciesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies get forbidden response has a 5xx status code +func (o *PcloudIpsecpoliciesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies get forbidden response a status code equal to that given +func (o *PcloudIpsecpoliciesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ipsecpolicies get forbidden response +func (o *PcloudIpsecpoliciesGetForbidden) Code() int { + return 403 +} + func (o *PcloudIpsecpoliciesGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudIpsecpoliciesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudIpsecpoliciesGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudIpsecpoliciesGetNotFound() *PcloudIpsecpoliciesGetNotFound { return &PcloudIpsecpoliciesGetNotFound{} } -/* PcloudIpsecpoliciesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudIpsecpoliciesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -211,9 +356,44 @@ type PcloudIpsecpoliciesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies get not found response has a 2xx status code +func (o *PcloudIpsecpoliciesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies get not found response has a 3xx status code +func (o *PcloudIpsecpoliciesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies get not found response has a 4xx status code +func (o *PcloudIpsecpoliciesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies get not found response has a 5xx status code +func (o *PcloudIpsecpoliciesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies get not found response a status code equal to that given +func (o *PcloudIpsecpoliciesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ipsecpolicies get not found response +func (o *PcloudIpsecpoliciesGetNotFound) Code() int { + return 404 +} + func (o *PcloudIpsecpoliciesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudIpsecpoliciesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudIpsecpoliciesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudIpsecpoliciesGetUnprocessableEntity() *PcloudIpsecpoliciesGetUnpro return &PcloudIpsecpoliciesGetUnprocessableEntity{} } -/* PcloudIpsecpoliciesGetUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudIpsecpoliciesGetUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +424,44 @@ type PcloudIpsecpoliciesGetUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies get unprocessable entity response has a 2xx status code +func (o *PcloudIpsecpoliciesGetUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies get unprocessable entity response has a 3xx status code +func (o *PcloudIpsecpoliciesGetUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies get unprocessable entity response has a 4xx status code +func (o *PcloudIpsecpoliciesGetUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies get unprocessable entity response has a 5xx status code +func (o *PcloudIpsecpoliciesGetUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies get unprocessable entity response a status code equal to that given +func (o *PcloudIpsecpoliciesGetUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud ipsecpolicies get unprocessable entity response +func (o *PcloudIpsecpoliciesGetUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudIpsecpoliciesGetUnprocessableEntity) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudIpsecpoliciesGetUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudIpsecpoliciesGetUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudIpsecpoliciesGetInternalServerError() *PcloudIpsecpoliciesGetInter return &PcloudIpsecpoliciesGetInternalServerError{} } -/* PcloudIpsecpoliciesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIpsecpoliciesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudIpsecpoliciesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies get internal server error response has a 2xx status code +func (o *PcloudIpsecpoliciesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies get internal server error response has a 3xx status code +func (o *PcloudIpsecpoliciesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies get internal server error response has a 4xx status code +func (o *PcloudIpsecpoliciesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies get internal server error response has a 5xx status code +func (o *PcloudIpsecpoliciesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ipsecpolicies get internal server error response a status code equal to that given +func (o *PcloudIpsecpoliciesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ipsecpolicies get internal server error response +func (o *PcloudIpsecpoliciesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudIpsecpoliciesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIpsecpoliciesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIpsecpoliciesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_parameters.go index 6d9a00d3a36..8b09298912a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudIpsecpoliciesGetallParamsWithHTTPClient(client *http.Client) *Pclo } } -/* PcloudIpsecpoliciesGetallParams contains all the parameters to send to the API endpoint - for the pcloud ipsecpolicies getall operation. +/* +PcloudIpsecpoliciesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ipsecpolicies getall operation. + + Typically these are written to a http.Request. */ type PcloudIpsecpoliciesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go index 92925b59b4b..c717669f8f5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go @@ -60,7 +60,7 @@ func (o *PcloudIpsecpoliciesGetallReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies] pcloud.ipsecpolicies.getall", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudIpsecpoliciesGetallOK() *PcloudIpsecpoliciesGetallOK { return &PcloudIpsecpoliciesGetallOK{} } -/* PcloudIpsecpoliciesGetallOK describes a response with status code 200, with default header values. +/* +PcloudIpsecpoliciesGetallOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudIpsecpoliciesGetallOK struct { Payload *models.IPSecPolicies } +// IsSuccess returns true when this pcloud ipsecpolicies getall o k response has a 2xx status code +func (o *PcloudIpsecpoliciesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ipsecpolicies getall o k response has a 3xx status code +func (o *PcloudIpsecpoliciesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies getall o k response has a 4xx status code +func (o *PcloudIpsecpoliciesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies getall o k response has a 5xx status code +func (o *PcloudIpsecpoliciesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies getall o k response a status code equal to that given +func (o *PcloudIpsecpoliciesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ipsecpolicies getall o k response +func (o *PcloudIpsecpoliciesGetallOK) Code() int { + return 200 +} + func (o *PcloudIpsecpoliciesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudIpsecpoliciesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudIpsecpoliciesGetallOK) GetPayload() *models.IPSecPolicies { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudIpsecpoliciesGetallBadRequest() *PcloudIpsecpoliciesGetallBadReque return &PcloudIpsecpoliciesGetallBadRequest{} } -/* PcloudIpsecpoliciesGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudIpsecpoliciesGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudIpsecpoliciesGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies getall bad request response has a 2xx status code +func (o *PcloudIpsecpoliciesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies getall bad request response has a 3xx status code +func (o *PcloudIpsecpoliciesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies getall bad request response has a 4xx status code +func (o *PcloudIpsecpoliciesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies getall bad request response has a 5xx status code +func (o *PcloudIpsecpoliciesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies getall bad request response a status code equal to that given +func (o *PcloudIpsecpoliciesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ipsecpolicies getall bad request response +func (o *PcloudIpsecpoliciesGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudIpsecpoliciesGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIpsecpoliciesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIpsecpoliciesGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudIpsecpoliciesGetallUnauthorized() *PcloudIpsecpoliciesGetallUnauth return &PcloudIpsecpoliciesGetallUnauthorized{} } -/* PcloudIpsecpoliciesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIpsecpoliciesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudIpsecpoliciesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies getall unauthorized response has a 2xx status code +func (o *PcloudIpsecpoliciesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies getall unauthorized response has a 3xx status code +func (o *PcloudIpsecpoliciesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies getall unauthorized response has a 4xx status code +func (o *PcloudIpsecpoliciesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies getall unauthorized response has a 5xx status code +func (o *PcloudIpsecpoliciesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies getall unauthorized response a status code equal to that given +func (o *PcloudIpsecpoliciesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ipsecpolicies getall unauthorized response +func (o *PcloudIpsecpoliciesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudIpsecpoliciesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIpsecpoliciesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIpsecpoliciesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudIpsecpoliciesGetallForbidden() *PcloudIpsecpoliciesGetallForbidden return &PcloudIpsecpoliciesGetallForbidden{} } -/* PcloudIpsecpoliciesGetallForbidden describes a response with status code 403, with default header values. +/* +PcloudIpsecpoliciesGetallForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudIpsecpoliciesGetallForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies getall forbidden response has a 2xx status code +func (o *PcloudIpsecpoliciesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies getall forbidden response has a 3xx status code +func (o *PcloudIpsecpoliciesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies getall forbidden response has a 4xx status code +func (o *PcloudIpsecpoliciesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies getall forbidden response has a 5xx status code +func (o *PcloudIpsecpoliciesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies getall forbidden response a status code equal to that given +func (o *PcloudIpsecpoliciesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ipsecpolicies getall forbidden response +func (o *PcloudIpsecpoliciesGetallForbidden) Code() int { + return 403 +} + func (o *PcloudIpsecpoliciesGetallForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallForbidden %+v", 403, o.Payload) } + +func (o *PcloudIpsecpoliciesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallForbidden %+v", 403, o.Payload) +} + func (o *PcloudIpsecpoliciesGetallForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudIpsecpoliciesGetallNotFound() *PcloudIpsecpoliciesGetallNotFound { return &PcloudIpsecpoliciesGetallNotFound{} } -/* PcloudIpsecpoliciesGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudIpsecpoliciesGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudIpsecpoliciesGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies getall not found response has a 2xx status code +func (o *PcloudIpsecpoliciesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies getall not found response has a 3xx status code +func (o *PcloudIpsecpoliciesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies getall not found response has a 4xx status code +func (o *PcloudIpsecpoliciesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies getall not found response has a 5xx status code +func (o *PcloudIpsecpoliciesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies getall not found response a status code equal to that given +func (o *PcloudIpsecpoliciesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud ipsecpolicies getall not found response +func (o *PcloudIpsecpoliciesGetallNotFound) Code() int { + return 404 +} + func (o *PcloudIpsecpoliciesGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudIpsecpoliciesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudIpsecpoliciesGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudIpsecpoliciesGetallInternalServerError() *PcloudIpsecpoliciesGetal return &PcloudIpsecpoliciesGetallInternalServerError{} } -/* PcloudIpsecpoliciesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIpsecpoliciesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudIpsecpoliciesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies getall internal server error response has a 2xx status code +func (o *PcloudIpsecpoliciesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies getall internal server error response has a 3xx status code +func (o *PcloudIpsecpoliciesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies getall internal server error response has a 4xx status code +func (o *PcloudIpsecpoliciesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies getall internal server error response has a 5xx status code +func (o *PcloudIpsecpoliciesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ipsecpolicies getall internal server error response a status code equal to that given +func (o *PcloudIpsecpoliciesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ipsecpolicies getall internal server error response +func (o *PcloudIpsecpoliciesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudIpsecpoliciesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIpsecpoliciesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIpsecpoliciesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_parameters.go index a09d4300f1a..2d95ce87e3c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudIpsecpoliciesPostParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudIpsecpoliciesPostParams contains all the parameters to send to the API endpoint - for the pcloud ipsecpolicies post operation. +/* +PcloudIpsecpoliciesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ipsecpolicies post operation. + + Typically these are written to a http.Request. */ type PcloudIpsecpoliciesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go index 20620cea35d..cc76168a845 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudIpsecpoliciesPostReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies] pcloud.ipsecpolicies.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudIpsecpoliciesPostOK() *PcloudIpsecpoliciesPostOK { return &PcloudIpsecpoliciesPostOK{} } -/* PcloudIpsecpoliciesPostOK describes a response with status code 200, with default header values. +/* +PcloudIpsecpoliciesPostOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +90,44 @@ type PcloudIpsecpoliciesPostOK struct { Payload *models.IPSecPolicy } +// IsSuccess returns true when this pcloud ipsecpolicies post o k response has a 2xx status code +func (o *PcloudIpsecpoliciesPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ipsecpolicies post o k response has a 3xx status code +func (o *PcloudIpsecpoliciesPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies post o k response has a 4xx status code +func (o *PcloudIpsecpoliciesPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies post o k response has a 5xx status code +func (o *PcloudIpsecpoliciesPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies post o k response a status code equal to that given +func (o *PcloudIpsecpoliciesPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ipsecpolicies post o k response +func (o *PcloudIpsecpoliciesPostOK) Code() int { + return 200 +} + func (o *PcloudIpsecpoliciesPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostOK %+v", 200, o.Payload) } + +func (o *PcloudIpsecpoliciesPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostOK %+v", 200, o.Payload) +} + func (o *PcloudIpsecpoliciesPostOK) GetPayload() *models.IPSecPolicy { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudIpsecpoliciesPostBadRequest() *PcloudIpsecpoliciesPostBadRequest { return &PcloudIpsecpoliciesPostBadRequest{} } -/* PcloudIpsecpoliciesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudIpsecpoliciesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudIpsecpoliciesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies post bad request response has a 2xx status code +func (o *PcloudIpsecpoliciesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies post bad request response has a 3xx status code +func (o *PcloudIpsecpoliciesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies post bad request response has a 4xx status code +func (o *PcloudIpsecpoliciesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies post bad request response has a 5xx status code +func (o *PcloudIpsecpoliciesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies post bad request response a status code equal to that given +func (o *PcloudIpsecpoliciesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ipsecpolicies post bad request response +func (o *PcloudIpsecpoliciesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudIpsecpoliciesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIpsecpoliciesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIpsecpoliciesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudIpsecpoliciesPostUnauthorized() *PcloudIpsecpoliciesPostUnauthoriz return &PcloudIpsecpoliciesPostUnauthorized{} } -/* PcloudIpsecpoliciesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIpsecpoliciesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudIpsecpoliciesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies post unauthorized response has a 2xx status code +func (o *PcloudIpsecpoliciesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies post unauthorized response has a 3xx status code +func (o *PcloudIpsecpoliciesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies post unauthorized response has a 4xx status code +func (o *PcloudIpsecpoliciesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies post unauthorized response has a 5xx status code +func (o *PcloudIpsecpoliciesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies post unauthorized response a status code equal to that given +func (o *PcloudIpsecpoliciesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ipsecpolicies post unauthorized response +func (o *PcloudIpsecpoliciesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudIpsecpoliciesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIpsecpoliciesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIpsecpoliciesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +285,8 @@ func NewPcloudIpsecpoliciesPostForbidden() *PcloudIpsecpoliciesPostForbidden { return &PcloudIpsecpoliciesPostForbidden{} } -/* PcloudIpsecpoliciesPostForbidden describes a response with status code 403, with default header values. +/* +PcloudIpsecpoliciesPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +294,44 @@ type PcloudIpsecpoliciesPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies post forbidden response has a 2xx status code +func (o *PcloudIpsecpoliciesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies post forbidden response has a 3xx status code +func (o *PcloudIpsecpoliciesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies post forbidden response has a 4xx status code +func (o *PcloudIpsecpoliciesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies post forbidden response has a 5xx status code +func (o *PcloudIpsecpoliciesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies post forbidden response a status code equal to that given +func (o *PcloudIpsecpoliciesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ipsecpolicies post forbidden response +func (o *PcloudIpsecpoliciesPostForbidden) Code() int { + return 403 +} + func (o *PcloudIpsecpoliciesPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudIpsecpoliciesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudIpsecpoliciesPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -198,12 +348,81 @@ 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{} } -/* PcloudIpsecpoliciesPostConflict describes a response with status code 409, with default header values. +/* +PcloudIpsecpoliciesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +430,44 @@ type PcloudIpsecpoliciesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies post conflict response has a 2xx status code +func (o *PcloudIpsecpoliciesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies post conflict response has a 3xx status code +func (o *PcloudIpsecpoliciesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies post conflict response has a 4xx status code +func (o *PcloudIpsecpoliciesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies post conflict response has a 5xx status code +func (o *PcloudIpsecpoliciesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies post conflict response a status code equal to that given +func (o *PcloudIpsecpoliciesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud ipsecpolicies post conflict response +func (o *PcloudIpsecpoliciesPostConflict) Code() int { + return 409 +} + func (o *PcloudIpsecpoliciesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudIpsecpoliciesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudIpsecpoliciesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudIpsecpoliciesPostUnprocessableEntity() *PcloudIpsecpoliciesPostUnp return &PcloudIpsecpoliciesPostUnprocessableEntity{} } -/* PcloudIpsecpoliciesPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudIpsecpoliciesPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudIpsecpoliciesPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies post unprocessable entity response has a 2xx status code +func (o *PcloudIpsecpoliciesPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies post unprocessable entity response has a 3xx status code +func (o *PcloudIpsecpoliciesPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies post unprocessable entity response has a 4xx status code +func (o *PcloudIpsecpoliciesPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies post unprocessable entity response has a 5xx status code +func (o *PcloudIpsecpoliciesPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies post unprocessable entity response a status code equal to that given +func (o *PcloudIpsecpoliciesPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud ipsecpolicies post unprocessable entity response +func (o *PcloudIpsecpoliciesPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudIpsecpoliciesPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudIpsecpoliciesPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudIpsecpoliciesPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudIpsecpoliciesPostInternalServerError() *PcloudIpsecpoliciesPostInt return &PcloudIpsecpoliciesPostInternalServerError{} } -/* PcloudIpsecpoliciesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIpsecpoliciesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudIpsecpoliciesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies post internal server error response has a 2xx status code +func (o *PcloudIpsecpoliciesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies post internal server error response has a 3xx status code +func (o *PcloudIpsecpoliciesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies post internal server error response has a 4xx status code +func (o *PcloudIpsecpoliciesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies post internal server error response has a 5xx status code +func (o *PcloudIpsecpoliciesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ipsecpolicies post internal server error response a status code equal to that given +func (o *PcloudIpsecpoliciesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ipsecpolicies post internal server error response +func (o *PcloudIpsecpoliciesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudIpsecpoliciesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIpsecpoliciesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies][%d] pcloudIpsecpoliciesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIpsecpoliciesPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_parameters.go index 4849277eaab..fa5acb3e35f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudIpsecpoliciesPutParamsWithHTTPClient(client *http.Client) *PcloudI } } -/* PcloudIpsecpoliciesPutParams contains all the parameters to send to the API endpoint - for the pcloud ipsecpolicies put operation. +/* +PcloudIpsecpoliciesPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud ipsecpolicies put operation. + + Typically these are written to a http.Request. */ type PcloudIpsecpoliciesPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go index feb151312c7..d8cdbed68f6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudIpsecpoliciesPutReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}] pcloud.ipsecpolicies.put", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudIpsecpoliciesPutOK() *PcloudIpsecpoliciesPutOK { return &PcloudIpsecpoliciesPutOK{} } -/* PcloudIpsecpoliciesPutOK describes a response with status code 200, with default header values. +/* +PcloudIpsecpoliciesPutOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +90,44 @@ type PcloudIpsecpoliciesPutOK struct { Payload *models.IPSecPolicy } +// IsSuccess returns true when this pcloud ipsecpolicies put o k response has a 2xx status code +func (o *PcloudIpsecpoliciesPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud ipsecpolicies put o k response has a 3xx status code +func (o *PcloudIpsecpoliciesPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies put o k response has a 4xx status code +func (o *PcloudIpsecpoliciesPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies put o k response has a 5xx status code +func (o *PcloudIpsecpoliciesPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies put o k response a status code equal to that given +func (o *PcloudIpsecpoliciesPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud ipsecpolicies put o k response +func (o *PcloudIpsecpoliciesPutOK) Code() int { + return 200 +} + func (o *PcloudIpsecpoliciesPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutOK %+v", 200, o.Payload) } + +func (o *PcloudIpsecpoliciesPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutOK %+v", 200, o.Payload) +} + func (o *PcloudIpsecpoliciesPutOK) GetPayload() *models.IPSecPolicy { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudIpsecpoliciesPutBadRequest() *PcloudIpsecpoliciesPutBadRequest { return &PcloudIpsecpoliciesPutBadRequest{} } -/* PcloudIpsecpoliciesPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudIpsecpoliciesPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudIpsecpoliciesPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies put bad request response has a 2xx status code +func (o *PcloudIpsecpoliciesPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies put bad request response has a 3xx status code +func (o *PcloudIpsecpoliciesPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies put bad request response has a 4xx status code +func (o *PcloudIpsecpoliciesPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies put bad request response has a 5xx status code +func (o *PcloudIpsecpoliciesPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies put bad request response a status code equal to that given +func (o *PcloudIpsecpoliciesPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud ipsecpolicies put bad request response +func (o *PcloudIpsecpoliciesPutBadRequest) Code() int { + return 400 +} + func (o *PcloudIpsecpoliciesPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudIpsecpoliciesPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudIpsecpoliciesPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudIpsecpoliciesPutUnauthorized() *PcloudIpsecpoliciesPutUnauthorized return &PcloudIpsecpoliciesPutUnauthorized{} } -/* PcloudIpsecpoliciesPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudIpsecpoliciesPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudIpsecpoliciesPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies put unauthorized response has a 2xx status code +func (o *PcloudIpsecpoliciesPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies put unauthorized response has a 3xx status code +func (o *PcloudIpsecpoliciesPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies put unauthorized response has a 4xx status code +func (o *PcloudIpsecpoliciesPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies put unauthorized response has a 5xx status code +func (o *PcloudIpsecpoliciesPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies put unauthorized response a status code equal to that given +func (o *PcloudIpsecpoliciesPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud ipsecpolicies put unauthorized response +func (o *PcloudIpsecpoliciesPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudIpsecpoliciesPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudIpsecpoliciesPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudIpsecpoliciesPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +285,8 @@ func NewPcloudIpsecpoliciesPutForbidden() *PcloudIpsecpoliciesPutForbidden { return &PcloudIpsecpoliciesPutForbidden{} } -/* PcloudIpsecpoliciesPutForbidden describes a response with status code 403, with default header values. +/* +PcloudIpsecpoliciesPutForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +294,44 @@ type PcloudIpsecpoliciesPutForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies put forbidden response has a 2xx status code +func (o *PcloudIpsecpoliciesPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies put forbidden response has a 3xx status code +func (o *PcloudIpsecpoliciesPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies put forbidden response has a 4xx status code +func (o *PcloudIpsecpoliciesPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies put forbidden response has a 5xx status code +func (o *PcloudIpsecpoliciesPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies put forbidden response a status code equal to that given +func (o *PcloudIpsecpoliciesPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud ipsecpolicies put forbidden response +func (o *PcloudIpsecpoliciesPutForbidden) Code() int { + return 403 +} + func (o *PcloudIpsecpoliciesPutForbidden) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutForbidden %+v", 403, o.Payload) } + +func (o *PcloudIpsecpoliciesPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutForbidden %+v", 403, o.Payload) +} + func (o *PcloudIpsecpoliciesPutForbidden) GetPayload() *models.Error { return o.Payload } @@ -198,12 +348,81 @@ 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{} } -/* PcloudIpsecpoliciesPutConflict describes a response with status code 409, with default header values. +/* +PcloudIpsecpoliciesPutConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +430,44 @@ type PcloudIpsecpoliciesPutConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies put conflict response has a 2xx status code +func (o *PcloudIpsecpoliciesPutConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies put conflict response has a 3xx status code +func (o *PcloudIpsecpoliciesPutConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies put conflict response has a 4xx status code +func (o *PcloudIpsecpoliciesPutConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies put conflict response has a 5xx status code +func (o *PcloudIpsecpoliciesPutConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies put conflict response a status code equal to that given +func (o *PcloudIpsecpoliciesPutConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud ipsecpolicies put conflict response +func (o *PcloudIpsecpoliciesPutConflict) Code() int { + return 409 +} + func (o *PcloudIpsecpoliciesPutConflict) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutConflict %+v", 409, o.Payload) } + +func (o *PcloudIpsecpoliciesPutConflict) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutConflict %+v", 409, o.Payload) +} + func (o *PcloudIpsecpoliciesPutConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudIpsecpoliciesPutUnprocessableEntity() *PcloudIpsecpoliciesPutUnpro return &PcloudIpsecpoliciesPutUnprocessableEntity{} } -/* PcloudIpsecpoliciesPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudIpsecpoliciesPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudIpsecpoliciesPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies put unprocessable entity response has a 2xx status code +func (o *PcloudIpsecpoliciesPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies put unprocessable entity response has a 3xx status code +func (o *PcloudIpsecpoliciesPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies put unprocessable entity response has a 4xx status code +func (o *PcloudIpsecpoliciesPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud ipsecpolicies put unprocessable entity response has a 5xx status code +func (o *PcloudIpsecpoliciesPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud ipsecpolicies put unprocessable entity response a status code equal to that given +func (o *PcloudIpsecpoliciesPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud ipsecpolicies put unprocessable entity response +func (o *PcloudIpsecpoliciesPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudIpsecpoliciesPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudIpsecpoliciesPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudIpsecpoliciesPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudIpsecpoliciesPutInternalServerError() *PcloudIpsecpoliciesPutInter return &PcloudIpsecpoliciesPutInternalServerError{} } -/* PcloudIpsecpoliciesPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudIpsecpoliciesPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudIpsecpoliciesPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud ipsecpolicies put internal server error response has a 2xx status code +func (o *PcloudIpsecpoliciesPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud ipsecpolicies put internal server error response has a 3xx status code +func (o *PcloudIpsecpoliciesPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud ipsecpolicies put internal server error response has a 4xx status code +func (o *PcloudIpsecpoliciesPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud ipsecpolicies put internal server error response has a 5xx status code +func (o *PcloudIpsecpoliciesPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud ipsecpolicies put internal server error response a status code equal to that given +func (o *PcloudIpsecpoliciesPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud ipsecpolicies put internal server error response +func (o *PcloudIpsecpoliciesPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudIpsecpoliciesPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudIpsecpoliciesPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/vpn/ipsec-policies/{ipsec_policy_id}][%d] pcloudIpsecpoliciesPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudIpsecpoliciesPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go index 90d69dad417..78d0d2bba2e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go @@ -54,7 +54,7 @@ type ClientService interface { } /* - PcloudVolumegroupsActionPost performs an action start stop reset on a volume group +PcloudVolumegroupsActionPost performs an action start stop reset on a volume group */ func (a *Client) PcloudVolumegroupsActionPost(params *PcloudVolumegroupsActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsActionPostAccepted, error) { // TODO: Validate the params before sending @@ -93,7 +93,7 @@ func (a *Client) PcloudVolumegroupsActionPost(params *PcloudVolumegroupsActionPo } /* - PcloudVolumegroupsDelete deletes a cloud instance volume group +PcloudVolumegroupsDelete deletes a cloud instance volume group */ func (a *Client) PcloudVolumegroupsDelete(params *PcloudVolumegroupsDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsDeleteAccepted, error) { // TODO: Validate the params before sending @@ -132,7 +132,7 @@ func (a *Client) PcloudVolumegroupsDelete(params *PcloudVolumegroupsDeleteParams } /* - PcloudVolumegroupsGet gets volume group +PcloudVolumegroupsGet gets volume group */ func (a *Client) PcloudVolumegroupsGet(params *PcloudVolumegroupsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsGetOK, error) { // TODO: Validate the params before sending @@ -171,7 +171,7 @@ func (a *Client) PcloudVolumegroupsGet(params *PcloudVolumegroupsGetParams, auth } /* - PcloudVolumegroupsGetDetails gets volume group details +PcloudVolumegroupsGetDetails gets volume group details */ func (a *Client) PcloudVolumegroupsGetDetails(params *PcloudVolumegroupsGetDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsGetDetailsOK, error) { // TODO: Validate the params before sending @@ -210,7 +210,7 @@ func (a *Client) PcloudVolumegroupsGetDetails(params *PcloudVolumegroupsGetDetai } /* - PcloudVolumegroupsGetall gets all volume groups +PcloudVolumegroupsGetall gets all volume groups */ func (a *Client) PcloudVolumegroupsGetall(params *PcloudVolumegroupsGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsGetallOK, error) { // TODO: Validate the params before sending @@ -249,7 +249,7 @@ func (a *Client) PcloudVolumegroupsGetall(params *PcloudVolumegroupsGetallParams } /* - PcloudVolumegroupsGetallDetails gets all volume groups with details +PcloudVolumegroupsGetallDetails gets all volume groups with details */ func (a *Client) PcloudVolumegroupsGetallDetails(params *PcloudVolumegroupsGetallDetailsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsGetallDetailsOK, error) { // TODO: Validate the params before sending @@ -288,7 +288,7 @@ func (a *Client) PcloudVolumegroupsGetallDetails(params *PcloudVolumegroupsGetal } /* - PcloudVolumegroupsPost creates a new volume group +PcloudVolumegroupsPost creates a new volume group */ func (a *Client) PcloudVolumegroupsPost(params *PcloudVolumegroupsPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsPostAccepted, *PcloudVolumegroupsPostPartialContent, error) { // TODO: Validate the params before sending @@ -328,7 +328,7 @@ func (a *Client) PcloudVolumegroupsPost(params *PcloudVolumegroupsPostParams, au } /* - PcloudVolumegroupsPut updates the volume group +PcloudVolumegroupsPut updates the volume group */ func (a *Client) PcloudVolumegroupsPut(params *PcloudVolumegroupsPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsPutAccepted, error) { // TODO: Validate the params before sending @@ -367,7 +367,7 @@ func (a *Client) PcloudVolumegroupsPut(params *PcloudVolumegroupsPutParams, auth } /* - PcloudVolumegroupsRemoteCopyRelationshipsGet gets remote copy relationships of the volume belonging to volume group +PcloudVolumegroupsRemoteCopyRelationshipsGet gets remote copy relationships of the volume belonging to volume group */ func (a *Client) PcloudVolumegroupsRemoteCopyRelationshipsGet(params *PcloudVolumegroupsRemoteCopyRelationshipsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsRemoteCopyRelationshipsGetOK, error) { // TODO: Validate the params before sending @@ -406,7 +406,7 @@ func (a *Client) PcloudVolumegroupsRemoteCopyRelationshipsGet(params *PcloudVolu } /* - PcloudVolumegroupsStorageDetailsGet gets storage details of volume group +PcloudVolumegroupsStorageDetailsGet gets storage details of volume group */ func (a *Client) PcloudVolumegroupsStorageDetailsGet(params *PcloudVolumegroupsStorageDetailsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumegroupsStorageDetailsGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_parameters.go index 703cd1b0580..026ef99a066 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVolumegroupsActionPostParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudVolumegroupsActionPostParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups action post operation. +/* +PcloudVolumegroupsActionPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups action post operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsActionPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go index 4924180e532..43eb669583d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -47,6 +53,12 @@ func (o *PcloudVolumegroupsActionPostReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 422: + result := NewPcloudVolumegroupsActionPostUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudVolumegroupsActionPostInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +66,7 @@ func (o *PcloudVolumegroupsActionPostReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action] pcloud.volumegroups.action.post", response, response.Code()) } } @@ -63,7 +75,8 @@ func NewPcloudVolumegroupsActionPostAccepted() *PcloudVolumegroupsActionPostAcce return &PcloudVolumegroupsActionPostAccepted{} } -/* PcloudVolumegroupsActionPostAccepted describes a response with status code 202, with default header values. +/* +PcloudVolumegroupsActionPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -71,9 +84,44 @@ type PcloudVolumegroupsActionPostAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud volumegroups action post accepted response has a 2xx status code +func (o *PcloudVolumegroupsActionPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups action post accepted response has a 3xx status code +func (o *PcloudVolumegroupsActionPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups action post accepted response has a 4xx status code +func (o *PcloudVolumegroupsActionPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups action post accepted response has a 5xx status code +func (o *PcloudVolumegroupsActionPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups action post accepted response a status code equal to that given +func (o *PcloudVolumegroupsActionPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud volumegroups action post accepted response +func (o *PcloudVolumegroupsActionPostAccepted) Code() int { + return 202 +} + func (o *PcloudVolumegroupsActionPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudVolumegroupsActionPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudVolumegroupsActionPostAccepted) GetPayload() models.Object { return o.Payload } @@ -93,7 +141,8 @@ func NewPcloudVolumegroupsActionPostBadRequest() *PcloudVolumegroupsActionPostBa return &PcloudVolumegroupsActionPostBadRequest{} } -/* PcloudVolumegroupsActionPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsActionPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +150,44 @@ type PcloudVolumegroupsActionPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups action post bad request response has a 2xx status code +func (o *PcloudVolumegroupsActionPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups action post bad request response has a 3xx status code +func (o *PcloudVolumegroupsActionPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups action post bad request response has a 4xx status code +func (o *PcloudVolumegroupsActionPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups action post bad request response has a 5xx status code +func (o *PcloudVolumegroupsActionPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups action post bad request response a status code equal to that given +func (o *PcloudVolumegroupsActionPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups action post bad request response +func (o *PcloudVolumegroupsActionPostBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsActionPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsActionPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsActionPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -120,12 +204,81 @@ 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{} } -/* PcloudVolumegroupsActionPostForbidden describes a response with status code 403, with default header values. +/* +PcloudVolumegroupsActionPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -133,9 +286,44 @@ type PcloudVolumegroupsActionPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups action post forbidden response has a 2xx status code +func (o *PcloudVolumegroupsActionPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups action post forbidden response has a 3xx status code +func (o *PcloudVolumegroupsActionPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups action post forbidden response has a 4xx status code +func (o *PcloudVolumegroupsActionPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups action post forbidden response has a 5xx status code +func (o *PcloudVolumegroupsActionPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups action post forbidden response a status code equal to that given +func (o *PcloudVolumegroupsActionPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups action post forbidden response +func (o *PcloudVolumegroupsActionPostForbidden) Code() int { + return 403 +} + func (o *PcloudVolumegroupsActionPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudVolumegroupsActionPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudVolumegroupsActionPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -157,7 +345,8 @@ func NewPcloudVolumegroupsActionPostNotFound() *PcloudVolumegroupsActionPostNotF return &PcloudVolumegroupsActionPostNotFound{} } -/* PcloudVolumegroupsActionPostNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumegroupsActionPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -165,9 +354,44 @@ type PcloudVolumegroupsActionPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups action post not found response has a 2xx status code +func (o *PcloudVolumegroupsActionPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups action post not found response has a 3xx status code +func (o *PcloudVolumegroupsActionPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups action post not found response has a 4xx status code +func (o *PcloudVolumegroupsActionPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups action post not found response has a 5xx status code +func (o *PcloudVolumegroupsActionPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups action post not found response a status code equal to that given +func (o *PcloudVolumegroupsActionPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups action post not found response +func (o *PcloudVolumegroupsActionPostNotFound) Code() int { + return 404 +} + func (o *PcloudVolumegroupsActionPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudVolumegroupsActionPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudVolumegroupsActionPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -184,12 +408,81 @@ func (o *PcloudVolumegroupsActionPostNotFound) readResponse(response runtime.Cli return nil } +// NewPcloudVolumegroupsActionPostUnprocessableEntity creates a PcloudVolumegroupsActionPostUnprocessableEntity with default headers values +func NewPcloudVolumegroupsActionPostUnprocessableEntity() *PcloudVolumegroupsActionPostUnprocessableEntity { + return &PcloudVolumegroupsActionPostUnprocessableEntity{} +} + +/* +PcloudVolumegroupsActionPostUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity +*/ +type PcloudVolumegroupsActionPostUnprocessableEntity struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups action post unprocessable entity response has a 2xx status code +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups action post unprocessable entity response has a 3xx status code +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups action post unprocessable entity response has a 4xx status code +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups action post unprocessable entity response has a 5xx status code +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups action post unprocessable entity response a status code equal to that given +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud volumegroups action post unprocessable entity response +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) Code() int { + return 422 +} + +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsActionPostUnprocessableEntity) 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 +} + // NewPcloudVolumegroupsActionPostInternalServerError creates a PcloudVolumegroupsActionPostInternalServerError with default headers values func NewPcloudVolumegroupsActionPostInternalServerError() *PcloudVolumegroupsActionPostInternalServerError { return &PcloudVolumegroupsActionPostInternalServerError{} } -/* PcloudVolumegroupsActionPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsActionPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +490,44 @@ type PcloudVolumegroupsActionPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups action post internal server error response has a 2xx status code +func (o *PcloudVolumegroupsActionPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups action post internal server error response has a 3xx status code +func (o *PcloudVolumegroupsActionPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups action post internal server error response has a 4xx status code +func (o *PcloudVolumegroupsActionPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups action post internal server error response has a 5xx status code +func (o *PcloudVolumegroupsActionPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups action post internal server error response a status code equal to that given +func (o *PcloudVolumegroupsActionPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups action post internal server error response +func (o *PcloudVolumegroupsActionPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsActionPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsActionPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/action][%d] pcloudVolumegroupsActionPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsActionPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_parameters.go index d2e33ce01b2..c7e1629b7ac 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumegroupsDeleteParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudVolumegroupsDeleteParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups delete operation. +/* +PcloudVolumegroupsDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups delete operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go index 2fa8dc5eecd..d1c02fdc24d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go @@ -41,6 +41,12 @@ func (o *PcloudVolumegroupsDeleteReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 403: + result := NewPcloudVolumegroupsDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudVolumegroupsDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudVolumegroupsDeleteReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}] pcloud.volumegroups.delete", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudVolumegroupsDeleteAccepted() *PcloudVolumegroupsDeleteAccepted { return &PcloudVolumegroupsDeleteAccepted{} } -/* PcloudVolumegroupsDeleteAccepted describes a response with status code 202, with default header values. +/* +PcloudVolumegroupsDeleteAccepted describes a response with status code 202, with default header values. Accepted */ @@ -71,9 +78,44 @@ type PcloudVolumegroupsDeleteAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud volumegroups delete accepted response has a 2xx status code +func (o *PcloudVolumegroupsDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups delete accepted response has a 3xx status code +func (o *PcloudVolumegroupsDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups delete accepted response has a 4xx status code +func (o *PcloudVolumegroupsDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups delete accepted response has a 5xx status code +func (o *PcloudVolumegroupsDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups delete accepted response a status code equal to that given +func (o *PcloudVolumegroupsDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud volumegroups delete accepted response +func (o *PcloudVolumegroupsDeleteAccepted) Code() int { + return 202 +} + func (o *PcloudVolumegroupsDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteAccepted %+v", 202, o.Payload) } + +func (o *PcloudVolumegroupsDeleteAccepted) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteAccepted %+v", 202, o.Payload) +} + func (o *PcloudVolumegroupsDeleteAccepted) GetPayload() models.Object { return o.Payload } @@ -93,7 +135,8 @@ func NewPcloudVolumegroupsDeleteBadRequest() *PcloudVolumegroupsDeleteBadRequest return &PcloudVolumegroupsDeleteBadRequest{} } -/* PcloudVolumegroupsDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +144,44 @@ type PcloudVolumegroupsDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups delete bad request response has a 2xx status code +func (o *PcloudVolumegroupsDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups delete bad request response has a 3xx status code +func (o *PcloudVolumegroupsDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups delete bad request response has a 4xx status code +func (o *PcloudVolumegroupsDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups delete bad request response has a 5xx status code +func (o *PcloudVolumegroupsDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups delete bad request response a status code equal to that given +func (o *PcloudVolumegroupsDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups delete bad request response +func (o *PcloudVolumegroupsDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -125,7 +203,8 @@ func NewPcloudVolumegroupsDeleteUnauthorized() *PcloudVolumegroupsDeleteUnauthor return &PcloudVolumegroupsDeleteUnauthorized{} } -/* PcloudVolumegroupsDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumegroupsDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -133,9 +212,44 @@ type PcloudVolumegroupsDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups delete unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups delete unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups delete unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups delete unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups delete unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups delete unauthorized response +func (o *PcloudVolumegroupsDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumegroupsDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumegroupsDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumegroupsDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -152,12 +266,81 @@ func (o *PcloudVolumegroupsDeleteUnauthorized) readResponse(response runtime.Cli return nil } +// NewPcloudVolumegroupsDeleteForbidden creates a PcloudVolumegroupsDeleteForbidden with default headers values +func NewPcloudVolumegroupsDeleteForbidden() *PcloudVolumegroupsDeleteForbidden { + return &PcloudVolumegroupsDeleteForbidden{} +} + +/* +PcloudVolumegroupsDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumegroupsDeleteForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups delete forbidden response has a 2xx status code +func (o *PcloudVolumegroupsDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups delete forbidden response has a 3xx status code +func (o *PcloudVolumegroupsDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups delete forbidden response has a 4xx status code +func (o *PcloudVolumegroupsDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups delete forbidden response has a 5xx status code +func (o *PcloudVolumegroupsDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups delete forbidden response a status code equal to that given +func (o *PcloudVolumegroupsDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups delete forbidden response +func (o *PcloudVolumegroupsDeleteForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumegroupsDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsDeleteForbidden) 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 +} + // NewPcloudVolumegroupsDeleteNotFound creates a PcloudVolumegroupsDeleteNotFound with default headers values func NewPcloudVolumegroupsDeleteNotFound() *PcloudVolumegroupsDeleteNotFound { return &PcloudVolumegroupsDeleteNotFound{} } -/* PcloudVolumegroupsDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumegroupsDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -165,9 +348,44 @@ type PcloudVolumegroupsDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups delete not found response has a 2xx status code +func (o *PcloudVolumegroupsDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups delete not found response has a 3xx status code +func (o *PcloudVolumegroupsDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups delete not found response has a 4xx status code +func (o *PcloudVolumegroupsDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups delete not found response has a 5xx status code +func (o *PcloudVolumegroupsDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups delete not found response a status code equal to that given +func (o *PcloudVolumegroupsDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups delete not found response +func (o *PcloudVolumegroupsDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudVolumegroupsDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudVolumegroupsDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudVolumegroupsDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -189,7 +407,8 @@ func NewPcloudVolumegroupsDeleteInternalServerError() *PcloudVolumegroupsDeleteI return &PcloudVolumegroupsDeleteInternalServerError{} } -/* PcloudVolumegroupsDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +416,44 @@ type PcloudVolumegroupsDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups delete internal server error response has a 2xx status code +func (o *PcloudVolumegroupsDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups delete internal server error response has a 3xx status code +func (o *PcloudVolumegroupsDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups delete internal server error response has a 4xx status code +func (o *PcloudVolumegroupsDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups delete internal server error response has a 5xx status code +func (o *PcloudVolumegroupsDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups delete internal server error response a status code equal to that given +func (o *PcloudVolumegroupsDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups delete internal server error response +func (o *PcloudVolumegroupsDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_parameters.go index 08ce9f5b363..de511e1a62a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumegroupsGetDetailsParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudVolumegroupsGetDetailsParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups get details operation. +/* +PcloudVolumegroupsGetDetailsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups get details operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsGetDetailsParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go index c3811889fcc..8f99d2ed018 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go @@ -35,6 +35,18 @@ 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 { + return nil, err + } + return nil, result case 404: result := NewPcloudVolumegroupsGetDetailsNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudVolumegroupsGetDetailsReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details] pcloud.volumegroups.getDetails", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudVolumegroupsGetDetailsOK() *PcloudVolumegroupsGetDetailsOK { return &PcloudVolumegroupsGetDetailsOK{} } -/* PcloudVolumegroupsGetDetailsOK describes a response with status code 200, with default header values. +/* +PcloudVolumegroupsGetDetailsOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudVolumegroupsGetDetailsOK struct { Payload *models.VolumeGroupDetails } +// IsSuccess returns true when this pcloud volumegroups get details o k response has a 2xx status code +func (o *PcloudVolumegroupsGetDetailsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups get details o k response has a 3xx status code +func (o *PcloudVolumegroupsGetDetailsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get details o k response has a 4xx status code +func (o *PcloudVolumegroupsGetDetailsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups get details o k response has a 5xx status code +func (o *PcloudVolumegroupsGetDetailsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get details o k response a status code equal to that given +func (o *PcloudVolumegroupsGetDetailsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volumegroups get details o k response +func (o *PcloudVolumegroupsGetDetailsOK) Code() int { + return 200 +} + func (o *PcloudVolumegroupsGetDetailsOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsOK %+v", 200, o.Payload) } + +func (o *PcloudVolumegroupsGetDetailsOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsOK %+v", 200, o.Payload) +} + func (o *PcloudVolumegroupsGetDetailsOK) GetPayload() *models.VolumeGroupDetails { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudVolumegroupsGetDetailsBadRequest() *PcloudVolumegroupsGetDetailsBa return &PcloudVolumegroupsGetDetailsBadRequest{} } -/* PcloudVolumegroupsGetDetailsBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsGetDetailsBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudVolumegroupsGetDetailsBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups get details bad request response has a 2xx status code +func (o *PcloudVolumegroupsGetDetailsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get details bad request response has a 3xx status code +func (o *PcloudVolumegroupsGetDetailsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get details bad request response has a 4xx status code +func (o *PcloudVolumegroupsGetDetailsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups get details bad request response has a 5xx status code +func (o *PcloudVolumegroupsGetDetailsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get details bad request response a status code equal to that given +func (o *PcloudVolumegroupsGetDetailsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups get details bad request response +func (o *PcloudVolumegroupsGetDetailsBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsGetDetailsBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsGetDetailsBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsGetDetailsBadRequest) GetPayload() *models.Error { return o.Payload } @@ -116,12 +200,149 @@ 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{} +} + +/* +PcloudVolumegroupsGetDetailsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumegroupsGetDetailsForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups get details forbidden response has a 2xx status code +func (o *PcloudVolumegroupsGetDetailsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get details forbidden response has a 3xx status code +func (o *PcloudVolumegroupsGetDetailsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get details forbidden response has a 4xx status code +func (o *PcloudVolumegroupsGetDetailsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups get details forbidden response has a 5xx status code +func (o *PcloudVolumegroupsGetDetailsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get details forbidden response a status code equal to that given +func (o *PcloudVolumegroupsGetDetailsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups get details forbidden response +func (o *PcloudVolumegroupsGetDetailsForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumegroupsGetDetailsForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsGetDetailsForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsGetDetailsForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsGetDetailsForbidden) 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 +} + // NewPcloudVolumegroupsGetDetailsNotFound creates a PcloudVolumegroupsGetDetailsNotFound with default headers values func NewPcloudVolumegroupsGetDetailsNotFound() *PcloudVolumegroupsGetDetailsNotFound { return &PcloudVolumegroupsGetDetailsNotFound{} } -/* PcloudVolumegroupsGetDetailsNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumegroupsGetDetailsNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudVolumegroupsGetDetailsNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups get details not found response has a 2xx status code +func (o *PcloudVolumegroupsGetDetailsNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get details not found response has a 3xx status code +func (o *PcloudVolumegroupsGetDetailsNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get details not found response has a 4xx status code +func (o *PcloudVolumegroupsGetDetailsNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups get details not found response has a 5xx status code +func (o *PcloudVolumegroupsGetDetailsNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get details not found response a status code equal to that given +func (o *PcloudVolumegroupsGetDetailsNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups get details not found response +func (o *PcloudVolumegroupsGetDetailsNotFound) Code() int { + return 404 +} + func (o *PcloudVolumegroupsGetDetailsNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsNotFound %+v", 404, o.Payload) } + +func (o *PcloudVolumegroupsGetDetailsNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsNotFound %+v", 404, o.Payload) +} + func (o *PcloudVolumegroupsGetDetailsNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudVolumegroupsGetDetailsInternalServerError() *PcloudVolumegroupsGet return &PcloudVolumegroupsGetDetailsInternalServerError{} } -/* PcloudVolumegroupsGetDetailsInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsGetDetailsInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudVolumegroupsGetDetailsInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups get details internal server error response has a 2xx status code +func (o *PcloudVolumegroupsGetDetailsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get details internal server error response has a 3xx status code +func (o *PcloudVolumegroupsGetDetailsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get details internal server error response has a 4xx status code +func (o *PcloudVolumegroupsGetDetailsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups get details internal server error response has a 5xx status code +func (o *PcloudVolumegroupsGetDetailsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups get details internal server error response a status code equal to that given +func (o *PcloudVolumegroupsGetDetailsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups get details internal server error response +func (o *PcloudVolumegroupsGetDetailsInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsGetDetailsInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsGetDetailsInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/details][%d] pcloudVolumegroupsGetDetailsInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsGetDetailsInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_parameters.go index e72fa7f5443..96ad516d2f3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumegroupsGetParamsWithHTTPClient(client *http.Client) *PcloudVo } } -/* PcloudVolumegroupsGetParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups get operation. +/* +PcloudVolumegroupsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups get operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go index 178a7d2a162..e2efcd044a4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go @@ -35,6 +35,18 @@ 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 { + return nil, err + } + return nil, result case 404: result := NewPcloudVolumegroupsGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -48,7 +60,7 @@ func (o *PcloudVolumegroupsGetReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}] pcloud.volumegroups.get", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudVolumegroupsGetOK() *PcloudVolumegroupsGetOK { return &PcloudVolumegroupsGetOK{} } -/* PcloudVolumegroupsGetOK describes a response with status code 200, with default header values. +/* +PcloudVolumegroupsGetOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudVolumegroupsGetOK struct { Payload *models.VolumeGroup } +// IsSuccess returns true when this pcloud volumegroups get o k response has a 2xx status code +func (o *PcloudVolumegroupsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups get o k response has a 3xx status code +func (o *PcloudVolumegroupsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get o k response has a 4xx status code +func (o *PcloudVolumegroupsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups get o k response has a 5xx status code +func (o *PcloudVolumegroupsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get o k response a status code equal to that given +func (o *PcloudVolumegroupsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volumegroups get o k response +func (o *PcloudVolumegroupsGetOK) Code() int { + return 200 +} + func (o *PcloudVolumegroupsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetOK %+v", 200, o.Payload) } + +func (o *PcloudVolumegroupsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetOK %+v", 200, o.Payload) +} + func (o *PcloudVolumegroupsGetOK) GetPayload() *models.VolumeGroup { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudVolumegroupsGetBadRequest() *PcloudVolumegroupsGetBadRequest { return &PcloudVolumegroupsGetBadRequest{} } -/* PcloudVolumegroupsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudVolumegroupsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups get bad request response has a 2xx status code +func (o *PcloudVolumegroupsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get bad request response has a 3xx status code +func (o *PcloudVolumegroupsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get bad request response has a 4xx status code +func (o *PcloudVolumegroupsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups get bad request response has a 5xx status code +func (o *PcloudVolumegroupsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get bad request response a status code equal to that given +func (o *PcloudVolumegroupsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups get bad request response +func (o *PcloudVolumegroupsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -116,12 +200,149 @@ 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{} +} + +/* +PcloudVolumegroupsGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumegroupsGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups get forbidden response has a 2xx status code +func (o *PcloudVolumegroupsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get forbidden response has a 3xx status code +func (o *PcloudVolumegroupsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get forbidden response has a 4xx status code +func (o *PcloudVolumegroupsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups get forbidden response has a 5xx status code +func (o *PcloudVolumegroupsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get forbidden response a status code equal to that given +func (o *PcloudVolumegroupsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups get forbidden response +func (o *PcloudVolumegroupsGetForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumegroupsGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsGetForbidden) 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 +} + // NewPcloudVolumegroupsGetNotFound creates a PcloudVolumegroupsGetNotFound with default headers values func NewPcloudVolumegroupsGetNotFound() *PcloudVolumegroupsGetNotFound { return &PcloudVolumegroupsGetNotFound{} } -/* PcloudVolumegroupsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumegroupsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -129,9 +350,44 @@ type PcloudVolumegroupsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups get not found response has a 2xx status code +func (o *PcloudVolumegroupsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get not found response has a 3xx status code +func (o *PcloudVolumegroupsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get not found response has a 4xx status code +func (o *PcloudVolumegroupsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups get not found response has a 5xx status code +func (o *PcloudVolumegroupsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups get not found response a status code equal to that given +func (o *PcloudVolumegroupsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups get not found response +func (o *PcloudVolumegroupsGetNotFound) Code() int { + return 404 +} + func (o *PcloudVolumegroupsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudVolumegroupsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudVolumegroupsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -153,7 +409,8 @@ func NewPcloudVolumegroupsGetInternalServerError() *PcloudVolumegroupsGetInterna return &PcloudVolumegroupsGetInternalServerError{} } -/* PcloudVolumegroupsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudVolumegroupsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups get internal server error response has a 2xx status code +func (o *PcloudVolumegroupsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups get internal server error response has a 3xx status code +func (o *PcloudVolumegroupsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups get internal server error response has a 4xx status code +func (o *PcloudVolumegroupsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups get internal server error response has a 5xx status code +func (o *PcloudVolumegroupsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups get internal server error response a status code equal to that given +func (o *PcloudVolumegroupsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups get internal server error response +func (o *PcloudVolumegroupsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_parameters.go index d6de6a44b3d..a21f1220adc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumegroupsGetallDetailsParamsWithHTTPClient(client *http.Client) } } -/* PcloudVolumegroupsGetallDetailsParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups getall details operation. +/* +PcloudVolumegroupsGetallDetailsParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups getall details operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsGetallDetailsParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go index 141ab58248e..4397ec85461 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go @@ -41,6 +41,18 @@ func (o *PcloudVolumegroupsGetallDetailsReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 403: + result := NewPcloudVolumegroupsGetallDetailsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -48,7 +60,7 @@ func (o *PcloudVolumegroupsGetallDetailsReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details] pcloud.volumegroups.getallDetails", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudVolumegroupsGetallDetailsOK() *PcloudVolumegroupsGetallDetailsOK { return &PcloudVolumegroupsGetallDetailsOK{} } -/* PcloudVolumegroupsGetallDetailsOK describes a response with status code 200, with default header values. +/* +PcloudVolumegroupsGetallDetailsOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudVolumegroupsGetallDetailsOK struct { Payload *models.VolumeGroupsDetails } +// IsSuccess returns true when this pcloud volumegroups getall details o k response has a 2xx status code +func (o *PcloudVolumegroupsGetallDetailsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups getall details o k response has a 3xx status code +func (o *PcloudVolumegroupsGetallDetailsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall details o k response has a 4xx status code +func (o *PcloudVolumegroupsGetallDetailsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups getall details o k response has a 5xx status code +func (o *PcloudVolumegroupsGetallDetailsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall details o k response a status code equal to that given +func (o *PcloudVolumegroupsGetallDetailsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volumegroups getall details o k response +func (o *PcloudVolumegroupsGetallDetailsOK) Code() int { + return 200 +} + func (o *PcloudVolumegroupsGetallDetailsOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsOK %+v", 200, o.Payload) } + +func (o *PcloudVolumegroupsGetallDetailsOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsOK %+v", 200, o.Payload) +} + func (o *PcloudVolumegroupsGetallDetailsOK) GetPayload() *models.VolumeGroupsDetails { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudVolumegroupsGetallDetailsBadRequest() *PcloudVolumegroupsGetallDet return &PcloudVolumegroupsGetallDetailsBadRequest{} } -/* PcloudVolumegroupsGetallDetailsBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsGetallDetailsBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudVolumegroupsGetallDetailsBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups getall details bad request response has a 2xx status code +func (o *PcloudVolumegroupsGetallDetailsBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall details bad request response has a 3xx status code +func (o *PcloudVolumegroupsGetallDetailsBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall details bad request response has a 4xx status code +func (o *PcloudVolumegroupsGetallDetailsBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups getall details bad request response has a 5xx status code +func (o *PcloudVolumegroupsGetallDetailsBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall details bad request response a status code equal to that given +func (o *PcloudVolumegroupsGetallDetailsBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups getall details bad request response +func (o *PcloudVolumegroupsGetallDetailsBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsGetallDetailsBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsGetallDetailsBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsGetallDetailsBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudVolumegroupsGetallDetailsUnauthorized() *PcloudVolumegroupsGetallD return &PcloudVolumegroupsGetallDetailsUnauthorized{} } -/* PcloudVolumegroupsGetallDetailsUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumegroupsGetallDetailsUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudVolumegroupsGetallDetailsUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups getall details unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsGetallDetailsUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall details unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsGetallDetailsUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall details unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsGetallDetailsUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups getall details unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsGetallDetailsUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall details unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsGetallDetailsUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups getall details unauthorized response +func (o *PcloudVolumegroupsGetallDetailsUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumegroupsGetallDetailsUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumegroupsGetallDetailsUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumegroupsGetallDetailsUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudVolumegroupsGetallDetailsUnauthorized) readResponse(response runt return nil } +// NewPcloudVolumegroupsGetallDetailsForbidden creates a PcloudVolumegroupsGetallDetailsForbidden with default headers values +func NewPcloudVolumegroupsGetallDetailsForbidden() *PcloudVolumegroupsGetallDetailsForbidden { + return &PcloudVolumegroupsGetallDetailsForbidden{} +} + +/* +PcloudVolumegroupsGetallDetailsForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumegroupsGetallDetailsForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups getall details forbidden response has a 2xx status code +func (o *PcloudVolumegroupsGetallDetailsForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall details forbidden response has a 3xx status code +func (o *PcloudVolumegroupsGetallDetailsForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall details forbidden response has a 4xx status code +func (o *PcloudVolumegroupsGetallDetailsForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups getall details forbidden response has a 5xx status code +func (o *PcloudVolumegroupsGetallDetailsForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall details forbidden response a status code equal to that given +func (o *PcloudVolumegroupsGetallDetailsForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups getall details forbidden response +func (o *PcloudVolumegroupsGetallDetailsForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumegroupsGetallDetailsForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsGetallDetailsForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsGetallDetailsForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsGetallDetailsForbidden) 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 +} + +// 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{} } -/* PcloudVolumegroupsGetallDetailsInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsGetallDetailsInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudVolumegroupsGetallDetailsInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups getall details internal server error response has a 2xx status code +func (o *PcloudVolumegroupsGetallDetailsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall details internal server error response has a 3xx status code +func (o *PcloudVolumegroupsGetallDetailsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall details internal server error response has a 4xx status code +func (o *PcloudVolumegroupsGetallDetailsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups getall details internal server error response has a 5xx status code +func (o *PcloudVolumegroupsGetallDetailsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups getall details internal server error response a status code equal to that given +func (o *PcloudVolumegroupsGetallDetailsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups getall details internal server error response +func (o *PcloudVolumegroupsGetallDetailsInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsGetallDetailsInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsGetallDetailsInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/details][%d] pcloudVolumegroupsGetallDetailsInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsGetallDetailsInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_parameters.go index ab5613706ac..2c3e2a135e3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumegroupsGetallParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudVolumegroupsGetallParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups getall operation. +/* +PcloudVolumegroupsGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups getall operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go index 540752d2b51..f488e4dd862 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go @@ -41,6 +41,18 @@ func (o *PcloudVolumegroupsGetallReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 403: + result := NewPcloudVolumegroupsGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -48,7 +60,7 @@ func (o *PcloudVolumegroupsGetallReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups] pcloud.volumegroups.getall", response, response.Code()) } } @@ -57,7 +69,8 @@ func NewPcloudVolumegroupsGetallOK() *PcloudVolumegroupsGetallOK { return &PcloudVolumegroupsGetallOK{} } -/* PcloudVolumegroupsGetallOK describes a response with status code 200, with default header values. +/* +PcloudVolumegroupsGetallOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +78,44 @@ type PcloudVolumegroupsGetallOK struct { Payload *models.VolumeGroups } +// IsSuccess returns true when this pcloud volumegroups getall o k response has a 2xx status code +func (o *PcloudVolumegroupsGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups getall o k response has a 3xx status code +func (o *PcloudVolumegroupsGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall o k response has a 4xx status code +func (o *PcloudVolumegroupsGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups getall o k response has a 5xx status code +func (o *PcloudVolumegroupsGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall o k response a status code equal to that given +func (o *PcloudVolumegroupsGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volumegroups getall o k response +func (o *PcloudVolumegroupsGetallOK) Code() int { + return 200 +} + func (o *PcloudVolumegroupsGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallOK %+v", 200, o.Payload) } + +func (o *PcloudVolumegroupsGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallOK %+v", 200, o.Payload) +} + func (o *PcloudVolumegroupsGetallOK) GetPayload() *models.VolumeGroups { return o.Payload } @@ -89,7 +137,8 @@ func NewPcloudVolumegroupsGetallBadRequest() *PcloudVolumegroupsGetallBadRequest return &PcloudVolumegroupsGetallBadRequest{} } -/* PcloudVolumegroupsGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -97,9 +146,44 @@ type PcloudVolumegroupsGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups getall bad request response has a 2xx status code +func (o *PcloudVolumegroupsGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall bad request response has a 3xx status code +func (o *PcloudVolumegroupsGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall bad request response has a 4xx status code +func (o *PcloudVolumegroupsGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups getall bad request response has a 5xx status code +func (o *PcloudVolumegroupsGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall bad request response a status code equal to that given +func (o *PcloudVolumegroupsGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups getall bad request response +func (o *PcloudVolumegroupsGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -121,7 +205,8 @@ func NewPcloudVolumegroupsGetallUnauthorized() *PcloudVolumegroupsGetallUnauthor return &PcloudVolumegroupsGetallUnauthorized{} } -/* PcloudVolumegroupsGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumegroupsGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -129,9 +214,44 @@ type PcloudVolumegroupsGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups getall unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups getall unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups getall unauthorized response +func (o *PcloudVolumegroupsGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumegroupsGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumegroupsGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumegroupsGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -148,12 +268,149 @@ func (o *PcloudVolumegroupsGetallUnauthorized) readResponse(response runtime.Cli return nil } +// NewPcloudVolumegroupsGetallForbidden creates a PcloudVolumegroupsGetallForbidden with default headers values +func NewPcloudVolumegroupsGetallForbidden() *PcloudVolumegroupsGetallForbidden { + return &PcloudVolumegroupsGetallForbidden{} +} + +/* +PcloudVolumegroupsGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumegroupsGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups getall forbidden response has a 2xx status code +func (o *PcloudVolumegroupsGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall forbidden response has a 3xx status code +func (o *PcloudVolumegroupsGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall forbidden response has a 4xx status code +func (o *PcloudVolumegroupsGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups getall forbidden response has a 5xx status code +func (o *PcloudVolumegroupsGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups getall forbidden response a status code equal to that given +func (o *PcloudVolumegroupsGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups getall forbidden response +func (o *PcloudVolumegroupsGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumegroupsGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsGetallForbidden) 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 +} + +// 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{} } -/* PcloudVolumegroupsGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -161,9 +418,44 @@ type PcloudVolumegroupsGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups getall internal server error response has a 2xx status code +func (o *PcloudVolumegroupsGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups getall internal server error response has a 3xx status code +func (o *PcloudVolumegroupsGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups getall internal server error response has a 4xx status code +func (o *PcloudVolumegroupsGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups getall internal server error response has a 5xx status code +func (o *PcloudVolumegroupsGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups getall internal server error response a status code equal to that given +func (o *PcloudVolumegroupsGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups getall internal server error response +func (o *PcloudVolumegroupsGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_parameters.go index 9c43bbb6710..706f7761e3f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVolumegroupsPostParamsWithHTTPClient(client *http.Client) *PcloudV } } -/* PcloudVolumegroupsPostParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups post operation. +/* +PcloudVolumegroupsPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups post operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go index d57cc92dd4a..a5f9b46d03f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go @@ -47,6 +47,18 @@ func (o *PcloudVolumegroupsPostReader) ReadResponse(response runtime.ClientRespo return nil, err } return nil, result + case 403: + result := NewPcloudVolumegroupsPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + 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 { @@ -72,7 +84,7 @@ func (o *PcloudVolumegroupsPostReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups] pcloud.volumegroups.post", response, response.Code()) } } @@ -81,7 +93,8 @@ func NewPcloudVolumegroupsPostAccepted() *PcloudVolumegroupsPostAccepted { return &PcloudVolumegroupsPostAccepted{} } -/* PcloudVolumegroupsPostAccepted describes a response with status code 202, with default header values. +/* +PcloudVolumegroupsPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -89,9 +102,44 @@ type PcloudVolumegroupsPostAccepted struct { Payload *models.VolumeGroupCreateResponse } +// IsSuccess returns true when this pcloud volumegroups post accepted response has a 2xx status code +func (o *PcloudVolumegroupsPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups post accepted response has a 3xx status code +func (o *PcloudVolumegroupsPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post accepted response has a 4xx status code +func (o *PcloudVolumegroupsPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups post accepted response has a 5xx status code +func (o *PcloudVolumegroupsPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups post accepted response a status code equal to that given +func (o *PcloudVolumegroupsPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud volumegroups post accepted response +func (o *PcloudVolumegroupsPostAccepted) Code() int { + return 202 +} + func (o *PcloudVolumegroupsPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudVolumegroupsPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudVolumegroupsPostAccepted) GetPayload() *models.VolumeGroupCreateResponse { return o.Payload } @@ -113,7 +161,8 @@ func NewPcloudVolumegroupsPostPartialContent() *PcloudVolumegroupsPostPartialCon return &PcloudVolumegroupsPostPartialContent{} } -/* PcloudVolumegroupsPostPartialContent describes a response with status code 206, with default header values. +/* +PcloudVolumegroupsPostPartialContent describes a response with status code 206, with default header values. Partial Content */ @@ -121,9 +170,44 @@ type PcloudVolumegroupsPostPartialContent struct { Payload *models.VolumeGroupCreateResponse } +// IsSuccess returns true when this pcloud volumegroups post partial content response has a 2xx status code +func (o *PcloudVolumegroupsPostPartialContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups post partial content response has a 3xx status code +func (o *PcloudVolumegroupsPostPartialContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post partial content response has a 4xx status code +func (o *PcloudVolumegroupsPostPartialContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups post partial content response has a 5xx status code +func (o *PcloudVolumegroupsPostPartialContent) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups post partial content response a status code equal to that given +func (o *PcloudVolumegroupsPostPartialContent) IsCode(code int) bool { + return code == 206 +} + +// Code gets the status code for the pcloud volumegroups post partial content response +func (o *PcloudVolumegroupsPostPartialContent) Code() int { + return 206 +} + func (o *PcloudVolumegroupsPostPartialContent) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostPartialContent %+v", 206, o.Payload) } + +func (o *PcloudVolumegroupsPostPartialContent) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostPartialContent %+v", 206, o.Payload) +} + func (o *PcloudVolumegroupsPostPartialContent) GetPayload() *models.VolumeGroupCreateResponse { return o.Payload } @@ -145,7 +229,8 @@ func NewPcloudVolumegroupsPostBadRequest() *PcloudVolumegroupsPostBadRequest { return &PcloudVolumegroupsPostBadRequest{} } -/* PcloudVolumegroupsPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -153,9 +238,44 @@ type PcloudVolumegroupsPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups post bad request response has a 2xx status code +func (o *PcloudVolumegroupsPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups post bad request response has a 3xx status code +func (o *PcloudVolumegroupsPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post bad request response has a 4xx status code +func (o *PcloudVolumegroupsPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups post bad request response has a 5xx status code +func (o *PcloudVolumegroupsPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups post bad request response a status code equal to that given +func (o *PcloudVolumegroupsPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups post bad request response +func (o *PcloudVolumegroupsPostBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -177,7 +297,8 @@ func NewPcloudVolumegroupsPostUnauthorized() *PcloudVolumegroupsPostUnauthorized return &PcloudVolumegroupsPostUnauthorized{} } -/* PcloudVolumegroupsPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumegroupsPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -185,9 +306,44 @@ type PcloudVolumegroupsPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups post unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups post unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups post unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups post unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups post unauthorized response +func (o *PcloudVolumegroupsPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumegroupsPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumegroupsPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumegroupsPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -204,12 +360,149 @@ func (o *PcloudVolumegroupsPostUnauthorized) readResponse(response runtime.Clien return nil } +// NewPcloudVolumegroupsPostForbidden creates a PcloudVolumegroupsPostForbidden with default headers values +func NewPcloudVolumegroupsPostForbidden() *PcloudVolumegroupsPostForbidden { + return &PcloudVolumegroupsPostForbidden{} +} + +/* +PcloudVolumegroupsPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumegroupsPostForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups post forbidden response has a 2xx status code +func (o *PcloudVolumegroupsPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups post forbidden response has a 3xx status code +func (o *PcloudVolumegroupsPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post forbidden response has a 4xx status code +func (o *PcloudVolumegroupsPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups post forbidden response has a 5xx status code +func (o *PcloudVolumegroupsPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups post forbidden response a status code equal to that given +func (o *PcloudVolumegroupsPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups post forbidden response +func (o *PcloudVolumegroupsPostForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumegroupsPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsPostForbidden) 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 +} + +// 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{} } -/* PcloudVolumegroupsPostConflict describes a response with status code 409, with default header values. +/* +PcloudVolumegroupsPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -217,9 +510,44 @@ type PcloudVolumegroupsPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups post conflict response has a 2xx status code +func (o *PcloudVolumegroupsPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups post conflict response has a 3xx status code +func (o *PcloudVolumegroupsPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post conflict response has a 4xx status code +func (o *PcloudVolumegroupsPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups post conflict response has a 5xx status code +func (o *PcloudVolumegroupsPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups post conflict response a status code equal to that given +func (o *PcloudVolumegroupsPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud volumegroups post conflict response +func (o *PcloudVolumegroupsPostConflict) Code() int { + return 409 +} + func (o *PcloudVolumegroupsPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostConflict %+v", 409, o.Payload) } + +func (o *PcloudVolumegroupsPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostConflict %+v", 409, o.Payload) +} + func (o *PcloudVolumegroupsPostConflict) GetPayload() *models.Error { return o.Payload } @@ -241,7 +569,8 @@ func NewPcloudVolumegroupsPostUnprocessableEntity() *PcloudVolumegroupsPostUnpro return &PcloudVolumegroupsPostUnprocessableEntity{} } -/* PcloudVolumegroupsPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVolumegroupsPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -249,9 +578,44 @@ type PcloudVolumegroupsPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups post unprocessable entity response has a 2xx status code +func (o *PcloudVolumegroupsPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups post unprocessable entity response has a 3xx status code +func (o *PcloudVolumegroupsPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post unprocessable entity response has a 4xx status code +func (o *PcloudVolumegroupsPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups post unprocessable entity response has a 5xx status code +func (o *PcloudVolumegroupsPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups post unprocessable entity response a status code equal to that given +func (o *PcloudVolumegroupsPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud volumegroups post unprocessable entity response +func (o *PcloudVolumegroupsPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVolumegroupsPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVolumegroupsPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVolumegroupsPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -273,7 +637,8 @@ func NewPcloudVolumegroupsPostInternalServerError() *PcloudVolumegroupsPostInter return &PcloudVolumegroupsPostInternalServerError{} } -/* PcloudVolumegroupsPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -281,9 +646,44 @@ type PcloudVolumegroupsPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups post internal server error response has a 2xx status code +func (o *PcloudVolumegroupsPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups post internal server error response has a 3xx status code +func (o *PcloudVolumegroupsPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post internal server error response has a 4xx status code +func (o *PcloudVolumegroupsPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups post internal server error response has a 5xx status code +func (o *PcloudVolumegroupsPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups post internal server error response a status code equal to that given +func (o *PcloudVolumegroupsPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups post internal server error response +func (o *PcloudVolumegroupsPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsPostInternalServerError) GetPayload() *models.Error { return o.Payload } @@ -305,7 +705,8 @@ func NewPcloudVolumegroupsPostGatewayTimeout() *PcloudVolumegroupsPostGatewayTim return &PcloudVolumegroupsPostGatewayTimeout{} } -/* PcloudVolumegroupsPostGatewayTimeout describes a response with status code 504, with default header values. +/* +PcloudVolumegroupsPostGatewayTimeout describes a response with status code 504, with default header values. Gateway Timeout. Request is still processing and taking longer than expected. */ @@ -313,9 +714,44 @@ type PcloudVolumegroupsPostGatewayTimeout struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups post gateway timeout response has a 2xx status code +func (o *PcloudVolumegroupsPostGatewayTimeout) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups post gateway timeout response has a 3xx status code +func (o *PcloudVolumegroupsPostGatewayTimeout) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups post gateway timeout response has a 4xx status code +func (o *PcloudVolumegroupsPostGatewayTimeout) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups post gateway timeout response has a 5xx status code +func (o *PcloudVolumegroupsPostGatewayTimeout) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups post gateway timeout response a status code equal to that given +func (o *PcloudVolumegroupsPostGatewayTimeout) IsCode(code int) bool { + return code == 504 +} + +// Code gets the status code for the pcloud volumegroups post gateway timeout response +func (o *PcloudVolumegroupsPostGatewayTimeout) Code() int { + return 504 +} + func (o *PcloudVolumegroupsPostGatewayTimeout) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostGatewayTimeout %+v", 504, o.Payload) } + +func (o *PcloudVolumegroupsPostGatewayTimeout) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups][%d] pcloudVolumegroupsPostGatewayTimeout %+v", 504, o.Payload) +} + func (o *PcloudVolumegroupsPostGatewayTimeout) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_parameters.go index f99b17e9cf8..b97a3cc9bdf 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVolumegroupsPutParamsWithHTTPClient(client *http.Client) *PcloudVo } } -/* PcloudVolumegroupsPutParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups put operation. +/* +PcloudVolumegroupsPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups put operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go index 0a2085eecf7..121a977d927 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go @@ -41,6 +41,12 @@ func (o *PcloudVolumegroupsPutReader) ReadResponse(response runtime.ClientRespon return nil, err } return nil, result + case 403: + result := NewPcloudVolumegroupsPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudVolumegroupsPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -66,7 +72,7 @@ func (o *PcloudVolumegroupsPutReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}] pcloud.volumegroups.put", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudVolumegroupsPutAccepted() *PcloudVolumegroupsPutAccepted { return &PcloudVolumegroupsPutAccepted{} } -/* PcloudVolumegroupsPutAccepted describes a response with status code 202, with default header values. +/* +PcloudVolumegroupsPutAccepted describes a response with status code 202, with default header values. Accepted */ @@ -83,9 +90,44 @@ type PcloudVolumegroupsPutAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud volumegroups put accepted response has a 2xx status code +func (o *PcloudVolumegroupsPutAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups put accepted response has a 3xx status code +func (o *PcloudVolumegroupsPutAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups put accepted response has a 4xx status code +func (o *PcloudVolumegroupsPutAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups put accepted response has a 5xx status code +func (o *PcloudVolumegroupsPutAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups put accepted response a status code equal to that given +func (o *PcloudVolumegroupsPutAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud volumegroups put accepted response +func (o *PcloudVolumegroupsPutAccepted) Code() int { + return 202 +} + func (o *PcloudVolumegroupsPutAccepted) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutAccepted %+v", 202, o.Payload) } + +func (o *PcloudVolumegroupsPutAccepted) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutAccepted %+v", 202, o.Payload) +} + func (o *PcloudVolumegroupsPutAccepted) GetPayload() models.Object { return o.Payload } @@ -105,7 +147,8 @@ func NewPcloudVolumegroupsPutBadRequest() *PcloudVolumegroupsPutBadRequest { return &PcloudVolumegroupsPutBadRequest{} } -/* PcloudVolumegroupsPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -113,9 +156,44 @@ type PcloudVolumegroupsPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups put bad request response has a 2xx status code +func (o *PcloudVolumegroupsPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups put bad request response has a 3xx status code +func (o *PcloudVolumegroupsPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups put bad request response has a 4xx status code +func (o *PcloudVolumegroupsPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups put bad request response has a 5xx status code +func (o *PcloudVolumegroupsPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups put bad request response a status code equal to that given +func (o *PcloudVolumegroupsPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups put bad request response +func (o *PcloudVolumegroupsPutBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -137,7 +215,8 @@ func NewPcloudVolumegroupsPutUnauthorized() *PcloudVolumegroupsPutUnauthorized { return &PcloudVolumegroupsPutUnauthorized{} } -/* PcloudVolumegroupsPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumegroupsPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -145,9 +224,44 @@ type PcloudVolumegroupsPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups put unauthorized response has a 2xx status code +func (o *PcloudVolumegroupsPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups put unauthorized response has a 3xx status code +func (o *PcloudVolumegroupsPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups put unauthorized response has a 4xx status code +func (o *PcloudVolumegroupsPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups put unauthorized response has a 5xx status code +func (o *PcloudVolumegroupsPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups put unauthorized response a status code equal to that given +func (o *PcloudVolumegroupsPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumegroups put unauthorized response +func (o *PcloudVolumegroupsPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumegroupsPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumegroupsPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumegroupsPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -164,12 +278,81 @@ func (o *PcloudVolumegroupsPutUnauthorized) readResponse(response runtime.Client return nil } +// NewPcloudVolumegroupsPutForbidden creates a PcloudVolumegroupsPutForbidden with default headers values +func NewPcloudVolumegroupsPutForbidden() *PcloudVolumegroupsPutForbidden { + return &PcloudVolumegroupsPutForbidden{} +} + +/* +PcloudVolumegroupsPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumegroupsPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volumegroups put forbidden response has a 2xx status code +func (o *PcloudVolumegroupsPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups put forbidden response has a 3xx status code +func (o *PcloudVolumegroupsPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups put forbidden response has a 4xx status code +func (o *PcloudVolumegroupsPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups put forbidden response has a 5xx status code +func (o *PcloudVolumegroupsPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups put forbidden response a status code equal to that given +func (o *PcloudVolumegroupsPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups put forbidden response +func (o *PcloudVolumegroupsPutForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumegroupsPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumegroupsPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumegroupsPutForbidden) 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 +} + // NewPcloudVolumegroupsPutNotFound creates a PcloudVolumegroupsPutNotFound with default headers values func NewPcloudVolumegroupsPutNotFound() *PcloudVolumegroupsPutNotFound { return &PcloudVolumegroupsPutNotFound{} } -/* PcloudVolumegroupsPutNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumegroupsPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -177,9 +360,44 @@ type PcloudVolumegroupsPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups put not found response has a 2xx status code +func (o *PcloudVolumegroupsPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups put not found response has a 3xx status code +func (o *PcloudVolumegroupsPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups put not found response has a 4xx status code +func (o *PcloudVolumegroupsPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups put not found response has a 5xx status code +func (o *PcloudVolumegroupsPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups put not found response a status code equal to that given +func (o *PcloudVolumegroupsPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups put not found response +func (o *PcloudVolumegroupsPutNotFound) Code() int { + return 404 +} + func (o *PcloudVolumegroupsPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudVolumegroupsPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudVolumegroupsPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -201,7 +419,8 @@ func NewPcloudVolumegroupsPutConflict() *PcloudVolumegroupsPutConflict { return &PcloudVolumegroupsPutConflict{} } -/* PcloudVolumegroupsPutConflict describes a response with status code 409, with default header values. +/* +PcloudVolumegroupsPutConflict describes a response with status code 409, with default header values. Conflict */ @@ -209,9 +428,44 @@ type PcloudVolumegroupsPutConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups put conflict response has a 2xx status code +func (o *PcloudVolumegroupsPutConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups put conflict response has a 3xx status code +func (o *PcloudVolumegroupsPutConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups put conflict response has a 4xx status code +func (o *PcloudVolumegroupsPutConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups put conflict response has a 5xx status code +func (o *PcloudVolumegroupsPutConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups put conflict response a status code equal to that given +func (o *PcloudVolumegroupsPutConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud volumegroups put conflict response +func (o *PcloudVolumegroupsPutConflict) Code() int { + return 409 +} + func (o *PcloudVolumegroupsPutConflict) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutConflict %+v", 409, o.Payload) } + +func (o *PcloudVolumegroupsPutConflict) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutConflict %+v", 409, o.Payload) +} + func (o *PcloudVolumegroupsPutConflict) GetPayload() *models.Error { return o.Payload } @@ -233,7 +487,8 @@ func NewPcloudVolumegroupsPutUnprocessableEntity() *PcloudVolumegroupsPutUnproce return &PcloudVolumegroupsPutUnprocessableEntity{} } -/* PcloudVolumegroupsPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudVolumegroupsPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -241,9 +496,44 @@ type PcloudVolumegroupsPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups put unprocessable entity response has a 2xx status code +func (o *PcloudVolumegroupsPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups put unprocessable entity response has a 3xx status code +func (o *PcloudVolumegroupsPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups put unprocessable entity response has a 4xx status code +func (o *PcloudVolumegroupsPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups put unprocessable entity response has a 5xx status code +func (o *PcloudVolumegroupsPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups put unprocessable entity response a status code equal to that given +func (o *PcloudVolumegroupsPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud volumegroups put unprocessable entity response +func (o *PcloudVolumegroupsPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudVolumegroupsPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudVolumegroupsPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudVolumegroupsPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -265,7 +555,8 @@ func NewPcloudVolumegroupsPutInternalServerError() *PcloudVolumegroupsPutInterna return &PcloudVolumegroupsPutInternalServerError{} } -/* PcloudVolumegroupsPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -273,9 +564,44 @@ type PcloudVolumegroupsPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups put internal server error response has a 2xx status code +func (o *PcloudVolumegroupsPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups put internal server error response has a 3xx status code +func (o *PcloudVolumegroupsPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups put internal server error response has a 4xx status code +func (o *PcloudVolumegroupsPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups put internal server error response has a 5xx status code +func (o *PcloudVolumegroupsPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups put internal server error response a status code equal to that given +func (o *PcloudVolumegroupsPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups put internal server error response +func (o *PcloudVolumegroupsPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}][%d] pcloudVolumegroupsPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_parameters.go index 52ef79a2dd7..7e4a5784c5e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumegroupsRemoteCopyRelationshipsGetParamsWithHTTPClient(client } } -/* PcloudVolumegroupsRemoteCopyRelationshipsGetParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups remote copy relationships get operation. +/* +PcloudVolumegroupsRemoteCopyRelationshipsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups remote copy relationships get operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsRemoteCopyRelationshipsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go index a081f2db6b7..e3092d6b1e1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetReader) ReadResponse(respon } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships] pcloud.volumegroups.remoteCopyRelationships.get", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudVolumegroupsRemoteCopyRelationshipsGetOK() *PcloudVolumegroupsRemo return &PcloudVolumegroupsRemoteCopyRelationshipsGetOK{} } -/* PcloudVolumegroupsRemoteCopyRelationshipsGetOK describes a response with status code 200, with default header values. +/* +PcloudVolumegroupsRemoteCopyRelationshipsGetOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudVolumegroupsRemoteCopyRelationshipsGetOK struct { Payload *models.VolumeGroupRemoteCopyRelationships } +// IsSuccess returns true when this pcloud volumegroups remote copy relationships get o k response has a 2xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups remote copy relationships get o k response has a 3xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups remote copy relationships get o k response has a 4xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups remote copy relationships get o k response has a 5xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups remote copy relationships get o k response a status code equal to that given +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volumegroups remote copy relationships get o k response +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) Code() int { + return 200 +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetOK %+v", 200, o.Payload) } + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetOK %+v", 200, o.Payload) +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetOK) GetPayload() *models.VolumeGroupRemoteCopyRelationships { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest() *PcloudVolumegr return &PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest{} } -/* PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups remote copy relationships get bad request response has a 2xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups remote copy relationships get bad request response has a 3xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups remote copy relationships get bad request response has a 4xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups remote copy relationships get bad request response has a 5xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups remote copy relationships get bad request response a status code equal to that given +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups remote copy relationships get bad request response +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -128,12 +206,81 @@ 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{} } -/* PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden describes a response with status code 403, with default header values. +/* +PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -141,9 +288,44 @@ type PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups remote copy relationships get forbidden response has a 2xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups remote copy relationships get forbidden response has a 3xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups remote copy relationships get forbidden response has a 4xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups remote copy relationships get forbidden response has a 5xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups remote copy relationships get forbidden response a status code equal to that given +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups remote copy relationships get forbidden response +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) Code() int { + return 403 +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -165,7 +347,8 @@ func NewPcloudVolumegroupsRemoteCopyRelationshipsGetNotFound() *PcloudVolumegrou return &PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound{} } -/* PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -173,9 +356,44 @@ type PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups remote copy relationships get not found response has a 2xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups remote copy relationships get not found response has a 3xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups remote copy relationships get not found response has a 4xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups remote copy relationships get not found response has a 5xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups remote copy relationships get not found response a status code equal to that given +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups remote copy relationships get not found response +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) Code() int { + return 404 +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -197,7 +415,8 @@ func NewPcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests() *PcloudVol return &PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests{} } -/* PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests describes a response with status code 429, with default header values. +/* +PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests describes a response with status code 429, with default header values. Too Many Requests */ @@ -205,9 +424,44 @@ type PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups remote copy relationships get too many requests response has a 2xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups remote copy relationships get too many requests response has a 3xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups remote copy relationships get too many requests response has a 4xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups remote copy relationships get too many requests response has a 5xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups remote copy relationships get too many requests response a status code equal to that given +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the pcloud volumegroups remote copy relationships get too many requests response +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) Code() int { + return 429 +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests %+v", 429, o.Payload) } + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests %+v", 429, o.Payload) +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetTooManyRequests) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError() *Pclou return &PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError{} } -/* PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups remote copy relationships get internal server error response has a 2xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups remote copy relationships get internal server error response has a 3xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups remote copy relationships get internal server error response has a 4xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups remote copy relationships get internal server error response has a 5xx status code +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups remote copy relationships get internal server error response a status code equal to that given +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups remote copy relationships get internal server error response +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/remote-copy-relationships][%d] pcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsRemoteCopyRelationshipsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_parameters.go index 6f464a68377..2ca4cb52d7b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumegroupsStorageDetailsGetParamsWithHTTPClient(client *http.Cli } } -/* PcloudVolumegroupsStorageDetailsGetParams contains all the parameters to send to the API endpoint - for the pcloud volumegroups storage details get operation. +/* +PcloudVolumegroupsStorageDetailsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumegroups storage details get operation. + + Typically these are written to a http.Request. */ type PcloudVolumegroupsStorageDetailsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go index a89339f4b1e..6d39a07e32c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudVolumegroupsStorageDetailsGetReader) ReadResponse(response runtim } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details] pcloud.volumegroups.storageDetails.get", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudVolumegroupsStorageDetailsGetOK() *PcloudVolumegroupsStorageDetail return &PcloudVolumegroupsStorageDetailsGetOK{} } -/* PcloudVolumegroupsStorageDetailsGetOK describes a response with status code 200, with default header values. +/* +PcloudVolumegroupsStorageDetailsGetOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudVolumegroupsStorageDetailsGetOK struct { Payload *models.VolumeGroupStorageDetails } +// IsSuccess returns true when this pcloud volumegroups storage details get o k response has a 2xx status code +func (o *PcloudVolumegroupsStorageDetailsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumegroups storage details get o k response has a 3xx status code +func (o *PcloudVolumegroupsStorageDetailsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups storage details get o k response has a 4xx status code +func (o *PcloudVolumegroupsStorageDetailsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups storage details get o k response has a 5xx status code +func (o *PcloudVolumegroupsStorageDetailsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups storage details get o k response a status code equal to that given +func (o *PcloudVolumegroupsStorageDetailsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volumegroups storage details get o k response +func (o *PcloudVolumegroupsStorageDetailsGetOK) Code() int { + return 200 +} + func (o *PcloudVolumegroupsStorageDetailsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetOK %+v", 200, o.Payload) } + +func (o *PcloudVolumegroupsStorageDetailsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetOK %+v", 200, o.Payload) +} + func (o *PcloudVolumegroupsStorageDetailsGetOK) GetPayload() *models.VolumeGroupStorageDetails { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudVolumegroupsStorageDetailsGetBadRequest() *PcloudVolumegroupsStora return &PcloudVolumegroupsStorageDetailsGetBadRequest{} } -/* PcloudVolumegroupsStorageDetailsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumegroupsStorageDetailsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudVolumegroupsStorageDetailsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups storage details get bad request response has a 2xx status code +func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups storage details get bad request response has a 3xx status code +func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups storage details get bad request response has a 4xx status code +func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups storage details get bad request response has a 5xx status code +func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups storage details get bad request response a status code equal to that given +func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumegroups storage details get bad request response +func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumegroupsStorageDetailsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -128,12 +206,81 @@ 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{} } -/* PcloudVolumegroupsStorageDetailsGetForbidden describes a response with status code 403, with default header values. +/* +PcloudVolumegroupsStorageDetailsGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -141,9 +288,44 @@ type PcloudVolumegroupsStorageDetailsGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups storage details get forbidden response has a 2xx status code +func (o *PcloudVolumegroupsStorageDetailsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups storage details get forbidden response has a 3xx status code +func (o *PcloudVolumegroupsStorageDetailsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups storage details get forbidden response has a 4xx status code +func (o *PcloudVolumegroupsStorageDetailsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups storage details get forbidden response has a 5xx status code +func (o *PcloudVolumegroupsStorageDetailsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups storage details get forbidden response a status code equal to that given +func (o *PcloudVolumegroupsStorageDetailsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumegroups storage details get forbidden response +func (o *PcloudVolumegroupsStorageDetailsGetForbidden) Code() int { + return 403 +} + func (o *PcloudVolumegroupsStorageDetailsGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudVolumegroupsStorageDetailsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudVolumegroupsStorageDetailsGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -165,7 +347,8 @@ func NewPcloudVolumegroupsStorageDetailsGetNotFound() *PcloudVolumegroupsStorage return &PcloudVolumegroupsStorageDetailsGetNotFound{} } -/* PcloudVolumegroupsStorageDetailsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumegroupsStorageDetailsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -173,9 +356,44 @@ type PcloudVolumegroupsStorageDetailsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups storage details get not found response has a 2xx status code +func (o *PcloudVolumegroupsStorageDetailsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups storage details get not found response has a 3xx status code +func (o *PcloudVolumegroupsStorageDetailsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups storage details get not found response has a 4xx status code +func (o *PcloudVolumegroupsStorageDetailsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups storage details get not found response has a 5xx status code +func (o *PcloudVolumegroupsStorageDetailsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups storage details get not found response a status code equal to that given +func (o *PcloudVolumegroupsStorageDetailsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volumegroups storage details get not found response +func (o *PcloudVolumegroupsStorageDetailsGetNotFound) Code() int { + return 404 +} + func (o *PcloudVolumegroupsStorageDetailsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudVolumegroupsStorageDetailsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudVolumegroupsStorageDetailsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -197,7 +415,8 @@ func NewPcloudVolumegroupsStorageDetailsGetTooManyRequests() *PcloudVolumegroups return &PcloudVolumegroupsStorageDetailsGetTooManyRequests{} } -/* PcloudVolumegroupsStorageDetailsGetTooManyRequests describes a response with status code 429, with default header values. +/* +PcloudVolumegroupsStorageDetailsGetTooManyRequests describes a response with status code 429, with default header values. Too Many Requests */ @@ -205,9 +424,44 @@ type PcloudVolumegroupsStorageDetailsGetTooManyRequests struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups storage details get too many requests response has a 2xx status code +func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups storage details get too many requests response has a 3xx status code +func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups storage details get too many requests response has a 4xx status code +func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumegroups storage details get too many requests response has a 5xx status code +func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumegroups storage details get too many requests response a status code equal to that given +func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the pcloud volumegroups storage details get too many requests response +func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) Code() int { + return 429 +} + func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetTooManyRequests %+v", 429, o.Payload) } + +func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetTooManyRequests %+v", 429, o.Payload) +} + func (o *PcloudVolumegroupsStorageDetailsGetTooManyRequests) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudVolumegroupsStorageDetailsGetInternalServerError() *PcloudVolumegr return &PcloudVolumegroupsStorageDetailsGetInternalServerError{} } -/* PcloudVolumegroupsStorageDetailsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumegroupsStorageDetailsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudVolumegroupsStorageDetailsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumegroups storage details get internal server error response has a 2xx status code +func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumegroups storage details get internal server error response has a 3xx status code +func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumegroups storage details get internal server error response has a 4xx status code +func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumegroups storage details get internal server error response has a 5xx status code +func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumegroups storage details get internal server error response a status code equal to that given +func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumegroups storage details get internal server error response +func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volume-groups/{volume_group_id}/storage-details][%d] pcloudVolumegroupsStorageDetailsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumegroupsStorageDetailsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go index 856f9ee993e..5e84664f94d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go @@ -40,7 +40,7 @@ type ClientService interface { } /* - PcloudVolumeOnboardingGet gets the information of volume onboarding operation +PcloudVolumeOnboardingGet gets the information of volume onboarding operation */ func (a *Client) PcloudVolumeOnboardingGet(params *PcloudVolumeOnboardingGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumeOnboardingGetOK, error) { // TODO: Validate the params before sending @@ -79,7 +79,7 @@ func (a *Client) PcloudVolumeOnboardingGet(params *PcloudVolumeOnboardingGetPara } /* - PcloudVolumeOnboardingGetall lists all volume onboardings for this cloud instance +PcloudVolumeOnboardingGetall lists all volume onboardings for this cloud instance */ func (a *Client) PcloudVolumeOnboardingGetall(params *PcloudVolumeOnboardingGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumeOnboardingGetallOK, error) { // TODO: Validate the params before sending @@ -118,7 +118,7 @@ func (a *Client) PcloudVolumeOnboardingGetall(params *PcloudVolumeOnboardingGeta } /* - PcloudVolumeOnboardingPost onboards auxiliary volumes to target site +PcloudVolumeOnboardingPost onboards auxiliary volumes to target site */ func (a *Client) PcloudVolumeOnboardingPost(params *PcloudVolumeOnboardingPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumeOnboardingPostAccepted, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_parameters.go index fb01ac17ac4..3fc2f3fdf42 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumeOnboardingGetParamsWithHTTPClient(client *http.Client) *Pclo } } -/* PcloudVolumeOnboardingGetParams contains all the parameters to send to the API endpoint - for the pcloud volume onboarding get operation. +/* +PcloudVolumeOnboardingGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volume onboarding get operation. + + Typically these are written to a http.Request. */ type PcloudVolumeOnboardingGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go index bf5ee186f49..5e485da4bb3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudVolumeOnboardingGetReader) ReadResponse(response runtime.ClientRe return nil, err } return nil, result + case 403: + result := NewPcloudVolumeOnboardingGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudVolumeOnboardingGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudVolumeOnboardingGetReader) ReadResponse(response runtime.ClientRe } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}] pcloud.volume.onboarding.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudVolumeOnboardingGetOK() *PcloudVolumeOnboardingGetOK { return &PcloudVolumeOnboardingGetOK{} } -/* PcloudVolumeOnboardingGetOK describes a response with status code 200, with default header values. +/* +PcloudVolumeOnboardingGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudVolumeOnboardingGetOK struct { Payload *models.VolumeOnboarding } +// IsSuccess returns true when this pcloud volume onboarding get o k response has a 2xx status code +func (o *PcloudVolumeOnboardingGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volume onboarding get o k response has a 3xx status code +func (o *PcloudVolumeOnboardingGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding get o k response has a 4xx status code +func (o *PcloudVolumeOnboardingGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volume onboarding get o k response has a 5xx status code +func (o *PcloudVolumeOnboardingGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding get o k response a status code equal to that given +func (o *PcloudVolumeOnboardingGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volume onboarding get o k response +func (o *PcloudVolumeOnboardingGetOK) Code() int { + return 200 +} + func (o *PcloudVolumeOnboardingGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetOK %+v", 200, o.Payload) } + +func (o *PcloudVolumeOnboardingGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetOK %+v", 200, o.Payload) +} + func (o *PcloudVolumeOnboardingGetOK) GetPayload() *models.VolumeOnboarding { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudVolumeOnboardingGetBadRequest() *PcloudVolumeOnboardingGetBadReque return &PcloudVolumeOnboardingGetBadRequest{} } -/* PcloudVolumeOnboardingGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumeOnboardingGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudVolumeOnboardingGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding get bad request response has a 2xx status code +func (o *PcloudVolumeOnboardingGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding get bad request response has a 3xx status code +func (o *PcloudVolumeOnboardingGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding get bad request response has a 4xx status code +func (o *PcloudVolumeOnboardingGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding get bad request response has a 5xx status code +func (o *PcloudVolumeOnboardingGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding get bad request response a status code equal to that given +func (o *PcloudVolumeOnboardingGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volume onboarding get bad request response +func (o *PcloudVolumeOnboardingGetBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumeOnboardingGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumeOnboardingGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumeOnboardingGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudVolumeOnboardingGetUnauthorized() *PcloudVolumeOnboardingGetUnauth return &PcloudVolumeOnboardingGetUnauthorized{} } -/* PcloudVolumeOnboardingGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumeOnboardingGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudVolumeOnboardingGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding get unauthorized response has a 2xx status code +func (o *PcloudVolumeOnboardingGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding get unauthorized response has a 3xx status code +func (o *PcloudVolumeOnboardingGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding get unauthorized response has a 4xx status code +func (o *PcloudVolumeOnboardingGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding get unauthorized response has a 5xx status code +func (o *PcloudVolumeOnboardingGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding get unauthorized response a status code equal to that given +func (o *PcloudVolumeOnboardingGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volume onboarding get unauthorized response +func (o *PcloudVolumeOnboardingGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumeOnboardingGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumeOnboardingGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumeOnboardingGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudVolumeOnboardingGetUnauthorized) readResponse(response runtime.Cl return nil } +// NewPcloudVolumeOnboardingGetForbidden creates a PcloudVolumeOnboardingGetForbidden with default headers values +func NewPcloudVolumeOnboardingGetForbidden() *PcloudVolumeOnboardingGetForbidden { + return &PcloudVolumeOnboardingGetForbidden{} +} + +/* +PcloudVolumeOnboardingGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumeOnboardingGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volume onboarding get forbidden response has a 2xx status code +func (o *PcloudVolumeOnboardingGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding get forbidden response has a 3xx status code +func (o *PcloudVolumeOnboardingGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding get forbidden response has a 4xx status code +func (o *PcloudVolumeOnboardingGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding get forbidden response has a 5xx status code +func (o *PcloudVolumeOnboardingGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding get forbidden response a status code equal to that given +func (o *PcloudVolumeOnboardingGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volume onboarding get forbidden response +func (o *PcloudVolumeOnboardingGetForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumeOnboardingGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumeOnboardingGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumeOnboardingGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumeOnboardingGetForbidden) 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 +} + // NewPcloudVolumeOnboardingGetNotFound creates a PcloudVolumeOnboardingGetNotFound with default headers values func NewPcloudVolumeOnboardingGetNotFound() *PcloudVolumeOnboardingGetNotFound { return &PcloudVolumeOnboardingGetNotFound{} } -/* PcloudVolumeOnboardingGetNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumeOnboardingGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudVolumeOnboardingGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding get not found response has a 2xx status code +func (o *PcloudVolumeOnboardingGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding get not found response has a 3xx status code +func (o *PcloudVolumeOnboardingGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding get not found response has a 4xx status code +func (o *PcloudVolumeOnboardingGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding get not found response has a 5xx status code +func (o *PcloudVolumeOnboardingGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding get not found response a status code equal to that given +func (o *PcloudVolumeOnboardingGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud volume onboarding get not found response +func (o *PcloudVolumeOnboardingGetNotFound) Code() int { + return 404 +} + func (o *PcloudVolumeOnboardingGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudVolumeOnboardingGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudVolumeOnboardingGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudVolumeOnboardingGetInternalServerError() *PcloudVolumeOnboardingGe return &PcloudVolumeOnboardingGetInternalServerError{} } -/* PcloudVolumeOnboardingGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumeOnboardingGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudVolumeOnboardingGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding get internal server error response has a 2xx status code +func (o *PcloudVolumeOnboardingGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding get internal server error response has a 3xx status code +func (o *PcloudVolumeOnboardingGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding get internal server error response has a 4xx status code +func (o *PcloudVolumeOnboardingGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volume onboarding get internal server error response has a 5xx status code +func (o *PcloudVolumeOnboardingGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volume onboarding get internal server error response a status code equal to that given +func (o *PcloudVolumeOnboardingGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volume onboarding get internal server error response +func (o *PcloudVolumeOnboardingGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumeOnboardingGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumeOnboardingGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding/{volume_onboarding_id}][%d] pcloudVolumeOnboardingGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumeOnboardingGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_parameters.go index ffcf2db03b9..5cb9db5ed6a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudVolumeOnboardingGetallParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudVolumeOnboardingGetallParams contains all the parameters to send to the API endpoint - for the pcloud volume onboarding getall operation. +/* +PcloudVolumeOnboardingGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volume onboarding getall operation. + + Typically these are written to a http.Request. */ type PcloudVolumeOnboardingGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go index aa3f9de0229..1108621d193 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudVolumeOnboardingGetallReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 403: + result := NewPcloudVolumeOnboardingGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudVolumeOnboardingGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudVolumeOnboardingGetallReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding] pcloud.volume.onboarding.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudVolumeOnboardingGetallOK() *PcloudVolumeOnboardingGetallOK { return &PcloudVolumeOnboardingGetallOK{} } -/* PcloudVolumeOnboardingGetallOK describes a response with status code 200, with default header values. +/* +PcloudVolumeOnboardingGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudVolumeOnboardingGetallOK struct { Payload *models.VolumeOnboardings } +// IsSuccess returns true when this pcloud volume onboarding getall o k response has a 2xx status code +func (o *PcloudVolumeOnboardingGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volume onboarding getall o k response has a 3xx status code +func (o *PcloudVolumeOnboardingGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding getall o k response has a 4xx status code +func (o *PcloudVolumeOnboardingGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volume onboarding getall o k response has a 5xx status code +func (o *PcloudVolumeOnboardingGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding getall o k response a status code equal to that given +func (o *PcloudVolumeOnboardingGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volume onboarding getall o k response +func (o *PcloudVolumeOnboardingGetallOK) Code() int { + return 200 +} + func (o *PcloudVolumeOnboardingGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallOK %+v", 200, o.Payload) } + +func (o *PcloudVolumeOnboardingGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallOK %+v", 200, o.Payload) +} + func (o *PcloudVolumeOnboardingGetallOK) GetPayload() *models.VolumeOnboardings { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudVolumeOnboardingGetallBadRequest() *PcloudVolumeOnboardingGetallBa return &PcloudVolumeOnboardingGetallBadRequest{} } -/* PcloudVolumeOnboardingGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumeOnboardingGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudVolumeOnboardingGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding getall bad request response has a 2xx status code +func (o *PcloudVolumeOnboardingGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding getall bad request response has a 3xx status code +func (o *PcloudVolumeOnboardingGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding getall bad request response has a 4xx status code +func (o *PcloudVolumeOnboardingGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding getall bad request response has a 5xx status code +func (o *PcloudVolumeOnboardingGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding getall bad request response a status code equal to that given +func (o *PcloudVolumeOnboardingGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volume onboarding getall bad request response +func (o *PcloudVolumeOnboardingGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumeOnboardingGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumeOnboardingGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumeOnboardingGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudVolumeOnboardingGetallUnauthorized() *PcloudVolumeOnboardingGetall return &PcloudVolumeOnboardingGetallUnauthorized{} } -/* PcloudVolumeOnboardingGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumeOnboardingGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudVolumeOnboardingGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding getall unauthorized response has a 2xx status code +func (o *PcloudVolumeOnboardingGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding getall unauthorized response has a 3xx status code +func (o *PcloudVolumeOnboardingGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding getall unauthorized response has a 4xx status code +func (o *PcloudVolumeOnboardingGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding getall unauthorized response has a 5xx status code +func (o *PcloudVolumeOnboardingGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding getall unauthorized response a status code equal to that given +func (o *PcloudVolumeOnboardingGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volume onboarding getall unauthorized response +func (o *PcloudVolumeOnboardingGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumeOnboardingGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumeOnboardingGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumeOnboardingGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudVolumeOnboardingGetallUnauthorized) readResponse(response runtime return nil } +// NewPcloudVolumeOnboardingGetallForbidden creates a PcloudVolumeOnboardingGetallForbidden with default headers values +func NewPcloudVolumeOnboardingGetallForbidden() *PcloudVolumeOnboardingGetallForbidden { + return &PcloudVolumeOnboardingGetallForbidden{} +} + +/* +PcloudVolumeOnboardingGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumeOnboardingGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud volume onboarding getall forbidden response has a 2xx status code +func (o *PcloudVolumeOnboardingGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding getall forbidden response has a 3xx status code +func (o *PcloudVolumeOnboardingGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding getall forbidden response has a 4xx status code +func (o *PcloudVolumeOnboardingGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding getall forbidden response has a 5xx status code +func (o *PcloudVolumeOnboardingGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding getall forbidden response a status code equal to that given +func (o *PcloudVolumeOnboardingGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volume onboarding getall forbidden response +func (o *PcloudVolumeOnboardingGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudVolumeOnboardingGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumeOnboardingGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudVolumeOnboardingGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumeOnboardingGetallForbidden) 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 +} + // 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. +/* +PcloudVolumeOnboardingGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ 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 } @@ -191,7 +409,8 @@ func NewPcloudVolumeOnboardingGetallInternalServerError() *PcloudVolumeOnboardin return &PcloudVolumeOnboardingGetallInternalServerError{} } -/* PcloudVolumeOnboardingGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumeOnboardingGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudVolumeOnboardingGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding getall internal server error response has a 2xx status code +func (o *PcloudVolumeOnboardingGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding getall internal server error response has a 3xx status code +func (o *PcloudVolumeOnboardingGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding getall internal server error response has a 4xx status code +func (o *PcloudVolumeOnboardingGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volume onboarding getall internal server error response has a 5xx status code +func (o *PcloudVolumeOnboardingGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volume onboarding getall internal server error response a status code equal to that given +func (o *PcloudVolumeOnboardingGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volume onboarding getall internal server error response +func (o *PcloudVolumeOnboardingGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumeOnboardingGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumeOnboardingGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumeOnboardingGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_parameters.go index a61d8f908d6..5b0ae45031f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVolumeOnboardingPostParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudVolumeOnboardingPostParams contains all the parameters to send to the API endpoint - for the pcloud volume onboarding post operation. +/* +PcloudVolumeOnboardingPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volume onboarding post operation. + + Typically these are written to a http.Request. */ type PcloudVolumeOnboardingPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go index d400d947762..3e728d57de4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudVolumeOnboardingPostReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding] pcloud.volume.onboarding.post", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudVolumeOnboardingPostAccepted() *PcloudVolumeOnboardingPostAccepted return &PcloudVolumeOnboardingPostAccepted{} } -/* PcloudVolumeOnboardingPostAccepted describes a response with status code 202, with default header values. +/* +PcloudVolumeOnboardingPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +84,44 @@ type PcloudVolumeOnboardingPostAccepted struct { Payload *models.VolumeOnboardingCreateResponse } +// IsSuccess returns true when this pcloud volume onboarding post accepted response has a 2xx status code +func (o *PcloudVolumeOnboardingPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volume onboarding post accepted response has a 3xx status code +func (o *PcloudVolumeOnboardingPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding post accepted response has a 4xx status code +func (o *PcloudVolumeOnboardingPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volume onboarding post accepted response has a 5xx status code +func (o *PcloudVolumeOnboardingPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding post accepted response a status code equal to that given +func (o *PcloudVolumeOnboardingPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud volume onboarding post accepted response +func (o *PcloudVolumeOnboardingPostAccepted) Code() int { + return 202 +} + func (o *PcloudVolumeOnboardingPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudVolumeOnboardingPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudVolumeOnboardingPostAccepted) GetPayload() *models.VolumeOnboardingCreateResponse { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudVolumeOnboardingPostBadRequest() *PcloudVolumeOnboardingPostBadReq return &PcloudVolumeOnboardingPostBadRequest{} } -/* PcloudVolumeOnboardingPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumeOnboardingPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudVolumeOnboardingPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding post bad request response has a 2xx status code +func (o *PcloudVolumeOnboardingPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding post bad request response has a 3xx status code +func (o *PcloudVolumeOnboardingPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding post bad request response has a 4xx status code +func (o *PcloudVolumeOnboardingPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding post bad request response has a 5xx status code +func (o *PcloudVolumeOnboardingPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding post bad request response a status code equal to that given +func (o *PcloudVolumeOnboardingPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volume onboarding post bad request response +func (o *PcloudVolumeOnboardingPostBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumeOnboardingPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumeOnboardingPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumeOnboardingPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudVolumeOnboardingPostUnauthorized() *PcloudVolumeOnboardingPostUnau return &PcloudVolumeOnboardingPostUnauthorized{} } -/* PcloudVolumeOnboardingPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumeOnboardingPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudVolumeOnboardingPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding post unauthorized response has a 2xx status code +func (o *PcloudVolumeOnboardingPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding post unauthorized response has a 3xx status code +func (o *PcloudVolumeOnboardingPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding post unauthorized response has a 4xx status code +func (o *PcloudVolumeOnboardingPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding post unauthorized response has a 5xx status code +func (o *PcloudVolumeOnboardingPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding post unauthorized response a status code equal to that given +func (o *PcloudVolumeOnboardingPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volume onboarding post unauthorized response +func (o *PcloudVolumeOnboardingPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumeOnboardingPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumeOnboardingPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumeOnboardingPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +279,8 @@ func NewPcloudVolumeOnboardingPostForbidden() *PcloudVolumeOnboardingPostForbidd return &PcloudVolumeOnboardingPostForbidden{} } -/* PcloudVolumeOnboardingPostForbidden describes a response with status code 403, with default header values. +/* +PcloudVolumeOnboardingPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +288,44 @@ type PcloudVolumeOnboardingPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding post forbidden response has a 2xx status code +func (o *PcloudVolumeOnboardingPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding post forbidden response has a 3xx status code +func (o *PcloudVolumeOnboardingPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding post forbidden response has a 4xx status code +func (o *PcloudVolumeOnboardingPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding post forbidden response has a 5xx status code +func (o *PcloudVolumeOnboardingPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding post forbidden response a status code equal to that given +func (o *PcloudVolumeOnboardingPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volume onboarding post forbidden response +func (o *PcloudVolumeOnboardingPostForbidden) Code() int { + return 403 +} + func (o *PcloudVolumeOnboardingPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudVolumeOnboardingPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudVolumeOnboardingPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -192,12 +342,81 @@ 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{} } -/* PcloudVolumeOnboardingPostConflict describes a response with status code 409, with default header values. +/* +PcloudVolumeOnboardingPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -205,9 +424,44 @@ type PcloudVolumeOnboardingPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding post conflict response has a 2xx status code +func (o *PcloudVolumeOnboardingPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding post conflict response has a 3xx status code +func (o *PcloudVolumeOnboardingPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding post conflict response has a 4xx status code +func (o *PcloudVolumeOnboardingPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volume onboarding post conflict response has a 5xx status code +func (o *PcloudVolumeOnboardingPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volume onboarding post conflict response a status code equal to that given +func (o *PcloudVolumeOnboardingPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud volume onboarding post conflict response +func (o *PcloudVolumeOnboardingPostConflict) Code() int { + return 409 +} + func (o *PcloudVolumeOnboardingPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostConflict %+v", 409, o.Payload) } + +func (o *PcloudVolumeOnboardingPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostConflict %+v", 409, o.Payload) +} + func (o *PcloudVolumeOnboardingPostConflict) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudVolumeOnboardingPostInternalServerError() *PcloudVolumeOnboardingP return &PcloudVolumeOnboardingPostInternalServerError{} } -/* PcloudVolumeOnboardingPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumeOnboardingPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudVolumeOnboardingPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volume onboarding post internal server error response has a 2xx status code +func (o *PcloudVolumeOnboardingPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volume onboarding post internal server error response has a 3xx status code +func (o *PcloudVolumeOnboardingPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volume onboarding post internal server error response has a 4xx status code +func (o *PcloudVolumeOnboardingPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volume onboarding post internal server error response has a 5xx status code +func (o *PcloudVolumeOnboardingPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volume onboarding post internal server error response a status code equal to that given +func (o *PcloudVolumeOnboardingPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volume onboarding post internal server error response +func (o *PcloudVolumeOnboardingPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumeOnboardingPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumeOnboardingPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumeOnboardingPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go index d10ec6248ed..5036e6b0e01 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/p_cloud_volumes_client.go @@ -86,7 +86,7 @@ type ClientService interface { } /* - PcloudCloudinstancesVolumesFlashCopyMappingsGet gets a list of flashcopy mappings of a given volume +PcloudCloudinstancesVolumesFlashCopyMappingsGet gets a list of flashcopy mappings of a given volume */ func (a *Client) PcloudCloudinstancesVolumesFlashCopyMappingsGet(params *PcloudCloudinstancesVolumesFlashCopyMappingsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesFlashCopyMappingsGetOK, error) { // TODO: Validate the params before sending @@ -125,7 +125,7 @@ func (a *Client) PcloudCloudinstancesVolumesFlashCopyMappingsGet(params *PcloudC } /* - PcloudCloudinstancesVolumesActionPost performs an action on a volume +PcloudCloudinstancesVolumesActionPost performs an action on a volume */ func (a *Client) PcloudCloudinstancesVolumesActionPost(params *PcloudCloudinstancesVolumesActionPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesActionPostAccepted, error) { // TODO: Validate the params before sending @@ -164,7 +164,7 @@ func (a *Client) PcloudCloudinstancesVolumesActionPost(params *PcloudCloudinstan } /* - PcloudCloudinstancesVolumesDelete deletes a cloud instance volume +PcloudCloudinstancesVolumesDelete deletes a cloud instance volume */ func (a *Client) PcloudCloudinstancesVolumesDelete(params *PcloudCloudinstancesVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesDeleteOK, error) { // TODO: Validate the params before sending @@ -203,7 +203,7 @@ func (a *Client) PcloudCloudinstancesVolumesDelete(params *PcloudCloudinstancesV } /* - PcloudCloudinstancesVolumesGet detaileds info of a volume +PcloudCloudinstancesVolumesGet detaileds info of a volume */ func (a *Client) PcloudCloudinstancesVolumesGet(params *PcloudCloudinstancesVolumesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesGetOK, error) { // TODO: Validate the params before sending @@ -242,7 +242,7 @@ func (a *Client) PcloudCloudinstancesVolumesGet(params *PcloudCloudinstancesVolu } /* - PcloudCloudinstancesVolumesGetall lists all volumes for this cloud instance +PcloudCloudinstancesVolumesGetall lists all volumes for this cloud instance */ func (a *Client) PcloudCloudinstancesVolumesGetall(params *PcloudCloudinstancesVolumesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesGetallOK, error) { // TODO: Validate the params before sending @@ -281,7 +281,7 @@ func (a *Client) PcloudCloudinstancesVolumesGetall(params *PcloudCloudinstancesV } /* - PcloudCloudinstancesVolumesPost creates a new data volume +PcloudCloudinstancesVolumesPost creates a new data volume */ func (a *Client) PcloudCloudinstancesVolumesPost(params *PcloudCloudinstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesPostAccepted, error) { // TODO: Validate the params before sending @@ -320,7 +320,7 @@ func (a *Client) PcloudCloudinstancesVolumesPost(params *PcloudCloudinstancesVol } /* - PcloudCloudinstancesVolumesPut updates a cloud instance volume +PcloudCloudinstancesVolumesPut updates a cloud instance volume */ func (a *Client) PcloudCloudinstancesVolumesPut(params *PcloudCloudinstancesVolumesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesPutOK, error) { // TODO: Validate the params before sending @@ -359,7 +359,7 @@ func (a *Client) PcloudCloudinstancesVolumesPut(params *PcloudCloudinstancesVolu } /* - PcloudCloudinstancesVolumesRemoteCopyRelationshipGet gets remote copy relationship of a volume +PcloudCloudinstancesVolumesRemoteCopyRelationshipGet gets remote copy relationship of a volume */ func (a *Client) PcloudCloudinstancesVolumesRemoteCopyRelationshipGet(params *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK, error) { // TODO: Validate the params before sending @@ -398,7 +398,7 @@ func (a *Client) PcloudCloudinstancesVolumesRemoteCopyRelationshipGet(params *Pc } /* - PcloudPvminstancesVolumesDelete detaches a volume from a p VM instance +PcloudPvminstancesVolumesDelete detaches a volume from a p VM instance */ func (a *Client) PcloudPvminstancesVolumesDelete(params *PcloudPvminstancesVolumesDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesDeleteAccepted, error) { // TODO: Validate the params before sending @@ -437,7 +437,7 @@ func (a *Client) PcloudPvminstancesVolumesDelete(params *PcloudPvminstancesVolum } /* - PcloudPvminstancesVolumesGet detaileds info of a volume attached to a p VM instance +PcloudPvminstancesVolumesGet detaileds info of a volume attached to a p VM instance */ func (a *Client) PcloudPvminstancesVolumesGet(params *PcloudPvminstancesVolumesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesGetOK, error) { // TODO: Validate the params before sending @@ -476,7 +476,7 @@ func (a *Client) PcloudPvminstancesVolumesGet(params *PcloudPvminstancesVolumesG } /* - PcloudPvminstancesVolumesGetall lists all volumes attached to a p VM instance +PcloudPvminstancesVolumesGetall lists all volumes attached to a p VM instance */ func (a *Client) PcloudPvminstancesVolumesGetall(params *PcloudPvminstancesVolumesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesGetallOK, error) { // TODO: Validate the params before sending @@ -515,7 +515,7 @@ func (a *Client) PcloudPvminstancesVolumesGetall(params *PcloudPvminstancesVolum } /* - PcloudPvminstancesVolumesPost attaches a volume to a p VM instance +PcloudPvminstancesVolumesPost attaches a volume to a p VM instance */ func (a *Client) PcloudPvminstancesVolumesPost(params *PcloudPvminstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesPostOK, error) { // TODO: Validate the params before sending @@ -554,7 +554,7 @@ func (a *Client) PcloudPvminstancesVolumesPost(params *PcloudPvminstancesVolumes } /* - PcloudPvminstancesVolumesPut updates a volume attached to a p VM instance +PcloudPvminstancesVolumesPut updates a volume attached to a p VM instance */ func (a *Client) PcloudPvminstancesVolumesPut(params *PcloudPvminstancesVolumesPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesPutOK, error) { // TODO: Validate the params before sending @@ -593,7 +593,7 @@ func (a *Client) PcloudPvminstancesVolumesPut(params *PcloudPvminstancesVolumesP } /* - PcloudPvminstancesVolumesSetbootPut sets the p VM instance volume as the boot volume +PcloudPvminstancesVolumesSetbootPut sets the p VM instance volume as the boot volume */ func (a *Client) PcloudPvminstancesVolumesSetbootPut(params *PcloudPvminstancesVolumesSetbootPutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesVolumesSetbootPutOK, error) { // TODO: Validate the params before sending @@ -632,7 +632,7 @@ func (a *Client) PcloudPvminstancesVolumesSetbootPut(params *PcloudPvminstancesV } /* - PcloudV2PvminstancesVolumesPost attaches all volumes to a p VM instance +PcloudV2PvminstancesVolumesPost attaches all volumes to a p VM instance */ func (a *Client) PcloudV2PvminstancesVolumesPost(params *PcloudV2PvminstancesVolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2PvminstancesVolumesPostAccepted, error) { // TODO: Validate the params before sending @@ -671,7 +671,7 @@ func (a *Client) PcloudV2PvminstancesVolumesPost(params *PcloudV2PvminstancesVol } /* - PcloudV2VolumesClonePost creates a volume clone for specified volumes +PcloudV2VolumesClonePost creates a volume clone for specified volumes */ func (a *Client) PcloudV2VolumesClonePost(params *PcloudV2VolumesClonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesClonePostAccepted, error) { // TODO: Validate the params before sending @@ -710,7 +710,7 @@ func (a *Client) PcloudV2VolumesClonePost(params *PcloudV2VolumesClonePostParams } /* - PcloudV2VolumesClonetasksGet gets the status of a volumes clone request for the specified clone task ID +PcloudV2VolumesClonetasksGet gets the status of a volumes clone request for the specified clone task ID */ func (a *Client) PcloudV2VolumesClonetasksGet(params *PcloudV2VolumesClonetasksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesClonetasksGetOK, error) { // TODO: Validate the params before sending @@ -749,7 +749,7 @@ func (a *Client) PcloudV2VolumesClonetasksGet(params *PcloudV2VolumesClonetasksG } /* - PcloudV2VolumesPost creates multiple data volumes from a single definition +PcloudV2VolumesPost creates multiple data volumes from a single definition */ func (a *Client) PcloudV2VolumesPost(params *PcloudV2VolumesPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesPostCreated, error) { // TODO: Validate the params before sending @@ -788,7 +788,7 @@ func (a *Client) PcloudV2VolumesPost(params *PcloudV2VolumesPostParams, authInfo } /* - PcloudV2VolumescloneCancelPost cancels a volumes clone request initiates the cleanup action cleanup action performs the cleanup of the preparatory clones and snapshot volumes +PcloudV2VolumescloneCancelPost cancels a volumes clone request initiates the cleanup action cleanup action performs the cleanup of the preparatory clones and snapshot volumes */ func (a *Client) PcloudV2VolumescloneCancelPost(params *PcloudV2VolumescloneCancelPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneCancelPostAccepted, error) { // TODO: Validate the params before sending @@ -827,7 +827,7 @@ func (a *Client) PcloudV2VolumescloneCancelPost(params *PcloudV2VolumescloneCanc } /* - PcloudV2VolumescloneDelete deletes a volumes clone request +PcloudV2VolumescloneDelete deletes a volumes clone request */ func (a *Client) PcloudV2VolumescloneDelete(params *PcloudV2VolumescloneDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneDeleteOK, error) { // TODO: Validate the params before sending @@ -866,7 +866,7 @@ func (a *Client) PcloudV2VolumescloneDelete(params *PcloudV2VolumescloneDeletePa } /* - PcloudV2VolumescloneExecutePost initiates the execute action for a volumes clone request execute action creates the cloned volumes using the volume snapshots +PcloudV2VolumescloneExecutePost initiates the execute action for a volumes clone request execute action creates the cloned volumes using the volume snapshots */ func (a *Client) PcloudV2VolumescloneExecutePost(params *PcloudV2VolumescloneExecutePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneExecutePostAccepted, error) { // TODO: Validate the params before sending @@ -905,7 +905,7 @@ func (a *Client) PcloudV2VolumescloneExecutePost(params *PcloudV2VolumescloneExe } /* - PcloudV2VolumescloneGet gets the details for a volumes clone request +PcloudV2VolumescloneGet gets the details for a volumes clone request */ func (a *Client) PcloudV2VolumescloneGet(params *PcloudV2VolumescloneGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneGetOK, error) { // TODO: Validate the params before sending @@ -944,7 +944,7 @@ func (a *Client) PcloudV2VolumescloneGet(params *PcloudV2VolumescloneGetParams, } /* - PcloudV2VolumescloneGetall gets the list of volumes clone request for a cloud instance +PcloudV2VolumescloneGetall gets the list of volumes clone request for a cloud instance */ func (a *Client) PcloudV2VolumescloneGetall(params *PcloudV2VolumescloneGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneGetallOK, error) { // TODO: Validate the params before sending @@ -983,7 +983,7 @@ func (a *Client) PcloudV2VolumescloneGetall(params *PcloudV2VolumescloneGetallPa } /* - PcloudV2VolumesclonePost creates a new volumes clone request and initiates the prepare action requires a minimum of two volumes requires a minimum of one volume to be in the in use state requires a unique volumes clone name prepare action does the preparatory work for creating the snapshot volumes +PcloudV2VolumesclonePost creates a new volumes clone request and initiates the prepare action requires a minimum of two volumes requires a minimum of one volume to be in the in use state requires a unique volumes clone name prepare action does the preparatory work for creating the snapshot volumes */ func (a *Client) PcloudV2VolumesclonePost(params *PcloudV2VolumesclonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumesclonePostAccepted, error) { // TODO: Validate the params before sending @@ -1022,7 +1022,7 @@ func (a *Client) PcloudV2VolumesclonePost(params *PcloudV2VolumesclonePostParams } /* - PcloudV2VolumescloneStartPost initiates the start action for a volumes clone request start action starts the consistency group to initiate the flash copy +PcloudV2VolumescloneStartPost initiates the start action for a volumes clone request start action starts the consistency group to initiate the flash copy */ func (a *Client) PcloudV2VolumescloneStartPost(params *PcloudV2VolumescloneStartPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudV2VolumescloneStartPostOK, error) { // TODO: Validate the params before sending @@ -1061,7 +1061,11 @@ func (a *Client) PcloudV2VolumescloneStartPost(params *PcloudV2VolumescloneStart } /* - PcloudVolumesClonePost creates a volume clone for specified volumes + PcloudVolumesClonePost creates a volume clone for specified volumes + + This API is deprecated, use v2 clone API to perform the volume clone. + +>*Note*: Support for this API will be available till 31st March 2023. */ func (a *Client) PcloudVolumesClonePost(params *PcloudVolumesClonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumesClonePostOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_parameters.go index a66e7a29b36..fbe61b97c6e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudinstancesVolumesActionPostParamsWithHTTPClient(client *http.C } } -/* PcloudCloudinstancesVolumesActionPostParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances volumes action post operation. +/* +PcloudCloudinstancesVolumesActionPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances volumes action post operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesVolumesActionPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go index 89a7e1265f7..f59bc76a48b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go @@ -66,7 +66,7 @@ func (o *PcloudCloudinstancesVolumesActionPostReader) ReadResponse(response runt } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action] pcloud.cloudinstances.volumes.action.post", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudCloudinstancesVolumesActionPostAccepted() *PcloudCloudinstancesVol return &PcloudCloudinstancesVolumesActionPostAccepted{} } -/* PcloudCloudinstancesVolumesActionPostAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudinstancesVolumesActionPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -83,9 +84,44 @@ type PcloudCloudinstancesVolumesActionPostAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudinstances volumes action post accepted response has a 2xx status code +func (o *PcloudCloudinstancesVolumesActionPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances volumes action post accepted response has a 3xx status code +func (o *PcloudCloudinstancesVolumesActionPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes action post accepted response has a 4xx status code +func (o *PcloudCloudinstancesVolumesActionPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes action post accepted response has a 5xx status code +func (o *PcloudCloudinstancesVolumesActionPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes action post accepted response a status code equal to that given +func (o *PcloudCloudinstancesVolumesActionPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudinstances volumes action post accepted response +func (o *PcloudCloudinstancesVolumesActionPostAccepted) Code() int { + return 202 +} + func (o *PcloudCloudinstancesVolumesActionPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudinstancesVolumesActionPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudinstancesVolumesActionPostAccepted) GetPayload() models.Object { return o.Payload } @@ -105,7 +141,8 @@ func NewPcloudCloudinstancesVolumesActionPostBadRequest() *PcloudCloudinstancesV return &PcloudCloudinstancesVolumesActionPostBadRequest{} } -/* PcloudCloudinstancesVolumesActionPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesVolumesActionPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -113,9 +150,44 @@ type PcloudCloudinstancesVolumesActionPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes action post bad request response has a 2xx status code +func (o *PcloudCloudinstancesVolumesActionPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes action post bad request response has a 3xx status code +func (o *PcloudCloudinstancesVolumesActionPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes action post bad request response has a 4xx status code +func (o *PcloudCloudinstancesVolumesActionPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes action post bad request response has a 5xx status code +func (o *PcloudCloudinstancesVolumesActionPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes action post bad request response a status code equal to that given +func (o *PcloudCloudinstancesVolumesActionPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances volumes action post bad request response +func (o *PcloudCloudinstancesVolumesActionPostBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesVolumesActionPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesVolumesActionPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesVolumesActionPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -137,7 +209,8 @@ func NewPcloudCloudinstancesVolumesActionPostUnauthorized() *PcloudCloudinstance return &PcloudCloudinstancesVolumesActionPostUnauthorized{} } -/* PcloudCloudinstancesVolumesActionPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesVolumesActionPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -145,9 +218,44 @@ type PcloudCloudinstancesVolumesActionPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes action post unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes action post unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes action post unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes action post unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes action post unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances volumes action post unauthorized response +func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -169,7 +277,8 @@ func NewPcloudCloudinstancesVolumesActionPostForbidden() *PcloudCloudinstancesVo return &PcloudCloudinstancesVolumesActionPostForbidden{} } -/* PcloudCloudinstancesVolumesActionPostForbidden describes a response with status code 403, with default header values. +/* +PcloudCloudinstancesVolumesActionPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -177,9 +286,44 @@ type PcloudCloudinstancesVolumesActionPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes action post forbidden response has a 2xx status code +func (o *PcloudCloudinstancesVolumesActionPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes action post forbidden response has a 3xx status code +func (o *PcloudCloudinstancesVolumesActionPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes action post forbidden response has a 4xx status code +func (o *PcloudCloudinstancesVolumesActionPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes action post forbidden response has a 5xx status code +func (o *PcloudCloudinstancesVolumesActionPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes action post forbidden response a status code equal to that given +func (o *PcloudCloudinstancesVolumesActionPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances volumes action post forbidden response +func (o *PcloudCloudinstancesVolumesActionPostForbidden) Code() int { + return 403 +} + func (o *PcloudCloudinstancesVolumesActionPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudCloudinstancesVolumesActionPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudCloudinstancesVolumesActionPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -201,7 +345,8 @@ func NewPcloudCloudinstancesVolumesActionPostNotFound() *PcloudCloudinstancesVol return &PcloudCloudinstancesVolumesActionPostNotFound{} } -/* PcloudCloudinstancesVolumesActionPostNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesVolumesActionPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -209,9 +354,44 @@ type PcloudCloudinstancesVolumesActionPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes action post not found response has a 2xx status code +func (o *PcloudCloudinstancesVolumesActionPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes action post not found response has a 3xx status code +func (o *PcloudCloudinstancesVolumesActionPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes action post not found response has a 4xx status code +func (o *PcloudCloudinstancesVolumesActionPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes action post not found response has a 5xx status code +func (o *PcloudCloudinstancesVolumesActionPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes action post not found response a status code equal to that given +func (o *PcloudCloudinstancesVolumesActionPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances volumes action post not found response +func (o *PcloudCloudinstancesVolumesActionPostNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesVolumesActionPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesVolumesActionPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesVolumesActionPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -233,7 +413,8 @@ func NewPcloudCloudinstancesVolumesActionPostConflict() *PcloudCloudinstancesVol return &PcloudCloudinstancesVolumesActionPostConflict{} } -/* PcloudCloudinstancesVolumesActionPostConflict describes a response with status code 409, with default header values. +/* +PcloudCloudinstancesVolumesActionPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -241,9 +422,44 @@ type PcloudCloudinstancesVolumesActionPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes action post conflict response has a 2xx status code +func (o *PcloudCloudinstancesVolumesActionPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes action post conflict response has a 3xx status code +func (o *PcloudCloudinstancesVolumesActionPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes action post conflict response has a 4xx status code +func (o *PcloudCloudinstancesVolumesActionPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes action post conflict response has a 5xx status code +func (o *PcloudCloudinstancesVolumesActionPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes action post conflict response a status code equal to that given +func (o *PcloudCloudinstancesVolumesActionPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud cloudinstances volumes action post conflict response +func (o *PcloudCloudinstancesVolumesActionPostConflict) Code() int { + return 409 +} + func (o *PcloudCloudinstancesVolumesActionPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostConflict %+v", 409, o.Payload) } + +func (o *PcloudCloudinstancesVolumesActionPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostConflict %+v", 409, o.Payload) +} + func (o *PcloudCloudinstancesVolumesActionPostConflict) GetPayload() *models.Error { return o.Payload } @@ -265,7 +481,8 @@ func NewPcloudCloudinstancesVolumesActionPostInternalServerError() *PcloudCloudi return &PcloudCloudinstancesVolumesActionPostInternalServerError{} } -/* PcloudCloudinstancesVolumesActionPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesVolumesActionPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -273,9 +490,44 @@ type PcloudCloudinstancesVolumesActionPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes action post internal server error response has a 2xx status code +func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes action post internal server error response has a 3xx status code +func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes action post internal server error response has a 4xx status code +func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes action post internal server error response has a 5xx status code +func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances volumes action post internal server error response a status code equal to that given +func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances volumes action post internal server error response +func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesVolumesActionPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_parameters.go index d6066439cc9..28c1c34e0a2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesVolumesDeleteParamsWithHTTPClient(client *http.Clien } } -/* PcloudCloudinstancesVolumesDeleteParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances volumes delete operation. +/* +PcloudCloudinstancesVolumesDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances volumes delete operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesVolumesDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go index b8da1c3be3f..5ff94957aa5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go @@ -47,6 +47,12 @@ func (o *PcloudCloudinstancesVolumesDeleteReader) ReadResponse(response runtime. return nil, err } return nil, result + case 404: + result := NewPcloudCloudinstancesVolumesDeleteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 410: result := NewPcloudCloudinstancesVolumesDeleteGone() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudCloudinstancesVolumesDeleteReader) ReadResponse(response runtime. } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}] pcloud.cloudinstances.volumes.delete", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudCloudinstancesVolumesDeleteOK() *PcloudCloudinstancesVolumesDelete return &PcloudCloudinstancesVolumesDeleteOK{} } -/* PcloudCloudinstancesVolumesDeleteOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesVolumesDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudCloudinstancesVolumesDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud cloudinstances volumes delete o k response has a 2xx status code +func (o *PcloudCloudinstancesVolumesDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances volumes delete o k response has a 3xx status code +func (o *PcloudCloudinstancesVolumesDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes delete o k response has a 4xx status code +func (o *PcloudCloudinstancesVolumesDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes delete o k response has a 5xx status code +func (o *PcloudCloudinstancesVolumesDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes delete o k response a status code equal to that given +func (o *PcloudCloudinstancesVolumesDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances volumes delete o k response +func (o *PcloudCloudinstancesVolumesDeleteOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesVolumesDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesVolumesDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesVolumesDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +141,8 @@ func NewPcloudCloudinstancesVolumesDeleteBadRequest() *PcloudCloudinstancesVolum return &PcloudCloudinstancesVolumesDeleteBadRequest{} } -/* PcloudCloudinstancesVolumesDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesVolumesDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +150,44 @@ type PcloudCloudinstancesVolumesDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes delete bad request response has a 2xx status code +func (o *PcloudCloudinstancesVolumesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes delete bad request response has a 3xx status code +func (o *PcloudCloudinstancesVolumesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes delete bad request response has a 4xx status code +func (o *PcloudCloudinstancesVolumesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes delete bad request response has a 5xx status code +func (o *PcloudCloudinstancesVolumesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes delete bad request response a status code equal to that given +func (o *PcloudCloudinstancesVolumesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances volumes delete bad request response +func (o *PcloudCloudinstancesVolumesDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesVolumesDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesVolumesDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesVolumesDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +209,8 @@ func NewPcloudCloudinstancesVolumesDeleteUnauthorized() *PcloudCloudinstancesVol return &PcloudCloudinstancesVolumesDeleteUnauthorized{} } -/* PcloudCloudinstancesVolumesDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesVolumesDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +218,44 @@ type PcloudCloudinstancesVolumesDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes delete unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes delete unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes delete unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes delete unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes delete unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances volumes delete unauthorized response +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesVolumesDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -163,7 +277,8 @@ func NewPcloudCloudinstancesVolumesDeleteForbidden() *PcloudCloudinstancesVolume return &PcloudCloudinstancesVolumesDeleteForbidden{} } -/* PcloudCloudinstancesVolumesDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudCloudinstancesVolumesDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -171,9 +286,44 @@ type PcloudCloudinstancesVolumesDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes delete forbidden response has a 2xx status code +func (o *PcloudCloudinstancesVolumesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes delete forbidden response has a 3xx status code +func (o *PcloudCloudinstancesVolumesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes delete forbidden response has a 4xx status code +func (o *PcloudCloudinstancesVolumesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes delete forbidden response has a 5xx status code +func (o *PcloudCloudinstancesVolumesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes delete forbidden response a status code equal to that given +func (o *PcloudCloudinstancesVolumesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances volumes delete forbidden response +func (o *PcloudCloudinstancesVolumesDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudCloudinstancesVolumesDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudCloudinstancesVolumesDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudCloudinstancesVolumesDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -190,12 +340,81 @@ func (o *PcloudCloudinstancesVolumesDeleteForbidden) readResponse(response runti return nil } +// NewPcloudCloudinstancesVolumesDeleteNotFound creates a PcloudCloudinstancesVolumesDeleteNotFound with default headers values +func NewPcloudCloudinstancesVolumesDeleteNotFound() *PcloudCloudinstancesVolumesDeleteNotFound { + return &PcloudCloudinstancesVolumesDeleteNotFound{} +} + +/* +PcloudCloudinstancesVolumesDeleteNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesVolumesDeleteNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances volumes delete not found response has a 2xx status code +func (o *PcloudCloudinstancesVolumesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes delete not found response has a 3xx status code +func (o *PcloudCloudinstancesVolumesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes delete not found response has a 4xx status code +func (o *PcloudCloudinstancesVolumesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes delete not found response has a 5xx status code +func (o *PcloudCloudinstancesVolumesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes delete not found response a status code equal to that given +func (o *PcloudCloudinstancesVolumesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances volumes delete not found response +func (o *PcloudCloudinstancesVolumesDeleteNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesVolumesDeleteNotFound) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesDeleteNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesVolumesDeleteNotFound) 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 +} + // NewPcloudCloudinstancesVolumesDeleteGone creates a PcloudCloudinstancesVolumesDeleteGone with default headers values func NewPcloudCloudinstancesVolumesDeleteGone() *PcloudCloudinstancesVolumesDeleteGone { return &PcloudCloudinstancesVolumesDeleteGone{} } -/* PcloudCloudinstancesVolumesDeleteGone describes a response with status code 410, with default header values. +/* +PcloudCloudinstancesVolumesDeleteGone describes a response with status code 410, with default header values. Gone */ @@ -203,9 +422,44 @@ type PcloudCloudinstancesVolumesDeleteGone struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes delete gone response has a 2xx status code +func (o *PcloudCloudinstancesVolumesDeleteGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes delete gone response has a 3xx status code +func (o *PcloudCloudinstancesVolumesDeleteGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes delete gone response has a 4xx status code +func (o *PcloudCloudinstancesVolumesDeleteGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes delete gone response has a 5xx status code +func (o *PcloudCloudinstancesVolumesDeleteGone) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes delete gone response a status code equal to that given +func (o *PcloudCloudinstancesVolumesDeleteGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the pcloud cloudinstances volumes delete gone response +func (o *PcloudCloudinstancesVolumesDeleteGone) Code() int { + return 410 +} + func (o *PcloudCloudinstancesVolumesDeleteGone) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteGone %+v", 410, o.Payload) } + +func (o *PcloudCloudinstancesVolumesDeleteGone) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteGone %+v", 410, o.Payload) +} + func (o *PcloudCloudinstancesVolumesDeleteGone) GetPayload() *models.Error { return o.Payload } @@ -227,7 +481,8 @@ func NewPcloudCloudinstancesVolumesDeleteInternalServerError() *PcloudCloudinsta return &PcloudCloudinstancesVolumesDeleteInternalServerError{} } -/* PcloudCloudinstancesVolumesDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesVolumesDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +490,44 @@ type PcloudCloudinstancesVolumesDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes delete internal server error response has a 2xx status code +func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes delete internal server error response has a 3xx status code +func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes delete internal server error response has a 4xx status code +func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes delete internal server error response has a 5xx status code +func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances volumes delete internal server error response a status code equal to that given +func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances volumes delete internal server error response +func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesVolumesDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_parameters.go index da03434dee0..6e58283359e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesVolumesFlashCopyMappingsGetParamsWithHTTPClient(clie } } -/* PcloudCloudinstancesVolumesFlashCopyMappingsGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances volumes flash copy mappings get operation. +/* +PcloudCloudinstancesVolumesFlashCopyMappingsGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances volumes flash copy mappings get operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesVolumesFlashCopyMappingsGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go index 11456a4e03e..2df0879b58b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go @@ -66,7 +66,7 @@ func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetReader) ReadResponse(res } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings] pcloud.cloudinstances.volumes.FlashCopyMappings.get", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudCloudinstancesVolumesFlashCopyMappingsGetOK() *PcloudCloudinstance return &PcloudCloudinstancesVolumesFlashCopyMappingsGetOK{} } -/* PcloudCloudinstancesVolumesFlashCopyMappingsGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesVolumesFlashCopyMappingsGetOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudCloudinstancesVolumesFlashCopyMappingsGetOK struct { Payload models.FlashCopyMappings } +// IsSuccess returns true when this pcloud cloudinstances volumes flash copy mappings get o k response has a 2xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances volumes flash copy mappings get o k response has a 3xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes flash copy mappings get o k response has a 4xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes flash copy mappings get o k response has a 5xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes flash copy mappings get o k response a status code equal to that given +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances volumes flash copy mappings get o k response +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetOK) GetPayload() models.FlashCopyMappings { return o.Payload } @@ -105,7 +141,8 @@ func NewPcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest() *PcloudCloud return &PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest{} } -/* PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -113,9 +150,44 @@ type PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes flash copy mappings get bad request response has a 2xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes flash copy mappings get bad request response has a 3xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes flash copy mappings get bad request response has a 4xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes flash copy mappings get bad request response has a 5xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes flash copy mappings get bad request response a status code equal to that given +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances volumes flash copy mappings get bad request response +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -137,7 +209,8 @@ func NewPcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized() *PcloudClo return &PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized{} } -/* PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -145,9 +218,44 @@ type PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes flash copy mappings get unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes flash copy mappings get unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes flash copy mappings get unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes flash copy mappings get unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes flash copy mappings get unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances volumes flash copy mappings get unauthorized response +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -169,7 +277,8 @@ func NewPcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden() *PcloudCloudi return &PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden{} } -/* PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden describes a response with status code 403, with default header values. +/* +PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -177,9 +286,44 @@ type PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes flash copy mappings get forbidden response has a 2xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes flash copy mappings get forbidden response has a 3xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes flash copy mappings get forbidden response has a 4xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes flash copy mappings get forbidden response has a 5xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes flash copy mappings get forbidden response a status code equal to that given +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances volumes flash copy mappings get forbidden response +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) Code() int { + return 403 +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -201,7 +345,8 @@ func NewPcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound() *PcloudCloudin return &PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound{} } -/* PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -209,9 +354,44 @@ type PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes flash copy mappings get not found response has a 2xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes flash copy mappings get not found response has a 3xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes flash copy mappings get not found response has a 4xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes flash copy mappings get not found response has a 5xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes flash copy mappings get not found response a status code equal to that given +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances volumes flash copy mappings get not found response +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -233,7 +413,8 @@ func NewPcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests() *Pcloud return &PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests{} } -/* PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests describes a response with status code 429, with default header values. +/* +PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests describes a response with status code 429, with default header values. Too Many Requests */ @@ -241,9 +422,44 @@ type PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes flash copy mappings get too many requests response has a 2xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes flash copy mappings get too many requests response has a 3xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes flash copy mappings get too many requests response has a 4xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes flash copy mappings get too many requests response has a 5xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes flash copy mappings get too many requests response a status code equal to that given +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the pcloud cloudinstances volumes flash copy mappings get too many requests response +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) Code() int { + return 429 +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests %+v", 429, o.Payload) } + +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests %+v", 429, o.Payload) +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetTooManyRequests) GetPayload() *models.Error { return o.Payload } @@ -265,7 +481,8 @@ func NewPcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError() *Pc return &PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError{} } -/* PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -273,9 +490,44 @@ type PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes flash copy mappings get internal server error response has a 2xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes flash copy mappings get internal server error response has a 3xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes flash copy mappings get internal server error response has a 4xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes flash copy mappings get internal server error response has a 5xx status code +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances volumes flash copy mappings get internal server error response a status code equal to that given +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances volumes flash copy mappings get internal server error response +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/flash-copy-mappings][%d] pcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesVolumesFlashCopyMappingsGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_parameters.go index df8f8e699b3..5cefa5cf9dd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesVolumesGetParamsWithHTTPClient(client *http.Client) } } -/* PcloudCloudinstancesVolumesGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances volumes get operation. +/* +PcloudCloudinstancesVolumesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances volumes get operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesVolumesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go index 896d21be08c..fb9dd473dec 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesVolumesGetReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesVolumesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesVolumesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesVolumesGetReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}] pcloud.cloudinstances.volumes.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesVolumesGetOK() *PcloudCloudinstancesVolumesGetOK { return &PcloudCloudinstancesVolumesGetOK{} } -/* PcloudCloudinstancesVolumesGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesVolumesGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesVolumesGetOK struct { Payload *models.Volume } +// IsSuccess returns true when this pcloud cloudinstances volumes get o k response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances volumes get o k response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes get o k response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes get o k response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes get o k response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances volumes get o k response +func (o *PcloudCloudinstancesVolumesGetOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesVolumesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetOK) GetPayload() *models.Volume { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesVolumesGetBadRequest() *PcloudCloudinstancesVolumesG return &PcloudCloudinstancesVolumesGetBadRequest{} } -/* PcloudCloudinstancesVolumesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesVolumesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesVolumesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes get bad request response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes get bad request response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes get bad request response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes get bad request response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes get bad request response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances volumes get bad request response +func (o *PcloudCloudinstancesVolumesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesVolumesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesVolumesGetUnauthorized() *PcloudCloudinstancesVolume return &PcloudCloudinstancesVolumesGetUnauthorized{} } -/* PcloudCloudinstancesVolumesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesVolumesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesVolumesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes get unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes get unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes get unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes get unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes get unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances volumes get unauthorized response +func (o *PcloudCloudinstancesVolumesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesVolumesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudCloudinstancesVolumesGetUnauthorized) readResponse(response runti return nil } +// NewPcloudCloudinstancesVolumesGetForbidden creates a PcloudCloudinstancesVolumesGetForbidden with default headers values +func NewPcloudCloudinstancesVolumesGetForbidden() *PcloudCloudinstancesVolumesGetForbidden { + return &PcloudCloudinstancesVolumesGetForbidden{} +} + +/* +PcloudCloudinstancesVolumesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesVolumesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances volumes get forbidden response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes get forbidden response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes get forbidden response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes get forbidden response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes get forbidden response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances volumes get forbidden response +func (o *PcloudCloudinstancesVolumesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesVolumesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesVolumesGetForbidden) 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 +} + // NewPcloudCloudinstancesVolumesGetNotFound creates a PcloudCloudinstancesVolumesGetNotFound with default headers values func NewPcloudCloudinstancesVolumesGetNotFound() *PcloudCloudinstancesVolumesGetNotFound { return &PcloudCloudinstancesVolumesGetNotFound{} } -/* PcloudCloudinstancesVolumesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesVolumesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesVolumesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes get not found response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes get not found response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes get not found response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes get not found response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes get not found response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances volumes get not found response +func (o *PcloudCloudinstancesVolumesGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesVolumesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesVolumesGetInternalServerError() *PcloudCloudinstance return &PcloudCloudinstancesVolumesGetInternalServerError{} } -/* PcloudCloudinstancesVolumesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesVolumesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesVolumesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes get internal server error response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes get internal server error response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes get internal server error response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes get internal server error response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances volumes get internal server error response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances volumes get internal server error response +func (o *PcloudCloudinstancesVolumesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesVolumesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_parameters.go index 25ac732c3af..0c39df16f47 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_parameters.go @@ -53,10 +53,12 @@ func NewPcloudCloudinstancesVolumesGetallParamsWithHTTPClient(client *http.Clien } } -/* PcloudCloudinstancesVolumesGetallParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances volumes getall operation. +/* +PcloudCloudinstancesVolumesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances volumes getall operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesVolumesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go index 88e6badbeff..ed6c3532db1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesVolumesGetallReader) ReadResponse(response runtime. return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesVolumesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesVolumesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudCloudinstancesVolumesGetallReader) ReadResponse(response runtime. } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes] pcloud.cloudinstances.volumes.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudCloudinstancesVolumesGetallOK() *PcloudCloudinstancesVolumesGetall return &PcloudCloudinstancesVolumesGetallOK{} } -/* PcloudCloudinstancesVolumesGetallOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesVolumesGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudCloudinstancesVolumesGetallOK struct { Payload *models.Volumes } +// IsSuccess returns true when this pcloud cloudinstances volumes getall o k response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances volumes getall o k response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes getall o k response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes getall o k response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes getall o k response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances volumes getall o k response +func (o *PcloudCloudinstancesVolumesGetallOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesVolumesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetallOK) GetPayload() *models.Volumes { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudCloudinstancesVolumesGetallBadRequest() *PcloudCloudinstancesVolum return &PcloudCloudinstancesVolumesGetallBadRequest{} } -/* PcloudCloudinstancesVolumesGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesVolumesGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudCloudinstancesVolumesGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes getall bad request response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes getall bad request response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes getall bad request response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes getall bad request response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes getall bad request response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances volumes getall bad request response +func (o *PcloudCloudinstancesVolumesGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesVolumesGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudCloudinstancesVolumesGetallUnauthorized() *PcloudCloudinstancesVol return &PcloudCloudinstancesVolumesGetallUnauthorized{} } -/* PcloudCloudinstancesVolumesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesVolumesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudCloudinstancesVolumesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes getall unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes getall unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes getall unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes getall unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes getall unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances volumes getall unauthorized response +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesVolumesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudCloudinstancesVolumesGetallUnauthorized) readResponse(response ru return nil } +// NewPcloudCloudinstancesVolumesGetallForbidden creates a PcloudCloudinstancesVolumesGetallForbidden with default headers values +func NewPcloudCloudinstancesVolumesGetallForbidden() *PcloudCloudinstancesVolumesGetallForbidden { + return &PcloudCloudinstancesVolumesGetallForbidden{} +} + +/* +PcloudCloudinstancesVolumesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesVolumesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances volumes getall forbidden response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes getall forbidden response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes getall forbidden response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes getall forbidden response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes getall forbidden response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances volumes getall forbidden response +func (o *PcloudCloudinstancesVolumesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesVolumesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesVolumesGetallForbidden) 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 +} + // NewPcloudCloudinstancesVolumesGetallNotFound creates a PcloudCloudinstancesVolumesGetallNotFound with default headers values func NewPcloudCloudinstancesVolumesGetallNotFound() *PcloudCloudinstancesVolumesGetallNotFound { return &PcloudCloudinstancesVolumesGetallNotFound{} } -/* PcloudCloudinstancesVolumesGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesVolumesGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudCloudinstancesVolumesGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes getall not found response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes getall not found response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes getall not found response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes getall not found response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes getall not found response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances volumes getall not found response +func (o *PcloudCloudinstancesVolumesGetallNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesVolumesGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudCloudinstancesVolumesGetallInternalServerError() *PcloudCloudinsta return &PcloudCloudinstancesVolumesGetallInternalServerError{} } -/* PcloudCloudinstancesVolumesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesVolumesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudCloudinstancesVolumesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes getall internal server error response has a 2xx status code +func (o *PcloudCloudinstancesVolumesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes getall internal server error response has a 3xx status code +func (o *PcloudCloudinstancesVolumesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes getall internal server error response has a 4xx status code +func (o *PcloudCloudinstancesVolumesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes getall internal server error response has a 5xx status code +func (o *PcloudCloudinstancesVolumesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances volumes getall internal server error response a status code equal to that given +func (o *PcloudCloudinstancesVolumesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances volumes getall internal server error response +func (o *PcloudCloudinstancesVolumesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesVolumesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesVolumesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesVolumesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_parameters.go index 456bf17a9b9..e0d7ac739ea 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudinstancesVolumesPostParamsWithHTTPClient(client *http.Client) } } -/* PcloudCloudinstancesVolumesPostParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances volumes post operation. +/* +PcloudCloudinstancesVolumesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances volumes post operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesVolumesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go index a8596908f23..ce16de98fb4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudCloudinstancesVolumesPostReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes] pcloud.cloudinstances.volumes.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudCloudinstancesVolumesPostAccepted() *PcloudCloudinstancesVolumesPo return &PcloudCloudinstancesVolumesPostAccepted{} } -/* PcloudCloudinstancesVolumesPostAccepted describes a response with status code 202, with default header values. +/* +PcloudCloudinstancesVolumesPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -83,9 +90,44 @@ type PcloudCloudinstancesVolumesPostAccepted struct { Payload *models.Volume } +// IsSuccess returns true when this pcloud cloudinstances volumes post accepted response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances volumes post accepted response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes post accepted response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes post accepted response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes post accepted response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud cloudinstances volumes post accepted response +func (o *PcloudCloudinstancesVolumesPostAccepted) Code() int { + return 202 +} + func (o *PcloudCloudinstancesVolumesPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPostAccepted) GetPayload() *models.Volume { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudCloudinstancesVolumesPostBadRequest() *PcloudCloudinstancesVolumes return &PcloudCloudinstancesVolumesPostBadRequest{} } -/* PcloudCloudinstancesVolumesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesVolumesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudCloudinstancesVolumesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes post bad request response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes post bad request response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes post bad request response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes post bad request response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes post bad request response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances volumes post bad request response +func (o *PcloudCloudinstancesVolumesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesVolumesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudCloudinstancesVolumesPostUnauthorized() *PcloudCloudinstancesVolum return &PcloudCloudinstancesVolumesPostUnauthorized{} } -/* PcloudCloudinstancesVolumesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesVolumesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudCloudinstancesVolumesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes post unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes post unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes post unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes post unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes post unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances volumes post unauthorized response +func (o *PcloudCloudinstancesVolumesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesVolumesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +285,8 @@ func NewPcloudCloudinstancesVolumesPostForbidden() *PcloudCloudinstancesVolumesP return &PcloudCloudinstancesVolumesPostForbidden{} } -/* PcloudCloudinstancesVolumesPostForbidden describes a response with status code 403, with default header values. +/* +PcloudCloudinstancesVolumesPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +294,44 @@ type PcloudCloudinstancesVolumesPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes post forbidden response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes post forbidden response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes post forbidden response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes post forbidden response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes post forbidden response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances volumes post forbidden response +func (o *PcloudCloudinstancesVolumesPostForbidden) Code() int { + return 403 +} + func (o *PcloudCloudinstancesVolumesPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -198,12 +348,81 @@ 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{} } -/* PcloudCloudinstancesVolumesPostConflict describes a response with status code 409, with default header values. +/* +PcloudCloudinstancesVolumesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +430,44 @@ type PcloudCloudinstancesVolumesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes post conflict response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes post conflict response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes post conflict response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes post conflict response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes post conflict response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud cloudinstances volumes post conflict response +func (o *PcloudCloudinstancesVolumesPostConflict) Code() int { + return 409 +} + func (o *PcloudCloudinstancesVolumesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudCloudinstancesVolumesPostUnprocessableEntity() *PcloudCloudinstanc return &PcloudCloudinstancesVolumesPostUnprocessableEntity{} } -/* PcloudCloudinstancesVolumesPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudCloudinstancesVolumesPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudCloudinstancesVolumesPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes post unprocessable entity response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes post unprocessable entity response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes post unprocessable entity response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes post unprocessable entity response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes post unprocessable entity response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudinstances volumes post unprocessable entity response +func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudCloudinstancesVolumesPostInternalServerError() *PcloudCloudinstanc return &PcloudCloudinstancesVolumesPostInternalServerError{} } -/* PcloudCloudinstancesVolumesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesVolumesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudCloudinstancesVolumesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes post internal server error response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes post internal server error response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes post internal server error response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes post internal server error response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances volumes post internal server error response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances volumes post internal server error response +func (o *PcloudCloudinstancesVolumesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesVolumesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_parameters.go index 3c0e47c964e..df41f14ec85 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudCloudinstancesVolumesPutParamsWithHTTPClient(client *http.Client) } } -/* PcloudCloudinstancesVolumesPutParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances volumes put operation. +/* +PcloudCloudinstancesVolumesPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances volumes put operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesVolumesPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go index 37837d85419..77932ec85af 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go @@ -41,6 +41,18 @@ func (o *PcloudCloudinstancesVolumesPutReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesVolumesPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPcloudCloudinstancesVolumesPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudCloudinstancesVolumesPutConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +72,7 @@ func (o *PcloudCloudinstancesVolumesPutReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}] pcloud.cloudinstances.volumes.put", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewPcloudCloudinstancesVolumesPutOK() *PcloudCloudinstancesVolumesPutOK { return &PcloudCloudinstancesVolumesPutOK{} } -/* PcloudCloudinstancesVolumesPutOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesVolumesPutOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +90,44 @@ type PcloudCloudinstancesVolumesPutOK struct { Payload *models.Volume } +// IsSuccess returns true when this pcloud cloudinstances volumes put o k response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances volumes put o k response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes put o k response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes put o k response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes put o k response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances volumes put o k response +func (o *PcloudCloudinstancesVolumesPutOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesVolumesPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPutOK) GetPayload() *models.Volume { return o.Payload } @@ -101,7 +149,8 @@ func NewPcloudCloudinstancesVolumesPutBadRequest() *PcloudCloudinstancesVolumesP return &PcloudCloudinstancesVolumesPutBadRequest{} } -/* PcloudCloudinstancesVolumesPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesVolumesPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +158,44 @@ type PcloudCloudinstancesVolumesPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes put bad request response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes put bad request response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes put bad request response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes put bad request response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes put bad request response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances volumes put bad request response +func (o *PcloudCloudinstancesVolumesPutBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesVolumesPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +217,8 @@ func NewPcloudCloudinstancesVolumesPutUnauthorized() *PcloudCloudinstancesVolume return &PcloudCloudinstancesVolumesPutUnauthorized{} } -/* PcloudCloudinstancesVolumesPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesVolumesPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +226,44 @@ type PcloudCloudinstancesVolumesPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes put unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes put unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes put unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes put unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes put unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances volumes put unauthorized response +func (o *PcloudCloudinstancesVolumesPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesVolumesPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +280,149 @@ func (o *PcloudCloudinstancesVolumesPutUnauthorized) readResponse(response runti return nil } +// NewPcloudCloudinstancesVolumesPutForbidden creates a PcloudCloudinstancesVolumesPutForbidden with default headers values +func NewPcloudCloudinstancesVolumesPutForbidden() *PcloudCloudinstancesVolumesPutForbidden { + return &PcloudCloudinstancesVolumesPutForbidden{} +} + +/* +PcloudCloudinstancesVolumesPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesVolumesPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances volumes put forbidden response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes put forbidden response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes put forbidden response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes put forbidden response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes put forbidden response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances volumes put forbidden response +func (o *PcloudCloudinstancesVolumesPutForbidden) Code() int { + return 403 +} + +func (o *PcloudCloudinstancesVolumesPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesVolumesPutForbidden) 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 +} + +// NewPcloudCloudinstancesVolumesPutNotFound creates a PcloudCloudinstancesVolumesPutNotFound with default headers values +func NewPcloudCloudinstancesVolumesPutNotFound() *PcloudCloudinstancesVolumesPutNotFound { + return &PcloudCloudinstancesVolumesPutNotFound{} +} + +/* +PcloudCloudinstancesVolumesPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudCloudinstancesVolumesPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud cloudinstances volumes put not found response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes put not found response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes put not found response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes put not found response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes put not found response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances volumes put not found response +func (o *PcloudCloudinstancesVolumesPutNotFound) Code() int { + return 404 +} + +func (o *PcloudCloudinstancesVolumesPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudCloudinstancesVolumesPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesVolumesPutNotFound) 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 +} + // NewPcloudCloudinstancesVolumesPutConflict creates a PcloudCloudinstancesVolumesPutConflict with default headers values func NewPcloudCloudinstancesVolumesPutConflict() *PcloudCloudinstancesVolumesPutConflict { return &PcloudCloudinstancesVolumesPutConflict{} } -/* PcloudCloudinstancesVolumesPutConflict describes a response with status code 409, with default header values. +/* +PcloudCloudinstancesVolumesPutConflict describes a response with status code 409, with default header values. Conflict */ @@ -173,9 +430,44 @@ type PcloudCloudinstancesVolumesPutConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes put conflict response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPutConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes put conflict response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPutConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes put conflict response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPutConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes put conflict response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPutConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes put conflict response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPutConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud cloudinstances volumes put conflict response +func (o *PcloudCloudinstancesVolumesPutConflict) Code() int { + return 409 +} + func (o *PcloudCloudinstancesVolumesPutConflict) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutConflict %+v", 409, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPutConflict) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutConflict %+v", 409, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPutConflict) GetPayload() *models.Error { return o.Payload } @@ -197,7 +489,8 @@ func NewPcloudCloudinstancesVolumesPutUnprocessableEntity() *PcloudCloudinstance return &PcloudCloudinstancesVolumesPutUnprocessableEntity{} } -/* PcloudCloudinstancesVolumesPutUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudCloudinstancesVolumesPutUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -205,9 +498,44 @@ type PcloudCloudinstancesVolumesPutUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes put unprocessable entity response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes put unprocessable entity response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes put unprocessable entity response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes put unprocessable entity response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes put unprocessable entity response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud cloudinstances volumes put unprocessable entity response +func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPutUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -229,7 +557,8 @@ func NewPcloudCloudinstancesVolumesPutInternalServerError() *PcloudCloudinstance return &PcloudCloudinstancesVolumesPutInternalServerError{} } -/* PcloudCloudinstancesVolumesPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesVolumesPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +566,44 @@ type PcloudCloudinstancesVolumesPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes put internal server error response has a 2xx status code +func (o *PcloudCloudinstancesVolumesPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes put internal server error response has a 3xx status code +func (o *PcloudCloudinstancesVolumesPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes put internal server error response has a 4xx status code +func (o *PcloudCloudinstancesVolumesPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes put internal server error response has a 5xx status code +func (o *PcloudCloudinstancesVolumesPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances volumes put internal server error response a status code equal to that given +func (o *PcloudCloudinstancesVolumesPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances volumes put internal server error response +func (o *PcloudCloudinstancesVolumesPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesVolumesPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesVolumesPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}][%d] pcloudCloudinstancesVolumesPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesVolumesPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_parameters.go index af41954010d..6b20d71895f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetParamsWithHTTPClient } } -/* PcloudCloudinstancesVolumesRemoteCopyRelationshipGetParams contains all the parameters to send to the API endpoint - for the pcloud cloudinstances volumes remote copy relationship get operation. +/* +PcloudCloudinstancesVolumesRemoteCopyRelationshipGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud cloudinstances volumes remote copy relationship get operation. + + Typically these are written to a http.Request. */ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go index 6d5f81f0466..6f173cafcde 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go @@ -66,7 +66,7 @@ func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetReader) ReadRespons } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy] pcloud.cloudinstances.volumes.remoteCopyRelationship.get", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK() *PcloudCloudins return &PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK{} } -/* PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK describes a response with status code 200, with default header values. +/* +PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK struct { Payload *models.VolumeRemoteCopyRelationship } +// IsSuccess returns true when this pcloud cloudinstances volumes remote copy relationship get o k response has a 2xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud cloudinstances volumes remote copy relationship get o k response has a 3xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes remote copy relationship get o k response has a 4xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes remote copy relationship get o k response has a 5xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes remote copy relationship get o k response a status code equal to that given +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud cloudinstances volumes remote copy relationship get o k response +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) Code() int { + return 200 +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK %+v", 200, o.Payload) } + +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK %+v", 200, o.Payload) +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetOK) GetPayload() *models.VolumeRemoteCopyRelationship { return o.Payload } @@ -107,7 +143,8 @@ func NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest() *Pcloud return &PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest{} } -/* PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +152,44 @@ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes remote copy relationship get bad request response has a 2xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes remote copy relationship get bad request response has a 3xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes remote copy relationship get bad request response has a 4xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes remote copy relationship get bad request response has a 5xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes remote copy relationship get bad request response a status code equal to that given +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud cloudinstances volumes remote copy relationship get bad request response +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) Code() int { + return 400 +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +211,8 @@ func NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized() *Pclo return &PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized{} } -/* PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +220,44 @@ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes remote copy relationship get unauthorized response has a 2xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes remote copy relationship get unauthorized response has a 3xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes remote copy relationship get unauthorized response has a 4xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes remote copy relationship get unauthorized response has a 5xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes remote copy relationship get unauthorized response a status code equal to that given +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud cloudinstances volumes remote copy relationship get unauthorized response +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +279,8 @@ func NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden() *PcloudC return &PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden{} } -/* PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden describes a response with status code 403, with default header values. +/* +PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +288,44 @@ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes remote copy relationship get forbidden response has a 2xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes remote copy relationship get forbidden response has a 3xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes remote copy relationship get forbidden response has a 4xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes remote copy relationship get forbidden response has a 5xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes remote copy relationship get forbidden response a status code equal to that given +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud cloudinstances volumes remote copy relationship get forbidden response +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) Code() int { + return 403 +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden %+v", 403, o.Payload) } + +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden %+v", 403, o.Payload) +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetForbidden) GetPayload() *models.Error { return o.Payload } @@ -203,7 +347,8 @@ func NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound() *PcloudCl return &PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound{} } -/* PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound describes a response with status code 404, with default header values. +/* +PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -211,9 +356,44 @@ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes remote copy relationship get not found response has a 2xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes remote copy relationship get not found response has a 3xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes remote copy relationship get not found response has a 4xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes remote copy relationship get not found response has a 5xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes remote copy relationship get not found response a status code equal to that given +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud cloudinstances volumes remote copy relationship get not found response +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) Code() int { + return 404 +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -235,7 +415,8 @@ func NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests() *P return &PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests{} } -/* PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests describes a response with status code 429, with default header values. +/* +PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests describes a response with status code 429, with default header values. Too Many Requests */ @@ -243,9 +424,44 @@ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests struct Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes remote copy relationship get too many requests response has a 2xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes remote copy relationship get too many requests response has a 3xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes remote copy relationship get too many requests response has a 4xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud cloudinstances volumes remote copy relationship get too many requests response has a 5xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud cloudinstances volumes remote copy relationship get too many requests response a status code equal to that given +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the pcloud cloudinstances volumes remote copy relationship get too many requests response +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) Code() int { + return 429 +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests %+v", 429, o.Payload) } + +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests %+v", 429, o.Payload) +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetTooManyRequests) GetPayload() *models.Error { return o.Payload } @@ -267,7 +483,8 @@ func NewPcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError( return &PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError{} } -/* PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +492,44 @@ type PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError str Payload *models.Error } +// IsSuccess returns true when this pcloud cloudinstances volumes remote copy relationship get internal server error response has a 2xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud cloudinstances volumes remote copy relationship get internal server error response has a 3xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud cloudinstances volumes remote copy relationship get internal server error response has a 4xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud cloudinstances volumes remote copy relationship get internal server error response has a 5xx status code +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud cloudinstances volumes remote copy relationship get internal server error response a status code equal to that given +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud cloudinstances volumes remote copy relationship get internal server error response +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/remote-copy][%d] pcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudCloudinstancesVolumesRemoteCopyRelationshipGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_parameters.go index 0facc81b622..94d56f069ae 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesVolumesDeleteParamsWithHTTPClient(client *http.Client) } } -/* PcloudPvminstancesVolumesDeleteParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances volumes delete operation. +/* +PcloudPvminstancesVolumesDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances volumes delete operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesVolumesDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go index 7965aa2c97b..e475c5d0799 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go @@ -66,7 +66,7 @@ func (o *PcloudPvminstancesVolumesDeleteReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}] pcloud.pvminstances.volumes.delete", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudPvminstancesVolumesDeleteAccepted() *PcloudPvminstancesVolumesDele return &PcloudPvminstancesVolumesDeleteAccepted{} } -/* PcloudPvminstancesVolumesDeleteAccepted describes a response with status code 202, with default header values. +/* +PcloudPvminstancesVolumesDeleteAccepted describes a response with status code 202, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudPvminstancesVolumesDeleteAccepted struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances volumes delete accepted response has a 2xx status code +func (o *PcloudPvminstancesVolumesDeleteAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances volumes delete accepted response has a 3xx status code +func (o *PcloudPvminstancesVolumesDeleteAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes delete accepted response has a 4xx status code +func (o *PcloudPvminstancesVolumesDeleteAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes delete accepted response has a 5xx status code +func (o *PcloudPvminstancesVolumesDeleteAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes delete accepted response a status code equal to that given +func (o *PcloudPvminstancesVolumesDeleteAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud pvminstances volumes delete accepted response +func (o *PcloudPvminstancesVolumesDeleteAccepted) Code() int { + return 202 +} + func (o *PcloudPvminstancesVolumesDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteAccepted %+v", 202, o.Payload) } + +func (o *PcloudPvminstancesVolumesDeleteAccepted) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteAccepted %+v", 202, o.Payload) +} + func (o *PcloudPvminstancesVolumesDeleteAccepted) GetPayload() models.Object { return o.Payload } @@ -105,7 +141,8 @@ func NewPcloudPvminstancesVolumesDeleteBadRequest() *PcloudPvminstancesVolumesDe return &PcloudPvminstancesVolumesDeleteBadRequest{} } -/* PcloudPvminstancesVolumesDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesVolumesDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -113,9 +150,44 @@ type PcloudPvminstancesVolumesDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes delete bad request response has a 2xx status code +func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes delete bad request response has a 3xx status code +func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes delete bad request response has a 4xx status code +func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes delete bad request response has a 5xx status code +func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes delete bad request response a status code equal to that given +func (o *PcloudPvminstancesVolumesDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances volumes delete bad request response +func (o *PcloudPvminstancesVolumesDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesVolumesDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesVolumesDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesVolumesDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -137,7 +209,8 @@ func NewPcloudPvminstancesVolumesDeleteUnauthorized() *PcloudPvminstancesVolumes return &PcloudPvminstancesVolumesDeleteUnauthorized{} } -/* PcloudPvminstancesVolumesDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesVolumesDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -145,9 +218,44 @@ type PcloudPvminstancesVolumesDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes delete unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes delete unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes delete unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes delete unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes delete unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVolumesDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances volumes delete unauthorized response +func (o *PcloudPvminstancesVolumesDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesVolumesDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesVolumesDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesVolumesDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -169,7 +277,8 @@ func NewPcloudPvminstancesVolumesDeleteForbidden() *PcloudPvminstancesVolumesDel return &PcloudPvminstancesVolumesDeleteForbidden{} } -/* PcloudPvminstancesVolumesDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudPvminstancesVolumesDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -177,9 +286,44 @@ type PcloudPvminstancesVolumesDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes delete forbidden response has a 2xx status code +func (o *PcloudPvminstancesVolumesDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes delete forbidden response has a 3xx status code +func (o *PcloudPvminstancesVolumesDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes delete forbidden response has a 4xx status code +func (o *PcloudPvminstancesVolumesDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes delete forbidden response has a 5xx status code +func (o *PcloudPvminstancesVolumesDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes delete forbidden response a status code equal to that given +func (o *PcloudPvminstancesVolumesDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances volumes delete forbidden response +func (o *PcloudPvminstancesVolumesDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudPvminstancesVolumesDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudPvminstancesVolumesDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudPvminstancesVolumesDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -201,7 +345,8 @@ func NewPcloudPvminstancesVolumesDeleteNotFound() *PcloudPvminstancesVolumesDele return &PcloudPvminstancesVolumesDeleteNotFound{} } -/* PcloudPvminstancesVolumesDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesVolumesDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -209,9 +354,44 @@ type PcloudPvminstancesVolumesDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes delete not found response has a 2xx status code +func (o *PcloudPvminstancesVolumesDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes delete not found response has a 3xx status code +func (o *PcloudPvminstancesVolumesDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes delete not found response has a 4xx status code +func (o *PcloudPvminstancesVolumesDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes delete not found response has a 5xx status code +func (o *PcloudPvminstancesVolumesDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes delete not found response a status code equal to that given +func (o *PcloudPvminstancesVolumesDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances volumes delete not found response +func (o *PcloudPvminstancesVolumesDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesVolumesDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesVolumesDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesVolumesDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -233,7 +413,8 @@ func NewPcloudPvminstancesVolumesDeleteConflict() *PcloudPvminstancesVolumesDele return &PcloudPvminstancesVolumesDeleteConflict{} } -/* PcloudPvminstancesVolumesDeleteConflict describes a response with status code 409, with default header values. +/* +PcloudPvminstancesVolumesDeleteConflict describes a response with status code 409, with default header values. Conflict */ @@ -241,9 +422,44 @@ type PcloudPvminstancesVolumesDeleteConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes delete conflict response has a 2xx status code +func (o *PcloudPvminstancesVolumesDeleteConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes delete conflict response has a 3xx status code +func (o *PcloudPvminstancesVolumesDeleteConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes delete conflict response has a 4xx status code +func (o *PcloudPvminstancesVolumesDeleteConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes delete conflict response has a 5xx status code +func (o *PcloudPvminstancesVolumesDeleteConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes delete conflict response a status code equal to that given +func (o *PcloudPvminstancesVolumesDeleteConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances volumes delete conflict response +func (o *PcloudPvminstancesVolumesDeleteConflict) Code() int { + return 409 +} + func (o *PcloudPvminstancesVolumesDeleteConflict) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteConflict %+v", 409, o.Payload) } + +func (o *PcloudPvminstancesVolumesDeleteConflict) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteConflict %+v", 409, o.Payload) +} + func (o *PcloudPvminstancesVolumesDeleteConflict) GetPayload() *models.Error { return o.Payload } @@ -265,7 +481,8 @@ func NewPcloudPvminstancesVolumesDeleteInternalServerError() *PcloudPvminstances return &PcloudPvminstancesVolumesDeleteInternalServerError{} } -/* PcloudPvminstancesVolumesDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesVolumesDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -273,9 +490,44 @@ type PcloudPvminstancesVolumesDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes delete internal server error response has a 2xx status code +func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes delete internal server error response has a 3xx status code +func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes delete internal server error response has a 4xx status code +func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes delete internal server error response has a 5xx status code +func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances volumes delete internal server error response a status code equal to that given +func (o *PcloudPvminstancesVolumesDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances volumes delete internal server error response +func (o *PcloudPvminstancesVolumesDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesVolumesDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesVolumesDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesVolumesDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_parameters.go index 0307f189f6e..ddd51932860 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesVolumesGetParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudPvminstancesVolumesGetParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances volumes get operation. +/* +PcloudPvminstancesVolumesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances volumes get operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesVolumesGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go index fa119079ee4..fe063e85592 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesVolumesGetReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesVolumesGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesVolumesGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudPvminstancesVolumesGetReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}] pcloud.pvminstances.volumes.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudPvminstancesVolumesGetOK() *PcloudPvminstancesVolumesGetOK { return &PcloudPvminstancesVolumesGetOK{} } -/* PcloudPvminstancesVolumesGetOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesVolumesGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudPvminstancesVolumesGetOK struct { Payload *models.Volume } +// IsSuccess returns true when this pcloud pvminstances volumes get o k response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances volumes get o k response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes get o k response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes get o k response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes get o k response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances volumes get o k response +func (o *PcloudPvminstancesVolumesGetOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesVolumesGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetOK) GetPayload() *models.Volume { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudPvminstancesVolumesGetBadRequest() *PcloudPvminstancesVolumesGetBa return &PcloudPvminstancesVolumesGetBadRequest{} } -/* PcloudPvminstancesVolumesGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesVolumesGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudPvminstancesVolumesGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes get bad request response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes get bad request response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes get bad request response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes get bad request response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes get bad request response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances volumes get bad request response +func (o *PcloudPvminstancesVolumesGetBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesVolumesGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudPvminstancesVolumesGetUnauthorized() *PcloudPvminstancesVolumesGet return &PcloudPvminstancesVolumesGetUnauthorized{} } -/* PcloudPvminstancesVolumesGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesVolumesGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudPvminstancesVolumesGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes get unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes get unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes get unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes get unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes get unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances volumes get unauthorized response +func (o *PcloudPvminstancesVolumesGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesVolumesGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudPvminstancesVolumesGetUnauthorized) readResponse(response runtime return nil } +// NewPcloudPvminstancesVolumesGetForbidden creates a PcloudPvminstancesVolumesGetForbidden with default headers values +func NewPcloudPvminstancesVolumesGetForbidden() *PcloudPvminstancesVolumesGetForbidden { + return &PcloudPvminstancesVolumesGetForbidden{} +} + +/* +PcloudPvminstancesVolumesGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesVolumesGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances volumes get forbidden response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes get forbidden response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes get forbidden response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes get forbidden response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes get forbidden response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances volumes get forbidden response +func (o *PcloudPvminstancesVolumesGetForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesVolumesGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesVolumesGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesVolumesGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVolumesGetForbidden) 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 +} + // NewPcloudPvminstancesVolumesGetNotFound creates a PcloudPvminstancesVolumesGetNotFound with default headers values func NewPcloudPvminstancesVolumesGetNotFound() *PcloudPvminstancesVolumesGetNotFound { return &PcloudPvminstancesVolumesGetNotFound{} } -/* PcloudPvminstancesVolumesGetNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesVolumesGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudPvminstancesVolumesGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes get not found response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes get not found response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes get not found response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes get not found response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes get not found response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances volumes get not found response +func (o *PcloudPvminstancesVolumesGetNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesVolumesGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudPvminstancesVolumesGetInternalServerError() *PcloudPvminstancesVol return &PcloudPvminstancesVolumesGetInternalServerError{} } -/* PcloudPvminstancesVolumesGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesVolumesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudPvminstancesVolumesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes get internal server error response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes get internal server error response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes get internal server error response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes get internal server error response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances volumes get internal server error response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances volumes get internal server error response +func (o *PcloudPvminstancesVolumesGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesVolumesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_parameters.go index ad7ca531864..f4f012b3993 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesVolumesGetallParamsWithHTTPClient(client *http.Client) } } -/* PcloudPvminstancesVolumesGetallParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances volumes getall operation. +/* +PcloudPvminstancesVolumesGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances volumes getall operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesVolumesGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go index 7e98352931b..515b0baa904 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesVolumesGetallReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesVolumesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesVolumesGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudPvminstancesVolumesGetallReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes] pcloud.pvminstances.volumes.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudPvminstancesVolumesGetallOK() *PcloudPvminstancesVolumesGetallOK { return &PcloudPvminstancesVolumesGetallOK{} } -/* PcloudPvminstancesVolumesGetallOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesVolumesGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudPvminstancesVolumesGetallOK struct { Payload *models.Volumes } +// IsSuccess returns true when this pcloud pvminstances volumes getall o k response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances volumes getall o k response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes getall o k response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes getall o k response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes getall o k response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances volumes getall o k response +func (o *PcloudPvminstancesVolumesGetallOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesVolumesGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetallOK) GetPayload() *models.Volumes { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudPvminstancesVolumesGetallBadRequest() *PcloudPvminstancesVolumesGe return &PcloudPvminstancesVolumesGetallBadRequest{} } -/* PcloudPvminstancesVolumesGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesVolumesGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudPvminstancesVolumesGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes getall bad request response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes getall bad request response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes getall bad request response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes getall bad request response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes getall bad request response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances volumes getall bad request response +func (o *PcloudPvminstancesVolumesGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesVolumesGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudPvminstancesVolumesGetallUnauthorized() *PcloudPvminstancesVolumes return &PcloudPvminstancesVolumesGetallUnauthorized{} } -/* PcloudPvminstancesVolumesGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesVolumesGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudPvminstancesVolumesGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes getall unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes getall unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes getall unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes getall unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes getall unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances volumes getall unauthorized response +func (o *PcloudPvminstancesVolumesGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesVolumesGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudPvminstancesVolumesGetallUnauthorized) readResponse(response runt return nil } +// NewPcloudPvminstancesVolumesGetallForbidden creates a PcloudPvminstancesVolumesGetallForbidden with default headers values +func NewPcloudPvminstancesVolumesGetallForbidden() *PcloudPvminstancesVolumesGetallForbidden { + return &PcloudPvminstancesVolumesGetallForbidden{} +} + +/* +PcloudPvminstancesVolumesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesVolumesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances volumes getall forbidden response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes getall forbidden response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes getall forbidden response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes getall forbidden response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes getall forbidden response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances volumes getall forbidden response +func (o *PcloudPvminstancesVolumesGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesVolumesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesVolumesGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesVolumesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVolumesGetallForbidden) 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 +} + // NewPcloudPvminstancesVolumesGetallNotFound creates a PcloudPvminstancesVolumesGetallNotFound with default headers values func NewPcloudPvminstancesVolumesGetallNotFound() *PcloudPvminstancesVolumesGetallNotFound { return &PcloudPvminstancesVolumesGetallNotFound{} } -/* PcloudPvminstancesVolumesGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesVolumesGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudPvminstancesVolumesGetallNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes getall not found response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetallNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes getall not found response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetallNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes getall not found response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetallNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes getall not found response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetallNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes getall not found response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetallNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances volumes getall not found response +func (o *PcloudPvminstancesVolumesGetallNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesVolumesGetallNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetallNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetallNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudPvminstancesVolumesGetallInternalServerError() *PcloudPvminstances return &PcloudPvminstancesVolumesGetallInternalServerError{} } -/* PcloudPvminstancesVolumesGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesVolumesGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudPvminstancesVolumesGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes getall internal server error response has a 2xx status code +func (o *PcloudPvminstancesVolumesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes getall internal server error response has a 3xx status code +func (o *PcloudPvminstancesVolumesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes getall internal server error response has a 4xx status code +func (o *PcloudPvminstancesVolumesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes getall internal server error response has a 5xx status code +func (o *PcloudPvminstancesVolumesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances volumes getall internal server error response a status code equal to that given +func (o *PcloudPvminstancesVolumesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances volumes getall internal server error response +func (o *PcloudPvminstancesVolumesGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesVolumesGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesVolumesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudPvminstancesVolumesGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesVolumesGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_parameters.go index e6144e828a1..b76bf3cc122 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesVolumesPostParamsWithHTTPClient(client *http.Client) * } } -/* PcloudPvminstancesVolumesPostParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances volumes post operation. +/* +PcloudPvminstancesVolumesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances volumes post operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesVolumesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go index 85de2ff75ca..48d58e9af23 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go @@ -66,7 +66,7 @@ func (o *PcloudPvminstancesVolumesPostReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}] pcloud.pvminstances.volumes.post", response, response.Code()) } } @@ -75,7 +75,8 @@ func NewPcloudPvminstancesVolumesPostOK() *PcloudPvminstancesVolumesPostOK { return &PcloudPvminstancesVolumesPostOK{} } -/* PcloudPvminstancesVolumesPostOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesVolumesPostOK describes a response with status code 200, with default header values. OK */ @@ -83,9 +84,44 @@ type PcloudPvminstancesVolumesPostOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances volumes post o k response has a 2xx status code +func (o *PcloudPvminstancesVolumesPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances volumes post o k response has a 3xx status code +func (o *PcloudPvminstancesVolumesPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes post o k response has a 4xx status code +func (o *PcloudPvminstancesVolumesPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes post o k response has a 5xx status code +func (o *PcloudPvminstancesVolumesPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes post o k response a status code equal to that given +func (o *PcloudPvminstancesVolumesPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances volumes post o k response +func (o *PcloudPvminstancesVolumesPostOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesVolumesPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesVolumesPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesVolumesPostOK) GetPayload() models.Object { return o.Payload } @@ -105,7 +141,8 @@ func NewPcloudPvminstancesVolumesPostBadRequest() *PcloudPvminstancesVolumesPost return &PcloudPvminstancesVolumesPostBadRequest{} } -/* PcloudPvminstancesVolumesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesVolumesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -113,9 +150,44 @@ type PcloudPvminstancesVolumesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes post bad request response has a 2xx status code +func (o *PcloudPvminstancesVolumesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes post bad request response has a 3xx status code +func (o *PcloudPvminstancesVolumesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes post bad request response has a 4xx status code +func (o *PcloudPvminstancesVolumesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes post bad request response has a 5xx status code +func (o *PcloudPvminstancesVolumesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes post bad request response a status code equal to that given +func (o *PcloudPvminstancesVolumesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances volumes post bad request response +func (o *PcloudPvminstancesVolumesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesVolumesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesVolumesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesVolumesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -137,7 +209,8 @@ func NewPcloudPvminstancesVolumesPostUnauthorized() *PcloudPvminstancesVolumesPo return &PcloudPvminstancesVolumesPostUnauthorized{} } -/* PcloudPvminstancesVolumesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesVolumesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -145,9 +218,44 @@ type PcloudPvminstancesVolumesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes post unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVolumesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes post unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVolumesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes post unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVolumesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes post unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVolumesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes post unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVolumesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances volumes post unauthorized response +func (o *PcloudPvminstancesVolumesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesVolumesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesVolumesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesVolumesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -169,7 +277,8 @@ func NewPcloudPvminstancesVolumesPostForbidden() *PcloudPvminstancesVolumesPostF return &PcloudPvminstancesVolumesPostForbidden{} } -/* PcloudPvminstancesVolumesPostForbidden describes a response with status code 403, with default header values. +/* +PcloudPvminstancesVolumesPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -177,9 +286,44 @@ type PcloudPvminstancesVolumesPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes post forbidden response has a 2xx status code +func (o *PcloudPvminstancesVolumesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes post forbidden response has a 3xx status code +func (o *PcloudPvminstancesVolumesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes post forbidden response has a 4xx status code +func (o *PcloudPvminstancesVolumesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes post forbidden response has a 5xx status code +func (o *PcloudPvminstancesVolumesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes post forbidden response a status code equal to that given +func (o *PcloudPvminstancesVolumesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances volumes post forbidden response +func (o *PcloudPvminstancesVolumesPostForbidden) Code() int { + return 403 +} + func (o *PcloudPvminstancesVolumesPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudPvminstancesVolumesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudPvminstancesVolumesPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -201,7 +345,8 @@ func NewPcloudPvminstancesVolumesPostNotFound() *PcloudPvminstancesVolumesPostNo return &PcloudPvminstancesVolumesPostNotFound{} } -/* PcloudPvminstancesVolumesPostNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesVolumesPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -209,9 +354,44 @@ type PcloudPvminstancesVolumesPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes post not found response has a 2xx status code +func (o *PcloudPvminstancesVolumesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes post not found response has a 3xx status code +func (o *PcloudPvminstancesVolumesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes post not found response has a 4xx status code +func (o *PcloudPvminstancesVolumesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes post not found response has a 5xx status code +func (o *PcloudPvminstancesVolumesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes post not found response a status code equal to that given +func (o *PcloudPvminstancesVolumesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances volumes post not found response +func (o *PcloudPvminstancesVolumesPostNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesVolumesPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesVolumesPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesVolumesPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -233,7 +413,8 @@ func NewPcloudPvminstancesVolumesPostConflict() *PcloudPvminstancesVolumesPostCo return &PcloudPvminstancesVolumesPostConflict{} } -/* PcloudPvminstancesVolumesPostConflict describes a response with status code 409, with default header values. +/* +PcloudPvminstancesVolumesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -241,9 +422,44 @@ type PcloudPvminstancesVolumesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes post conflict response has a 2xx status code +func (o *PcloudPvminstancesVolumesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes post conflict response has a 3xx status code +func (o *PcloudPvminstancesVolumesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes post conflict response has a 4xx status code +func (o *PcloudPvminstancesVolumesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes post conflict response has a 5xx status code +func (o *PcloudPvminstancesVolumesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes post conflict response a status code equal to that given +func (o *PcloudPvminstancesVolumesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud pvminstances volumes post conflict response +func (o *PcloudPvminstancesVolumesPostConflict) Code() int { + return 409 +} + func (o *PcloudPvminstancesVolumesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudPvminstancesVolumesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudPvminstancesVolumesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -265,7 +481,8 @@ func NewPcloudPvminstancesVolumesPostInternalServerError() *PcloudPvminstancesVo return &PcloudPvminstancesVolumesPostInternalServerError{} } -/* PcloudPvminstancesVolumesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesVolumesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -273,9 +490,44 @@ type PcloudPvminstancesVolumesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes post internal server error response has a 2xx status code +func (o *PcloudPvminstancesVolumesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes post internal server error response has a 3xx status code +func (o *PcloudPvminstancesVolumesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes post internal server error response has a 4xx status code +func (o *PcloudPvminstancesVolumesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes post internal server error response has a 5xx status code +func (o *PcloudPvminstancesVolumesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances volumes post internal server error response a status code equal to that given +func (o *PcloudPvminstancesVolumesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances volumes post internal server error response +func (o *PcloudPvminstancesVolumesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesVolumesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesVolumesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesVolumesPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_parameters.go index 01ba400c0b8..1d32c93eff6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_parameters.go @@ -54,10 +54,12 @@ func NewPcloudPvminstancesVolumesPutParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudPvminstancesVolumesPutParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances volumes put operation. +/* +PcloudPvminstancesVolumesPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances volumes put operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesVolumesPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go index a9da1b15a16..bcdd731847c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go @@ -35,6 +35,24 @@ 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 { + return nil, err + } + return nil, result + case 404: + result := NewPcloudPvminstancesVolumesPutNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudPvminstancesVolumesPutInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -42,7 +60,7 @@ func (o *PcloudPvminstancesVolumesPutReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}] pcloud.pvminstances.volumes.put", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewPcloudPvminstancesVolumesPutOK() *PcloudPvminstancesVolumesPutOK { return &PcloudPvminstancesVolumesPutOK{} } -/* PcloudPvminstancesVolumesPutOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesVolumesPutOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type PcloudPvminstancesVolumesPutOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances volumes put o k response has a 2xx status code +func (o *PcloudPvminstancesVolumesPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances volumes put o k response has a 3xx status code +func (o *PcloudPvminstancesVolumesPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes put o k response has a 4xx status code +func (o *PcloudPvminstancesVolumesPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes put o k response has a 5xx status code +func (o *PcloudPvminstancesVolumesPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes put o k response a status code equal to that given +func (o *PcloudPvminstancesVolumesPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances volumes put o k response +func (o *PcloudPvminstancesVolumesPutOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesVolumesPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesVolumesPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesVolumesPutOK) GetPayload() models.Object { return o.Payload } @@ -81,7 +135,8 @@ func NewPcloudPvminstancesVolumesPutBadRequest() *PcloudPvminstancesVolumesPutBa return &PcloudPvminstancesVolumesPutBadRequest{} } -/* PcloudPvminstancesVolumesPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesVolumesPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -89,9 +144,44 @@ type PcloudPvminstancesVolumesPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes put bad request response has a 2xx status code +func (o *PcloudPvminstancesVolumesPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes put bad request response has a 3xx status code +func (o *PcloudPvminstancesVolumesPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes put bad request response has a 4xx status code +func (o *PcloudPvminstancesVolumesPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes put bad request response has a 5xx status code +func (o *PcloudPvminstancesVolumesPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes put bad request response a status code equal to that given +func (o *PcloudPvminstancesVolumesPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances volumes put bad request response +func (o *PcloudPvminstancesVolumesPutBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesVolumesPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesVolumesPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesVolumesPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -108,12 +198,217 @@ 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{} +} + +/* +PcloudPvminstancesVolumesPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesVolumesPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances volumes put forbidden response has a 2xx status code +func (o *PcloudPvminstancesVolumesPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes put forbidden response has a 3xx status code +func (o *PcloudPvminstancesVolumesPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes put forbidden response has a 4xx status code +func (o *PcloudPvminstancesVolumesPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes put forbidden response has a 5xx status code +func (o *PcloudPvminstancesVolumesPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes put forbidden response a status code equal to that given +func (o *PcloudPvminstancesVolumesPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances volumes put forbidden response +func (o *PcloudPvminstancesVolumesPutForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesVolumesPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesVolumesPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesVolumesPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVolumesPutForbidden) 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 +} + +// NewPcloudPvminstancesVolumesPutNotFound creates a PcloudPvminstancesVolumesPutNotFound with default headers values +func NewPcloudPvminstancesVolumesPutNotFound() *PcloudPvminstancesVolumesPutNotFound { + return &PcloudPvminstancesVolumesPutNotFound{} +} + +/* +PcloudPvminstancesVolumesPutNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudPvminstancesVolumesPutNotFound struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances volumes put not found response has a 2xx status code +func (o *PcloudPvminstancesVolumesPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes put not found response has a 3xx status code +func (o *PcloudPvminstancesVolumesPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes put not found response has a 4xx status code +func (o *PcloudPvminstancesVolumesPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes put not found response has a 5xx status code +func (o *PcloudPvminstancesVolumesPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes put not found response a status code equal to that given +func (o *PcloudPvminstancesVolumesPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances volumes put not found response +func (o *PcloudPvminstancesVolumesPutNotFound) Code() int { + return 404 +} + +func (o *PcloudPvminstancesVolumesPutNotFound) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesVolumesPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutNotFound %+v", 404, o.Payload) +} + +func (o *PcloudPvminstancesVolumesPutNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVolumesPutNotFound) 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 +} + // NewPcloudPvminstancesVolumesPutInternalServerError creates a PcloudPvminstancesVolumesPutInternalServerError with default headers values func NewPcloudPvminstancesVolumesPutInternalServerError() *PcloudPvminstancesVolumesPutInternalServerError { return &PcloudPvminstancesVolumesPutInternalServerError{} } -/* PcloudPvminstancesVolumesPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesVolumesPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -121,9 +416,44 @@ type PcloudPvminstancesVolumesPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes put internal server error response has a 2xx status code +func (o *PcloudPvminstancesVolumesPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes put internal server error response has a 3xx status code +func (o *PcloudPvminstancesVolumesPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes put internal server error response has a 4xx status code +func (o *PcloudPvminstancesVolumesPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes put internal server error response has a 5xx status code +func (o *PcloudPvminstancesVolumesPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances volumes put internal server error response a status code equal to that given +func (o *PcloudPvminstancesVolumesPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances volumes put internal server error response +func (o *PcloudPvminstancesVolumesPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesVolumesPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesVolumesPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}][%d] pcloudPvminstancesVolumesPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesVolumesPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_parameters.go index 77fab0cb54e..2480b9617c8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_parameters.go @@ -52,10 +52,12 @@ func NewPcloudPvminstancesVolumesSetbootPutParamsWithHTTPClient(client *http.Cli } } -/* PcloudPvminstancesVolumesSetbootPutParams contains all the parameters to send to the API endpoint - for the pcloud pvminstances volumes setboot put operation. +/* +PcloudPvminstancesVolumesSetbootPutParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud pvminstances volumes setboot put operation. + + Typically these are written to a http.Request. */ type PcloudPvminstancesVolumesSetbootPutParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go index 0842e8f1cb5..9f0d836b10e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go @@ -41,6 +41,12 @@ func (o *PcloudPvminstancesVolumesSetbootPutReader) ReadResponse(response runtim return nil, err } return nil, result + case 403: + result := NewPcloudPvminstancesVolumesSetbootPutForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudPvminstancesVolumesSetbootPutNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudPvminstancesVolumesSetbootPutReader) ReadResponse(response runtim } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot] pcloud.pvminstances.volumes.setboot.put", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudPvminstancesVolumesSetbootPutOK() *PcloudPvminstancesVolumesSetboo return &PcloudPvminstancesVolumesSetbootPutOK{} } -/* PcloudPvminstancesVolumesSetbootPutOK describes a response with status code 200, with default header values. +/* +PcloudPvminstancesVolumesSetbootPutOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudPvminstancesVolumesSetbootPutOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud pvminstances volumes setboot put o k response has a 2xx status code +func (o *PcloudPvminstancesVolumesSetbootPutOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud pvminstances volumes setboot put o k response has a 3xx status code +func (o *PcloudPvminstancesVolumesSetbootPutOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes setboot put o k response has a 4xx status code +func (o *PcloudPvminstancesVolumesSetbootPutOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes setboot put o k response has a 5xx status code +func (o *PcloudPvminstancesVolumesSetbootPutOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes setboot put o k response a status code equal to that given +func (o *PcloudPvminstancesVolumesSetbootPutOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud pvminstances volumes setboot put o k response +func (o *PcloudPvminstancesVolumesSetbootPutOK) Code() int { + return 200 +} + func (o *PcloudPvminstancesVolumesSetbootPutOK) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutOK %+v", 200, o.Payload) } + +func (o *PcloudPvminstancesVolumesSetbootPutOK) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutOK %+v", 200, o.Payload) +} + func (o *PcloudPvminstancesVolumesSetbootPutOK) GetPayload() models.Object { return o.Payload } @@ -93,7 +135,8 @@ func NewPcloudPvminstancesVolumesSetbootPutBadRequest() *PcloudPvminstancesVolum return &PcloudPvminstancesVolumesSetbootPutBadRequest{} } -/* PcloudPvminstancesVolumesSetbootPutBadRequest describes a response with status code 400, with default header values. +/* +PcloudPvminstancesVolumesSetbootPutBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -101,9 +144,44 @@ type PcloudPvminstancesVolumesSetbootPutBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes setboot put bad request response has a 2xx status code +func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes setboot put bad request response has a 3xx status code +func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes setboot put bad request response has a 4xx status code +func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes setboot put bad request response has a 5xx status code +func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes setboot put bad request response a status code equal to that given +func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud pvminstances volumes setboot put bad request response +func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) Code() int { + return 400 +} + func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutBadRequest %+v", 400, o.Payload) } + +func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutBadRequest %+v", 400, o.Payload) +} + func (o *PcloudPvminstancesVolumesSetbootPutBadRequest) GetPayload() *models.Error { return o.Payload } @@ -125,7 +203,8 @@ func NewPcloudPvminstancesVolumesSetbootPutUnauthorized() *PcloudPvminstancesVol return &PcloudPvminstancesVolumesSetbootPutUnauthorized{} } -/* PcloudPvminstancesVolumesSetbootPutUnauthorized describes a response with status code 401, with default header values. +/* +PcloudPvminstancesVolumesSetbootPutUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -133,9 +212,44 @@ type PcloudPvminstancesVolumesSetbootPutUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes setboot put unauthorized response has a 2xx status code +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes setboot put unauthorized response has a 3xx status code +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes setboot put unauthorized response has a 4xx status code +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes setboot put unauthorized response has a 5xx status code +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes setboot put unauthorized response a status code equal to that given +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud pvminstances volumes setboot put unauthorized response +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) Code() int { + return 401 +} + func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -152,12 +266,81 @@ func (o *PcloudPvminstancesVolumesSetbootPutUnauthorized) readResponse(response return nil } +// NewPcloudPvminstancesVolumesSetbootPutForbidden creates a PcloudPvminstancesVolumesSetbootPutForbidden with default headers values +func NewPcloudPvminstancesVolumesSetbootPutForbidden() *PcloudPvminstancesVolumesSetbootPutForbidden { + return &PcloudPvminstancesVolumesSetbootPutForbidden{} +} + +/* +PcloudPvminstancesVolumesSetbootPutForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudPvminstancesVolumesSetbootPutForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud pvminstances volumes setboot put forbidden response has a 2xx status code +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes setboot put forbidden response has a 3xx status code +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes setboot put forbidden response has a 4xx status code +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes setboot put forbidden response has a 5xx status code +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes setboot put forbidden response a status code equal to that given +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud pvminstances volumes setboot put forbidden response +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) Code() int { + return 403 +} + +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) Error() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutForbidden %+v", 403, o.Payload) +} + +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudPvminstancesVolumesSetbootPutForbidden) 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 +} + // NewPcloudPvminstancesVolumesSetbootPutNotFound creates a PcloudPvminstancesVolumesSetbootPutNotFound with default headers values func NewPcloudPvminstancesVolumesSetbootPutNotFound() *PcloudPvminstancesVolumesSetbootPutNotFound { return &PcloudPvminstancesVolumesSetbootPutNotFound{} } -/* PcloudPvminstancesVolumesSetbootPutNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesVolumesSetbootPutNotFound describes a response with status code 404, with default header values. Not Found */ @@ -165,9 +348,44 @@ type PcloudPvminstancesVolumesSetbootPutNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes setboot put not found response has a 2xx status code +func (o *PcloudPvminstancesVolumesSetbootPutNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes setboot put not found response has a 3xx status code +func (o *PcloudPvminstancesVolumesSetbootPutNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes setboot put not found response has a 4xx status code +func (o *PcloudPvminstancesVolumesSetbootPutNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud pvminstances volumes setboot put not found response has a 5xx status code +func (o *PcloudPvminstancesVolumesSetbootPutNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud pvminstances volumes setboot put not found response a status code equal to that given +func (o *PcloudPvminstancesVolumesSetbootPutNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud pvminstances volumes setboot put not found response +func (o *PcloudPvminstancesVolumesSetbootPutNotFound) Code() int { + return 404 +} + func (o *PcloudPvminstancesVolumesSetbootPutNotFound) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutNotFound %+v", 404, o.Payload) } + +func (o *PcloudPvminstancesVolumesSetbootPutNotFound) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutNotFound %+v", 404, o.Payload) +} + func (o *PcloudPvminstancesVolumesSetbootPutNotFound) GetPayload() *models.Error { return o.Payload } @@ -189,7 +407,8 @@ func NewPcloudPvminstancesVolumesSetbootPutInternalServerError() *PcloudPvminsta return &PcloudPvminstancesVolumesSetbootPutInternalServerError{} } -/* PcloudPvminstancesVolumesSetbootPutInternalServerError describes a response with status code 500, with default header values. +/* +PcloudPvminstancesVolumesSetbootPutInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -197,9 +416,44 @@ type PcloudPvminstancesVolumesSetbootPutInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud pvminstances volumes setboot put internal server error response has a 2xx status code +func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud pvminstances volumes setboot put internal server error response has a 3xx status code +func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud pvminstances volumes setboot put internal server error response has a 4xx status code +func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud pvminstances volumes setboot put internal server error response has a 5xx status code +func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud pvminstances volumes setboot put internal server error response a status code equal to that given +func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud pvminstances volumes setboot put internal server error response +func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) Code() int { + return 500 +} + func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) Error() string { return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) String() string { + return fmt.Sprintf("[PUT /pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes/{volume_id}/setboot][%d] pcloudPvminstancesVolumesSetbootPutInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudPvminstancesVolumesSetbootPutInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go index ba0f31924ce..5a1b49df177 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV2PvminstancesVolumesPostParamsWithHTTPClient(client *http.Client) } } -/* PcloudV2PvminstancesVolumesPostParams contains all the parameters to send to the API endpoint - for the pcloud v2 pvminstances volumes post operation. +/* +PcloudV2PvminstancesVolumesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 pvminstances volumes post operation. + + Typically these are written to a http.Request. */ type PcloudV2PvminstancesVolumesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go index 38479deb4e2..53e989427a2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudV2PvminstancesVolumesPostReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes] pcloud.v2.pvminstances.volumes.post", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudV2PvminstancesVolumesPostAccepted() *PcloudV2PvminstancesVolumesPo return &PcloudV2PvminstancesVolumesPostAccepted{} } -/* PcloudV2PvminstancesVolumesPostAccepted describes a response with status code 202, with default header values. +/* +PcloudV2PvminstancesVolumesPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +84,44 @@ type PcloudV2PvminstancesVolumesPostAccepted struct { Payload *models.VolumesAttachmentResponse } +// IsSuccess returns true when this pcloud v2 pvminstances volumes post accepted response has a 2xx status code +func (o *PcloudV2PvminstancesVolumesPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 pvminstances volumes post accepted response has a 3xx status code +func (o *PcloudV2PvminstancesVolumesPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances volumes post accepted response has a 4xx status code +func (o *PcloudV2PvminstancesVolumesPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 pvminstances volumes post accepted response has a 5xx status code +func (o *PcloudV2PvminstancesVolumesPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances volumes post accepted response a status code equal to that given +func (o *PcloudV2PvminstancesVolumesPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud v2 pvminstances volumes post accepted response +func (o *PcloudV2PvminstancesVolumesPostAccepted) Code() int { + return 202 +} + func (o *PcloudV2PvminstancesVolumesPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudV2PvminstancesVolumesPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudV2PvminstancesVolumesPostAccepted) GetPayload() *models.VolumesAttachmentResponse { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudV2PvminstancesVolumesPostBadRequest() *PcloudV2PvminstancesVolumes return &PcloudV2PvminstancesVolumesPostBadRequest{} } -/* PcloudV2PvminstancesVolumesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2PvminstancesVolumesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudV2PvminstancesVolumesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances volumes post bad request response has a 2xx status code +func (o *PcloudV2PvminstancesVolumesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances volumes post bad request response has a 3xx status code +func (o *PcloudV2PvminstancesVolumesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances volumes post bad request response has a 4xx status code +func (o *PcloudV2PvminstancesVolumesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances volumes post bad request response has a 5xx status code +func (o *PcloudV2PvminstancesVolumesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances volumes post bad request response a status code equal to that given +func (o *PcloudV2PvminstancesVolumesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 pvminstances volumes post bad request response +func (o *PcloudV2PvminstancesVolumesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudV2PvminstancesVolumesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2PvminstancesVolumesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2PvminstancesVolumesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudV2PvminstancesVolumesPostUnauthorized() *PcloudV2PvminstancesVolum return &PcloudV2PvminstancesVolumesPostUnauthorized{} } -/* PcloudV2PvminstancesVolumesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2PvminstancesVolumesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudV2PvminstancesVolumesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances volumes post unauthorized response has a 2xx status code +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances volumes post unauthorized response has a 3xx status code +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances volumes post unauthorized response has a 4xx status code +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances volumes post unauthorized response has a 5xx status code +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances volumes post unauthorized response a status code equal to that given +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 pvminstances volumes post unauthorized response +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2PvminstancesVolumesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2PvminstancesVolumesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2PvminstancesVolumesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +274,81 @@ 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{} } -/* PcloudV2PvminstancesVolumesPostNotFound describes a response with status code 404, with default header values. +/* +PcloudV2PvminstancesVolumesPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -173,9 +356,44 @@ type PcloudV2PvminstancesVolumesPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances volumes post not found response has a 2xx status code +func (o *PcloudV2PvminstancesVolumesPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances volumes post not found response has a 3xx status code +func (o *PcloudV2PvminstancesVolumesPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances volumes post not found response has a 4xx status code +func (o *PcloudV2PvminstancesVolumesPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances volumes post not found response has a 5xx status code +func (o *PcloudV2PvminstancesVolumesPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances volumes post not found response a status code equal to that given +func (o *PcloudV2PvminstancesVolumesPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 pvminstances volumes post not found response +func (o *PcloudV2PvminstancesVolumesPostNotFound) Code() int { + return 404 +} + func (o *PcloudV2PvminstancesVolumesPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2PvminstancesVolumesPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2PvminstancesVolumesPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -197,7 +415,8 @@ func NewPcloudV2PvminstancesVolumesPostConflict() *PcloudV2PvminstancesVolumesPo return &PcloudV2PvminstancesVolumesPostConflict{} } -/* PcloudV2PvminstancesVolumesPostConflict describes a response with status code 409, with default header values. +/* +PcloudV2PvminstancesVolumesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -205,9 +424,44 @@ type PcloudV2PvminstancesVolumesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances volumes post conflict response has a 2xx status code +func (o *PcloudV2PvminstancesVolumesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances volumes post conflict response has a 3xx status code +func (o *PcloudV2PvminstancesVolumesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances volumes post conflict response has a 4xx status code +func (o *PcloudV2PvminstancesVolumesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 pvminstances volumes post conflict response has a 5xx status code +func (o *PcloudV2PvminstancesVolumesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 pvminstances volumes post conflict response a status code equal to that given +func (o *PcloudV2PvminstancesVolumesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud v2 pvminstances volumes post conflict response +func (o *PcloudV2PvminstancesVolumesPostConflict) Code() int { + return 409 +} + func (o *PcloudV2PvminstancesVolumesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudV2PvminstancesVolumesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudV2PvminstancesVolumesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudV2PvminstancesVolumesPostInternalServerError() *PcloudV2Pvminstanc return &PcloudV2PvminstancesVolumesPostInternalServerError{} } -/* PcloudV2PvminstancesVolumesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2PvminstancesVolumesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudV2PvminstancesVolumesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 pvminstances volumes post internal server error response has a 2xx status code +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 pvminstances volumes post internal server error response has a 3xx status code +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 pvminstances volumes post internal server error response has a 4xx status code +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 pvminstances volumes post internal server error response has a 5xx status code +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 pvminstances volumes post internal server error response a status code equal to that given +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 pvminstances volumes post internal server error response +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2PvminstancesVolumesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2PvminstancesVolumesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/volumes][%d] pcloudV2PvminstancesVolumesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2PvminstancesVolumesPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_parameters.go index 99a119e98ae..3f81a918e79 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV2VolumesClonePostParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudV2VolumesClonePostParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumes clone post operation. +/* +PcloudV2VolumesClonePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumes clone post operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumesClonePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go index b505cb9b41b..3fe2f5eccda 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go @@ -60,7 +60,7 @@ func (o *PcloudV2VolumesClonePostReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone] pcloud.v2.volumes.clone.post", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudV2VolumesClonePostAccepted() *PcloudV2VolumesClonePostAccepted { return &PcloudV2VolumesClonePostAccepted{} } -/* PcloudV2VolumesClonePostAccepted describes a response with status code 202, with default header values. +/* +PcloudV2VolumesClonePostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +78,44 @@ type PcloudV2VolumesClonePostAccepted struct { Payload *models.CloneTaskReference } +// IsSuccess returns true when this pcloud v2 volumes clone post accepted response has a 2xx status code +func (o *PcloudV2VolumesClonePostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumes clone post accepted response has a 3xx status code +func (o *PcloudV2VolumesClonePostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clone post accepted response has a 4xx status code +func (o *PcloudV2VolumesClonePostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumes clone post accepted response has a 5xx status code +func (o *PcloudV2VolumesClonePostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clone post accepted response a status code equal to that given +func (o *PcloudV2VolumesClonePostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud v2 volumes clone post accepted response +func (o *PcloudV2VolumesClonePostAccepted) Code() int { + return 202 +} + func (o *PcloudV2VolumesClonePostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostAccepted %+v", 202, o.Payload) } + +func (o *PcloudV2VolumesClonePostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostAccepted %+v", 202, o.Payload) +} + func (o *PcloudV2VolumesClonePostAccepted) GetPayload() *models.CloneTaskReference { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudV2VolumesClonePostBadRequest() *PcloudV2VolumesClonePostBadRequest return &PcloudV2VolumesClonePostBadRequest{} } -/* PcloudV2VolumesClonePostBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2VolumesClonePostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudV2VolumesClonePostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clone post bad request response has a 2xx status code +func (o *PcloudV2VolumesClonePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clone post bad request response has a 3xx status code +func (o *PcloudV2VolumesClonePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clone post bad request response has a 4xx status code +func (o *PcloudV2VolumesClonePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clone post bad request response has a 5xx status code +func (o *PcloudV2VolumesClonePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clone post bad request response a status code equal to that given +func (o *PcloudV2VolumesClonePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumes clone post bad request response +func (o *PcloudV2VolumesClonePostBadRequest) Code() int { + return 400 +} + func (o *PcloudV2VolumesClonePostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2VolumesClonePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2VolumesClonePostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudV2VolumesClonePostUnauthorized() *PcloudV2VolumesClonePostUnauthor return &PcloudV2VolumesClonePostUnauthorized{} } -/* PcloudV2VolumesClonePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumesClonePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudV2VolumesClonePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clone post unauthorized response has a 2xx status code +func (o *PcloudV2VolumesClonePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clone post unauthorized response has a 3xx status code +func (o *PcloudV2VolumesClonePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clone post unauthorized response has a 4xx status code +func (o *PcloudV2VolumesClonePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clone post unauthorized response has a 5xx status code +func (o *PcloudV2VolumesClonePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clone post unauthorized response a status code equal to that given +func (o *PcloudV2VolumesClonePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumes clone post unauthorized response +func (o *PcloudV2VolumesClonePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumesClonePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumesClonePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumesClonePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudV2VolumesClonePostForbidden() *PcloudV2VolumesClonePostForbidden { return &PcloudV2VolumesClonePostForbidden{} } -/* PcloudV2VolumesClonePostForbidden describes a response with status code 403, with default header values. +/* +PcloudV2VolumesClonePostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudV2VolumesClonePostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clone post forbidden response has a 2xx status code +func (o *PcloudV2VolumesClonePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clone post forbidden response has a 3xx status code +func (o *PcloudV2VolumesClonePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clone post forbidden response has a 4xx status code +func (o *PcloudV2VolumesClonePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clone post forbidden response has a 5xx status code +func (o *PcloudV2VolumesClonePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clone post forbidden response a status code equal to that given +func (o *PcloudV2VolumesClonePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumes clone post forbidden response +func (o *PcloudV2VolumesClonePostForbidden) Code() int { + return 403 +} + func (o *PcloudV2VolumesClonePostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostForbidden %+v", 403, o.Payload) } + +func (o *PcloudV2VolumesClonePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostForbidden %+v", 403, o.Payload) +} + func (o *PcloudV2VolumesClonePostForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudV2VolumesClonePostNotFound() *PcloudV2VolumesClonePostNotFound { return &PcloudV2VolumesClonePostNotFound{} } -/* PcloudV2VolumesClonePostNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumesClonePostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudV2VolumesClonePostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clone post not found response has a 2xx status code +func (o *PcloudV2VolumesClonePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clone post not found response has a 3xx status code +func (o *PcloudV2VolumesClonePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clone post not found response has a 4xx status code +func (o *PcloudV2VolumesClonePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clone post not found response has a 5xx status code +func (o *PcloudV2VolumesClonePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clone 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 volumes clone 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 } @@ -229,7 +409,8 @@ func NewPcloudV2VolumesClonePostInternalServerError() *PcloudV2VolumesClonePostI return &PcloudV2VolumesClonePostInternalServerError{} } -/* PcloudV2VolumesClonePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumesClonePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudV2VolumesClonePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clone post internal server error response has a 2xx status code +func (o *PcloudV2VolumesClonePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clone post internal server error response has a 3xx status code +func (o *PcloudV2VolumesClonePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clone post internal server error response has a 4xx status code +func (o *PcloudV2VolumesClonePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumes clone post internal server error response has a 5xx status code +func (o *PcloudV2VolumesClonePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumes clone post internal server error response a status code equal to that given +func (o *PcloudV2VolumesClonePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumes clone post internal server error response +func (o *PcloudV2VolumesClonePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumesClonePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumesClonePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumesClonePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_parameters.go index b75497e1e31..0143dd9171d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudV2VolumesClonetasksGetParamsWithHTTPClient(client *http.Client) *P } } -/* PcloudV2VolumesClonetasksGetParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumes clonetasks get operation. +/* +PcloudV2VolumesClonetasksGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumes clonetasks get operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumesClonetasksGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go index a59491866c9..3f308b61808 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2VolumesClonetasksGetReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumesClonetasksGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2VolumesClonetasksGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -60,7 +66,7 @@ func (o *PcloudV2VolumesClonetasksGetReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}] pcloud.v2.volumes.clonetasks.get", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudV2VolumesClonetasksGetOK() *PcloudV2VolumesClonetasksGetOK { return &PcloudV2VolumesClonetasksGetOK{} } -/* PcloudV2VolumesClonetasksGetOK describes a response with status code 200, with default header values. +/* +PcloudV2VolumesClonetasksGetOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudV2VolumesClonetasksGetOK struct { Payload *models.CloneTaskStatus } +// IsSuccess returns true when this pcloud v2 volumes clonetasks get o k response has a 2xx status code +func (o *PcloudV2VolumesClonetasksGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumes clonetasks get o k response has a 3xx status code +func (o *PcloudV2VolumesClonetasksGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clonetasks get o k response has a 4xx status code +func (o *PcloudV2VolumesClonetasksGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumes clonetasks get o k response has a 5xx status code +func (o *PcloudV2VolumesClonetasksGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clonetasks get o k response a status code equal to that given +func (o *PcloudV2VolumesClonetasksGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v2 volumes clonetasks get o k response +func (o *PcloudV2VolumesClonetasksGetOK) Code() int { + return 200 +} + func (o *PcloudV2VolumesClonetasksGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetOK %+v", 200, o.Payload) } + +func (o *PcloudV2VolumesClonetasksGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetOK %+v", 200, o.Payload) +} + func (o *PcloudV2VolumesClonetasksGetOK) GetPayload() *models.CloneTaskStatus { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudV2VolumesClonetasksGetBadRequest() *PcloudV2VolumesClonetasksGetBa return &PcloudV2VolumesClonetasksGetBadRequest{} } -/* PcloudV2VolumesClonetasksGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2VolumesClonetasksGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudV2VolumesClonetasksGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clonetasks get bad request response has a 2xx status code +func (o *PcloudV2VolumesClonetasksGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clonetasks get bad request response has a 3xx status code +func (o *PcloudV2VolumesClonetasksGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clonetasks get bad request response has a 4xx status code +func (o *PcloudV2VolumesClonetasksGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clonetasks get bad request response has a 5xx status code +func (o *PcloudV2VolumesClonetasksGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clonetasks get bad request response a status code equal to that given +func (o *PcloudV2VolumesClonetasksGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumes clonetasks get bad request response +func (o *PcloudV2VolumesClonetasksGetBadRequest) Code() int { + return 400 +} + func (o *PcloudV2VolumesClonetasksGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2VolumesClonetasksGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2VolumesClonetasksGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudV2VolumesClonetasksGetUnauthorized() *PcloudV2VolumesClonetasksGet return &PcloudV2VolumesClonetasksGetUnauthorized{} } -/* PcloudV2VolumesClonetasksGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumesClonetasksGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudV2VolumesClonetasksGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clonetasks get unauthorized response has a 2xx status code +func (o *PcloudV2VolumesClonetasksGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clonetasks get unauthorized response has a 3xx status code +func (o *PcloudV2VolumesClonetasksGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clonetasks get unauthorized response has a 4xx status code +func (o *PcloudV2VolumesClonetasksGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clonetasks get unauthorized response has a 5xx status code +func (o *PcloudV2VolumesClonetasksGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clonetasks get unauthorized response a status code equal to that given +func (o *PcloudV2VolumesClonetasksGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumes clonetasks get unauthorized response +func (o *PcloudV2VolumesClonetasksGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumesClonetasksGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumesClonetasksGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumesClonetasksGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -160,12 +274,81 @@ func (o *PcloudV2VolumesClonetasksGetUnauthorized) readResponse(response runtime return nil } +// NewPcloudV2VolumesClonetasksGetForbidden creates a PcloudV2VolumesClonetasksGetForbidden with default headers values +func NewPcloudV2VolumesClonetasksGetForbidden() *PcloudV2VolumesClonetasksGetForbidden { + return &PcloudV2VolumesClonetasksGetForbidden{} +} + +/* +PcloudV2VolumesClonetasksGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumesClonetasksGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 volumes clonetasks get forbidden response has a 2xx status code +func (o *PcloudV2VolumesClonetasksGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clonetasks get forbidden response has a 3xx status code +func (o *PcloudV2VolumesClonetasksGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clonetasks get forbidden response has a 4xx status code +func (o *PcloudV2VolumesClonetasksGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clonetasks get forbidden response has a 5xx status code +func (o *PcloudV2VolumesClonetasksGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clonetasks get forbidden response a status code equal to that given +func (o *PcloudV2VolumesClonetasksGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumes clonetasks get forbidden response +func (o *PcloudV2VolumesClonetasksGetForbidden) Code() int { + return 403 +} + +func (o *PcloudV2VolumesClonetasksGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2VolumesClonetasksGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2VolumesClonetasksGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumesClonetasksGetForbidden) 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 +} + // NewPcloudV2VolumesClonetasksGetNotFound creates a PcloudV2VolumesClonetasksGetNotFound with default headers values func NewPcloudV2VolumesClonetasksGetNotFound() *PcloudV2VolumesClonetasksGetNotFound { return &PcloudV2VolumesClonetasksGetNotFound{} } -/* PcloudV2VolumesClonetasksGetNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumesClonetasksGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -173,9 +356,44 @@ type PcloudV2VolumesClonetasksGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clonetasks get not found response has a 2xx status code +func (o *PcloudV2VolumesClonetasksGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clonetasks get not found response has a 3xx status code +func (o *PcloudV2VolumesClonetasksGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clonetasks get not found response has a 4xx status code +func (o *PcloudV2VolumesClonetasksGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clonetasks get not found response has a 5xx status code +func (o *PcloudV2VolumesClonetasksGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clonetasks get not found response a status code equal to that given +func (o *PcloudV2VolumesClonetasksGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumes clonetasks get not found response +func (o *PcloudV2VolumesClonetasksGetNotFound) Code() int { + return 404 +} + func (o *PcloudV2VolumesClonetasksGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2VolumesClonetasksGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2VolumesClonetasksGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -197,7 +415,8 @@ func NewPcloudV2VolumesClonetasksGetConflict() *PcloudV2VolumesClonetasksGetConf return &PcloudV2VolumesClonetasksGetConflict{} } -/* PcloudV2VolumesClonetasksGetConflict describes a response with status code 409, with default header values. +/* +PcloudV2VolumesClonetasksGetConflict describes a response with status code 409, with default header values. Conflict */ @@ -205,9 +424,44 @@ type PcloudV2VolumesClonetasksGetConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clonetasks get conflict response has a 2xx status code +func (o *PcloudV2VolumesClonetasksGetConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clonetasks get conflict response has a 3xx status code +func (o *PcloudV2VolumesClonetasksGetConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clonetasks get conflict response has a 4xx status code +func (o *PcloudV2VolumesClonetasksGetConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes clonetasks get conflict response has a 5xx status code +func (o *PcloudV2VolumesClonetasksGetConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes clonetasks get conflict response a status code equal to that given +func (o *PcloudV2VolumesClonetasksGetConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud v2 volumes clonetasks get conflict response +func (o *PcloudV2VolumesClonetasksGetConflict) Code() int { + return 409 +} + func (o *PcloudV2VolumesClonetasksGetConflict) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetConflict %+v", 409, o.Payload) } + +func (o *PcloudV2VolumesClonetasksGetConflict) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetConflict %+v", 409, o.Payload) +} + func (o *PcloudV2VolumesClonetasksGetConflict) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudV2VolumesClonetasksGetInternalServerError() *PcloudV2VolumesClonet return &PcloudV2VolumesClonetasksGetInternalServerError{} } -/* PcloudV2VolumesClonetasksGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumesClonetasksGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudV2VolumesClonetasksGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes clonetasks get internal server error response has a 2xx status code +func (o *PcloudV2VolumesClonetasksGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes clonetasks get internal server error response has a 3xx status code +func (o *PcloudV2VolumesClonetasksGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes clonetasks get internal server error response has a 4xx status code +func (o *PcloudV2VolumesClonetasksGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumes clonetasks get internal server error response has a 5xx status code +func (o *PcloudV2VolumesClonetasksGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumes clonetasks get internal server error response a status code equal to that given +func (o *PcloudV2VolumesClonetasksGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumes clonetasks get internal server error response +func (o *PcloudV2VolumesClonetasksGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumesClonetasksGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumesClonetasksGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone-tasks/{clone_task_id}][%d] pcloudV2VolumesClonetasksGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumesClonetasksGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_parameters.go index 6ec3d1080df..ba3f0d54192 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV2VolumesPostParamsWithHTTPClient(client *http.Client) *PcloudV2Vo } } -/* PcloudV2VolumesPostParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumes post operation. +/* +PcloudV2VolumesPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumes post operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumesPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go index f9abc5c30be..55821f6bedc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -66,7 +72,7 @@ func (o *PcloudV2VolumesPostReader) ReadResponse(response runtime.ClientResponse } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes] pcloud.v2.volumes.post", response, response.Code()) } } @@ -75,7 +81,8 @@ func NewPcloudV2VolumesPostCreated() *PcloudV2VolumesPostCreated { return &PcloudV2VolumesPostCreated{} } -/* PcloudV2VolumesPostCreated describes a response with status code 201, with default header values. +/* +PcloudV2VolumesPostCreated describes a response with status code 201, with default header values. Created */ @@ -83,9 +90,44 @@ type PcloudV2VolumesPostCreated struct { Payload *models.Volumes } +// IsSuccess returns true when this pcloud v2 volumes post created response has a 2xx status code +func (o *PcloudV2VolumesPostCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumes post created response has a 3xx status code +func (o *PcloudV2VolumesPostCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes post created response has a 4xx status code +func (o *PcloudV2VolumesPostCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumes post created response has a 5xx status code +func (o *PcloudV2VolumesPostCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes post created response a status code equal to that given +func (o *PcloudV2VolumesPostCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the pcloud v2 volumes post created response +func (o *PcloudV2VolumesPostCreated) Code() int { + return 201 +} + func (o *PcloudV2VolumesPostCreated) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostCreated %+v", 201, o.Payload) } + +func (o *PcloudV2VolumesPostCreated) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostCreated %+v", 201, o.Payload) +} + func (o *PcloudV2VolumesPostCreated) GetPayload() *models.Volumes { return o.Payload } @@ -107,7 +149,8 @@ func NewPcloudV2VolumesPostBadRequest() *PcloudV2VolumesPostBadRequest { return &PcloudV2VolumesPostBadRequest{} } -/* PcloudV2VolumesPostBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2VolumesPostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -115,9 +158,44 @@ type PcloudV2VolumesPostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes post bad request response has a 2xx status code +func (o *PcloudV2VolumesPostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes post bad request response has a 3xx status code +func (o *PcloudV2VolumesPostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes post bad request response has a 4xx status code +func (o *PcloudV2VolumesPostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes post bad request response has a 5xx status code +func (o *PcloudV2VolumesPostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes post bad request response a status code equal to that given +func (o *PcloudV2VolumesPostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumes post bad request response +func (o *PcloudV2VolumesPostBadRequest) Code() int { + return 400 +} + func (o *PcloudV2VolumesPostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2VolumesPostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2VolumesPostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -139,7 +217,8 @@ func NewPcloudV2VolumesPostUnauthorized() *PcloudV2VolumesPostUnauthorized { return &PcloudV2VolumesPostUnauthorized{} } -/* PcloudV2VolumesPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumesPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -147,9 +226,44 @@ type PcloudV2VolumesPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes post unauthorized response has a 2xx status code +func (o *PcloudV2VolumesPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes post unauthorized response has a 3xx status code +func (o *PcloudV2VolumesPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes post unauthorized response has a 4xx status code +func (o *PcloudV2VolumesPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes post unauthorized response has a 5xx status code +func (o *PcloudV2VolumesPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes post unauthorized response a status code equal to that given +func (o *PcloudV2VolumesPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumes post unauthorized response +func (o *PcloudV2VolumesPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumesPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumesPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumesPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -171,7 +285,8 @@ func NewPcloudV2VolumesPostForbidden() *PcloudV2VolumesPostForbidden { return &PcloudV2VolumesPostForbidden{} } -/* PcloudV2VolumesPostForbidden describes a response with status code 403, with default header values. +/* +PcloudV2VolumesPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -179,9 +294,44 @@ type PcloudV2VolumesPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes post forbidden response has a 2xx status code +func (o *PcloudV2VolumesPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes post forbidden response has a 3xx status code +func (o *PcloudV2VolumesPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes post forbidden response has a 4xx status code +func (o *PcloudV2VolumesPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes post forbidden response has a 5xx status code +func (o *PcloudV2VolumesPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes post forbidden response a status code equal to that given +func (o *PcloudV2VolumesPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumes post forbidden response +func (o *PcloudV2VolumesPostForbidden) Code() int { + return 403 +} + func (o *PcloudV2VolumesPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudV2VolumesPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudV2VolumesPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -198,12 +348,81 @@ 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{} } -/* PcloudV2VolumesPostConflict describes a response with status code 409, with default header values. +/* +PcloudV2VolumesPostConflict describes a response with status code 409, with default header values. Conflict */ @@ -211,9 +430,44 @@ type PcloudV2VolumesPostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes post conflict response has a 2xx status code +func (o *PcloudV2VolumesPostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes post conflict response has a 3xx status code +func (o *PcloudV2VolumesPostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes post conflict response has a 4xx status code +func (o *PcloudV2VolumesPostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes post conflict response has a 5xx status code +func (o *PcloudV2VolumesPostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes post conflict response a status code equal to that given +func (o *PcloudV2VolumesPostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud v2 volumes post conflict response +func (o *PcloudV2VolumesPostConflict) Code() int { + return 409 +} + func (o *PcloudV2VolumesPostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostConflict %+v", 409, o.Payload) } + +func (o *PcloudV2VolumesPostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostConflict %+v", 409, o.Payload) +} + func (o *PcloudV2VolumesPostConflict) GetPayload() *models.Error { return o.Payload } @@ -235,7 +489,8 @@ func NewPcloudV2VolumesPostUnprocessableEntity() *PcloudV2VolumesPostUnprocessab return &PcloudV2VolumesPostUnprocessableEntity{} } -/* PcloudV2VolumesPostUnprocessableEntity describes a response with status code 422, with default header values. +/* +PcloudV2VolumesPostUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -243,9 +498,44 @@ type PcloudV2VolumesPostUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes post unprocessable entity response has a 2xx status code +func (o *PcloudV2VolumesPostUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes post unprocessable entity response has a 3xx status code +func (o *PcloudV2VolumesPostUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes post unprocessable entity response has a 4xx status code +func (o *PcloudV2VolumesPostUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumes post unprocessable entity response has a 5xx status code +func (o *PcloudV2VolumesPostUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumes post unprocessable entity response a status code equal to that given +func (o *PcloudV2VolumesPostUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the pcloud v2 volumes post unprocessable entity response +func (o *PcloudV2VolumesPostUnprocessableEntity) Code() int { + return 422 +} + func (o *PcloudV2VolumesPostUnprocessableEntity) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnprocessableEntity %+v", 422, o.Payload) } + +func (o *PcloudV2VolumesPostUnprocessableEntity) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostUnprocessableEntity %+v", 422, o.Payload) +} + func (o *PcloudV2VolumesPostUnprocessableEntity) GetPayload() *models.Error { return o.Payload } @@ -267,7 +557,8 @@ func NewPcloudV2VolumesPostInternalServerError() *PcloudV2VolumesPostInternalSer return &PcloudV2VolumesPostInternalServerError{} } -/* PcloudV2VolumesPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumesPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -275,9 +566,44 @@ type PcloudV2VolumesPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumes post internal server error response has a 2xx status code +func (o *PcloudV2VolumesPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumes post internal server error response has a 3xx status code +func (o *PcloudV2VolumesPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumes post internal server error response has a 4xx status code +func (o *PcloudV2VolumesPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumes post internal server error response has a 5xx status code +func (o *PcloudV2VolumesPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumes post internal server error response a status code equal to that given +func (o *PcloudV2VolumesPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumes post internal server error response +func (o *PcloudV2VolumesPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumesPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumesPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumesPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_parameters.go index a71bc1d7eec..40b73374913 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV2VolumescloneCancelPostParamsWithHTTPClient(client *http.Client) } } -/* PcloudV2VolumescloneCancelPostParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumesclone cancel post operation. +/* +PcloudV2VolumescloneCancelPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumesclone cancel post operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumescloneCancelPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go index 784ad3b1111..f02784f0094 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudV2VolumescloneCancelPostReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel] pcloud.v2.volumesclone.cancel.post", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudV2VolumescloneCancelPostAccepted() *PcloudV2VolumescloneCancelPost return &PcloudV2VolumescloneCancelPostAccepted{} } -/* PcloudV2VolumescloneCancelPostAccepted describes a response with status code 202, with default header values. +/* +PcloudV2VolumescloneCancelPostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -71,9 +78,44 @@ type PcloudV2VolumescloneCancelPostAccepted struct { Payload *models.VolumesClone } +// IsSuccess returns true when this pcloud v2 volumesclone cancel post accepted response has a 2xx status code +func (o *PcloudV2VolumescloneCancelPostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumesclone cancel post accepted response has a 3xx status code +func (o *PcloudV2VolumescloneCancelPostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone cancel post accepted response has a 4xx status code +func (o *PcloudV2VolumescloneCancelPostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone cancel post accepted response has a 5xx status code +func (o *PcloudV2VolumescloneCancelPostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone cancel post accepted response a status code equal to that given +func (o *PcloudV2VolumescloneCancelPostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud v2 volumesclone cancel post accepted response +func (o *PcloudV2VolumescloneCancelPostAccepted) Code() int { + return 202 +} + func (o *PcloudV2VolumescloneCancelPostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostAccepted %+v", 202, o.Payload) } + +func (o *PcloudV2VolumescloneCancelPostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostAccepted %+v", 202, o.Payload) +} + func (o *PcloudV2VolumescloneCancelPostAccepted) GetPayload() *models.VolumesClone { return o.Payload } @@ -90,12 +132,81 @@ 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{} } -/* PcloudV2VolumescloneCancelPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumescloneCancelPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -103,9 +214,44 @@ type PcloudV2VolumescloneCancelPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone cancel post unauthorized response has a 2xx status code +func (o *PcloudV2VolumescloneCancelPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone cancel post unauthorized response has a 3xx status code +func (o *PcloudV2VolumescloneCancelPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone cancel post unauthorized response has a 4xx status code +func (o *PcloudV2VolumescloneCancelPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone cancel post unauthorized response has a 5xx status code +func (o *PcloudV2VolumescloneCancelPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone cancel post unauthorized response a status code equal to that given +func (o *PcloudV2VolumescloneCancelPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumesclone cancel post unauthorized response +func (o *PcloudV2VolumescloneCancelPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumescloneCancelPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumescloneCancelPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumescloneCancelPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -127,7 +273,8 @@ func NewPcloudV2VolumescloneCancelPostForbidden() *PcloudV2VolumescloneCancelPos return &PcloudV2VolumescloneCancelPostForbidden{} } -/* PcloudV2VolumescloneCancelPostForbidden describes a response with status code 403, with default header values. +/* +PcloudV2VolumescloneCancelPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -135,9 +282,44 @@ type PcloudV2VolumescloneCancelPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone cancel post forbidden response has a 2xx status code +func (o *PcloudV2VolumescloneCancelPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone cancel post forbidden response has a 3xx status code +func (o *PcloudV2VolumescloneCancelPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone cancel post forbidden response has a 4xx status code +func (o *PcloudV2VolumescloneCancelPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone cancel post forbidden response has a 5xx status code +func (o *PcloudV2VolumescloneCancelPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone cancel post forbidden response a status code equal to that given +func (o *PcloudV2VolumescloneCancelPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumesclone cancel post forbidden response +func (o *PcloudV2VolumescloneCancelPostForbidden) Code() int { + return 403 +} + func (o *PcloudV2VolumescloneCancelPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudV2VolumescloneCancelPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudV2VolumescloneCancelPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -159,7 +341,8 @@ func NewPcloudV2VolumescloneCancelPostNotFound() *PcloudV2VolumescloneCancelPost return &PcloudV2VolumescloneCancelPostNotFound{} } -/* PcloudV2VolumescloneCancelPostNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumescloneCancelPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudV2VolumescloneCancelPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone cancel post not found response has a 2xx status code +func (o *PcloudV2VolumescloneCancelPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone cancel post not found response has a 3xx status code +func (o *PcloudV2VolumescloneCancelPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone cancel post not found response has a 4xx status code +func (o *PcloudV2VolumescloneCancelPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone cancel post not found response has a 5xx status code +func (o *PcloudV2VolumescloneCancelPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone cancel post not found response a status code equal to that given +func (o *PcloudV2VolumescloneCancelPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumesclone cancel post not found response +func (o *PcloudV2VolumescloneCancelPostNotFound) Code() int { + return 404 +} + func (o *PcloudV2VolumescloneCancelPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2VolumescloneCancelPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2VolumescloneCancelPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudV2VolumescloneCancelPostInternalServerError() *PcloudV2Volumesclon return &PcloudV2VolumescloneCancelPostInternalServerError{} } -/* PcloudV2VolumescloneCancelPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumescloneCancelPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudV2VolumescloneCancelPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone cancel post internal server error response has a 2xx status code +func (o *PcloudV2VolumescloneCancelPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone cancel post internal server error response has a 3xx status code +func (o *PcloudV2VolumescloneCancelPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone cancel post internal server error response has a 4xx status code +func (o *PcloudV2VolumescloneCancelPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone cancel post internal server error response has a 5xx status code +func (o *PcloudV2VolumescloneCancelPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumesclone cancel post internal server error response a status code equal to that given +func (o *PcloudV2VolumescloneCancelPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumesclone cancel post internal server error response +func (o *PcloudV2VolumescloneCancelPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumescloneCancelPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumescloneCancelPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumescloneCancelPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_parameters.go index bee811980f6..bf3ea7fee56 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_parameters.go @@ -52,10 +52,12 @@ func NewPcloudV2VolumescloneDeleteParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudV2VolumescloneDeleteParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumesclone delete operation. +/* +PcloudV2VolumescloneDeleteParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumesclone delete operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumescloneDeleteParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go index 663e0c9fb69..70e6f6ce6fb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go @@ -60,7 +60,7 @@ func (o *PcloudV2VolumescloneDeleteReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}] pcloud.v2.volumesclone.delete", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudV2VolumescloneDeleteOK() *PcloudV2VolumescloneDeleteOK { return &PcloudV2VolumescloneDeleteOK{} } -/* PcloudV2VolumescloneDeleteOK describes a response with status code 200, with default header values. +/* +PcloudV2VolumescloneDeleteOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +78,44 @@ type PcloudV2VolumescloneDeleteOK struct { Payload models.Object } +// IsSuccess returns true when this pcloud v2 volumesclone delete o k response has a 2xx status code +func (o *PcloudV2VolumescloneDeleteOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumesclone delete o k response has a 3xx status code +func (o *PcloudV2VolumescloneDeleteOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone delete o k response has a 4xx status code +func (o *PcloudV2VolumescloneDeleteOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone delete o k response has a 5xx status code +func (o *PcloudV2VolumescloneDeleteOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone delete o k response a status code equal to that given +func (o *PcloudV2VolumescloneDeleteOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v2 volumesclone delete o k response +func (o *PcloudV2VolumescloneDeleteOK) Code() int { + return 200 +} + func (o *PcloudV2VolumescloneDeleteOK) Error() string { return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteOK %+v", 200, o.Payload) } + +func (o *PcloudV2VolumescloneDeleteOK) String() string { + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteOK %+v", 200, o.Payload) +} + func (o *PcloudV2VolumescloneDeleteOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +135,8 @@ func NewPcloudV2VolumescloneDeleteBadRequest() *PcloudV2VolumescloneDeleteBadReq return &PcloudV2VolumescloneDeleteBadRequest{} } -/* PcloudV2VolumescloneDeleteBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2VolumescloneDeleteBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -107,9 +144,44 @@ type PcloudV2VolumescloneDeleteBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone delete bad request response has a 2xx status code +func (o *PcloudV2VolumescloneDeleteBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone delete bad request response has a 3xx status code +func (o *PcloudV2VolumescloneDeleteBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone delete bad request response has a 4xx status code +func (o *PcloudV2VolumescloneDeleteBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone delete bad request response has a 5xx status code +func (o *PcloudV2VolumescloneDeleteBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone delete bad request response a status code equal to that given +func (o *PcloudV2VolumescloneDeleteBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumesclone delete bad request response +func (o *PcloudV2VolumescloneDeleteBadRequest) Code() int { + return 400 +} + func (o *PcloudV2VolumescloneDeleteBadRequest) Error() string { return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2VolumescloneDeleteBadRequest) String() string { + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2VolumescloneDeleteBadRequest) GetPayload() *models.Error { return o.Payload } @@ -131,7 +203,8 @@ func NewPcloudV2VolumescloneDeleteUnauthorized() *PcloudV2VolumescloneDeleteUnau return &PcloudV2VolumescloneDeleteUnauthorized{} } -/* PcloudV2VolumescloneDeleteUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumescloneDeleteUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -139,9 +212,44 @@ type PcloudV2VolumescloneDeleteUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone delete unauthorized response has a 2xx status code +func (o *PcloudV2VolumescloneDeleteUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone delete unauthorized response has a 3xx status code +func (o *PcloudV2VolumescloneDeleteUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone delete unauthorized response has a 4xx status code +func (o *PcloudV2VolumescloneDeleteUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone delete unauthorized response has a 5xx status code +func (o *PcloudV2VolumescloneDeleteUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone delete unauthorized response a status code equal to that given +func (o *PcloudV2VolumescloneDeleteUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumesclone delete unauthorized response +func (o *PcloudV2VolumescloneDeleteUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumescloneDeleteUnauthorized) Error() string { return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumescloneDeleteUnauthorized) String() string { + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumescloneDeleteUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -163,7 +271,8 @@ func NewPcloudV2VolumescloneDeleteForbidden() *PcloudV2VolumescloneDeleteForbidd return &PcloudV2VolumescloneDeleteForbidden{} } -/* PcloudV2VolumescloneDeleteForbidden describes a response with status code 403, with default header values. +/* +PcloudV2VolumescloneDeleteForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -171,9 +280,44 @@ type PcloudV2VolumescloneDeleteForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone delete forbidden response has a 2xx status code +func (o *PcloudV2VolumescloneDeleteForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone delete forbidden response has a 3xx status code +func (o *PcloudV2VolumescloneDeleteForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone delete forbidden response has a 4xx status code +func (o *PcloudV2VolumescloneDeleteForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone delete forbidden response has a 5xx status code +func (o *PcloudV2VolumescloneDeleteForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone delete forbidden response a status code equal to that given +func (o *PcloudV2VolumescloneDeleteForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumesclone delete forbidden response +func (o *PcloudV2VolumescloneDeleteForbidden) Code() int { + return 403 +} + func (o *PcloudV2VolumescloneDeleteForbidden) Error() string { return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden %+v", 403, o.Payload) } + +func (o *PcloudV2VolumescloneDeleteForbidden) String() string { + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden %+v", 403, o.Payload) +} + func (o *PcloudV2VolumescloneDeleteForbidden) GetPayload() *models.Error { return o.Payload } @@ -195,7 +339,8 @@ func NewPcloudV2VolumescloneDeleteNotFound() *PcloudV2VolumescloneDeleteNotFound return &PcloudV2VolumescloneDeleteNotFound{} } -/* PcloudV2VolumescloneDeleteNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumescloneDeleteNotFound describes a response with status code 404, with default header values. Not Found */ @@ -203,9 +348,44 @@ type PcloudV2VolumescloneDeleteNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone delete not found response has a 2xx status code +func (o *PcloudV2VolumescloneDeleteNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone delete not found response has a 3xx status code +func (o *PcloudV2VolumescloneDeleteNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone delete not found response has a 4xx status code +func (o *PcloudV2VolumescloneDeleteNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone delete not found response has a 5xx status code +func (o *PcloudV2VolumescloneDeleteNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone delete not found response a status code equal to that given +func (o *PcloudV2VolumescloneDeleteNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumesclone delete not found response +func (o *PcloudV2VolumescloneDeleteNotFound) Code() int { + return 404 +} + func (o *PcloudV2VolumescloneDeleteNotFound) Error() string { return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2VolumescloneDeleteNotFound) String() string { + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2VolumescloneDeleteNotFound) GetPayload() *models.Error { return o.Payload } @@ -227,7 +407,8 @@ func NewPcloudV2VolumescloneDeleteInternalServerError() *PcloudV2VolumescloneDel return &PcloudV2VolumescloneDeleteInternalServerError{} } -/* PcloudV2VolumescloneDeleteInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumescloneDeleteInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -235,9 +416,44 @@ type PcloudV2VolumescloneDeleteInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone delete internal server error response has a 2xx status code +func (o *PcloudV2VolumescloneDeleteInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone delete internal server error response has a 3xx status code +func (o *PcloudV2VolumescloneDeleteInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone delete internal server error response has a 4xx status code +func (o *PcloudV2VolumescloneDeleteInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone delete internal server error response has a 5xx status code +func (o *PcloudV2VolumescloneDeleteInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumesclone delete internal server error response a status code equal to that given +func (o *PcloudV2VolumescloneDeleteInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumesclone delete internal server error response +func (o *PcloudV2VolumescloneDeleteInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumescloneDeleteInternalServerError) Error() string { return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumescloneDeleteInternalServerError) String() string { + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumescloneDeleteInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_parameters.go index f3d74219a2f..d19d920579e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV2VolumescloneExecutePostParamsWithHTTPClient(client *http.Client) } } -/* PcloudV2VolumescloneExecutePostParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumesclone execute post operation. +/* +PcloudV2VolumescloneExecutePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumesclone execute post operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumescloneExecutePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go index 064daf76b26..388a45b4dd9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go @@ -60,7 +60,7 @@ func (o *PcloudV2VolumescloneExecutePostReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute] pcloud.v2.volumesclone.execute.post", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudV2VolumescloneExecutePostAccepted() *PcloudV2VolumescloneExecutePo return &PcloudV2VolumescloneExecutePostAccepted{} } -/* PcloudV2VolumescloneExecutePostAccepted describes a response with status code 202, with default header values. +/* +PcloudV2VolumescloneExecutePostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +78,44 @@ type PcloudV2VolumescloneExecutePostAccepted struct { Payload *models.VolumesClone } +// IsSuccess returns true when this pcloud v2 volumesclone execute post accepted response has a 2xx status code +func (o *PcloudV2VolumescloneExecutePostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumesclone execute post accepted response has a 3xx status code +func (o *PcloudV2VolumescloneExecutePostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone execute post accepted response has a 4xx status code +func (o *PcloudV2VolumescloneExecutePostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone execute post accepted response has a 5xx status code +func (o *PcloudV2VolumescloneExecutePostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone execute post accepted response a status code equal to that given +func (o *PcloudV2VolumescloneExecutePostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud v2 volumesclone execute post accepted response +func (o *PcloudV2VolumescloneExecutePostAccepted) Code() int { + return 202 +} + func (o *PcloudV2VolumescloneExecutePostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostAccepted %+v", 202, o.Payload) } + +func (o *PcloudV2VolumescloneExecutePostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostAccepted %+v", 202, o.Payload) +} + func (o *PcloudV2VolumescloneExecutePostAccepted) GetPayload() *models.VolumesClone { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudV2VolumescloneExecutePostBadRequest() *PcloudV2VolumescloneExecute return &PcloudV2VolumescloneExecutePostBadRequest{} } -/* PcloudV2VolumescloneExecutePostBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2VolumescloneExecutePostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudV2VolumescloneExecutePostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone execute post bad request response has a 2xx status code +func (o *PcloudV2VolumescloneExecutePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone execute post bad request response has a 3xx status code +func (o *PcloudV2VolumescloneExecutePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone execute post bad request response has a 4xx status code +func (o *PcloudV2VolumescloneExecutePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone execute post bad request response has a 5xx status code +func (o *PcloudV2VolumescloneExecutePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone execute post bad request response a status code equal to that given +func (o *PcloudV2VolumescloneExecutePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumesclone execute post bad request response +func (o *PcloudV2VolumescloneExecutePostBadRequest) Code() int { + return 400 +} + func (o *PcloudV2VolumescloneExecutePostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2VolumescloneExecutePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2VolumescloneExecutePostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudV2VolumescloneExecutePostUnauthorized() *PcloudV2VolumescloneExecu return &PcloudV2VolumescloneExecutePostUnauthorized{} } -/* PcloudV2VolumescloneExecutePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumescloneExecutePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudV2VolumescloneExecutePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone execute post unauthorized response has a 2xx status code +func (o *PcloudV2VolumescloneExecutePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone execute post unauthorized response has a 3xx status code +func (o *PcloudV2VolumescloneExecutePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone execute post unauthorized response has a 4xx status code +func (o *PcloudV2VolumescloneExecutePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone execute post unauthorized response has a 5xx status code +func (o *PcloudV2VolumescloneExecutePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone execute post unauthorized response a status code equal to that given +func (o *PcloudV2VolumescloneExecutePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumesclone execute post unauthorized response +func (o *PcloudV2VolumescloneExecutePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumescloneExecutePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumescloneExecutePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumescloneExecutePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudV2VolumescloneExecutePostForbidden() *PcloudV2VolumescloneExecuteP return &PcloudV2VolumescloneExecutePostForbidden{} } -/* PcloudV2VolumescloneExecutePostForbidden describes a response with status code 403, with default header values. +/* +PcloudV2VolumescloneExecutePostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudV2VolumescloneExecutePostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone execute post forbidden response has a 2xx status code +func (o *PcloudV2VolumescloneExecutePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone execute post forbidden response has a 3xx status code +func (o *PcloudV2VolumescloneExecutePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone execute post forbidden response has a 4xx status code +func (o *PcloudV2VolumescloneExecutePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone execute post forbidden response has a 5xx status code +func (o *PcloudV2VolumescloneExecutePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone execute post forbidden response a status code equal to that given +func (o *PcloudV2VolumescloneExecutePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumesclone execute post forbidden response +func (o *PcloudV2VolumescloneExecutePostForbidden) Code() int { + return 403 +} + func (o *PcloudV2VolumescloneExecutePostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostForbidden %+v", 403, o.Payload) } + +func (o *PcloudV2VolumescloneExecutePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostForbidden %+v", 403, o.Payload) +} + func (o *PcloudV2VolumescloneExecutePostForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudV2VolumescloneExecutePostNotFound() *PcloudV2VolumescloneExecutePo return &PcloudV2VolumescloneExecutePostNotFound{} } -/* PcloudV2VolumescloneExecutePostNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumescloneExecutePostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ type PcloudV2VolumescloneExecutePostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone execute post not found response has a 2xx status code +func (o *PcloudV2VolumescloneExecutePostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone execute post not found response has a 3xx status code +func (o *PcloudV2VolumescloneExecutePostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone execute post not found response has a 4xx status code +func (o *PcloudV2VolumescloneExecutePostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone execute post not found response has a 5xx status code +func (o *PcloudV2VolumescloneExecutePostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone execute post not found response a status code equal to that given +func (o *PcloudV2VolumescloneExecutePostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumesclone execute post not found response +func (o *PcloudV2VolumescloneExecutePostNotFound) Code() int { + return 404 +} + func (o *PcloudV2VolumescloneExecutePostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2VolumescloneExecutePostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2VolumescloneExecutePostNotFound) GetPayload() *models.Error { return o.Payload } @@ -229,7 +409,8 @@ func NewPcloudV2VolumescloneExecutePostInternalServerError() *PcloudV2Volumesclo return &PcloudV2VolumescloneExecutePostInternalServerError{} } -/* PcloudV2VolumescloneExecutePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumescloneExecutePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudV2VolumescloneExecutePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone execute post internal server error response has a 2xx status code +func (o *PcloudV2VolumescloneExecutePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone execute post internal server error response has a 3xx status code +func (o *PcloudV2VolumescloneExecutePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone execute post internal server error response has a 4xx status code +func (o *PcloudV2VolumescloneExecutePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone execute post internal server error response has a 5xx status code +func (o *PcloudV2VolumescloneExecutePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumesclone execute post internal server error response a status code equal to that given +func (o *PcloudV2VolumescloneExecutePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumesclone execute post internal server error response +func (o *PcloudV2VolumescloneExecutePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumescloneExecutePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumescloneExecutePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumescloneExecutePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_parameters.go index 0a9c293e307..aec6578e588 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_parameters.go @@ -52,10 +52,12 @@ func NewPcloudV2VolumescloneGetParamsWithHTTPClient(client *http.Client) *Pcloud } } -/* PcloudV2VolumescloneGetParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumesclone get operation. +/* +PcloudV2VolumescloneGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumesclone get operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumescloneGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go index f1dfe63fb35..fc4d2559901 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2VolumescloneGetReader) ReadResponse(response runtime.ClientResp return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumescloneGetForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2VolumescloneGetNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudV2VolumescloneGetReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}] pcloud.v2.volumesclone.get", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudV2VolumescloneGetOK() *PcloudV2VolumescloneGetOK { return &PcloudV2VolumescloneGetOK{} } -/* PcloudV2VolumescloneGetOK describes a response with status code 200, with default header values. +/* +PcloudV2VolumescloneGetOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudV2VolumescloneGetOK struct { Payload *models.VolumesCloneDetail } +// IsSuccess returns true when this pcloud v2 volumesclone get o k response has a 2xx status code +func (o *PcloudV2VolumescloneGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumesclone get o k response has a 3xx status code +func (o *PcloudV2VolumescloneGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone get o k response has a 4xx status code +func (o *PcloudV2VolumescloneGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone get o k response has a 5xx status code +func (o *PcloudV2VolumescloneGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone get o k response a status code equal to that given +func (o *PcloudV2VolumescloneGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v2 volumesclone get o k response +func (o *PcloudV2VolumescloneGetOK) Code() int { + return 200 +} + func (o *PcloudV2VolumescloneGetOK) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetOK %+v", 200, o.Payload) } + +func (o *PcloudV2VolumescloneGetOK) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetOK %+v", 200, o.Payload) +} + func (o *PcloudV2VolumescloneGetOK) GetPayload() *models.VolumesCloneDetail { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudV2VolumescloneGetBadRequest() *PcloudV2VolumescloneGetBadRequest { return &PcloudV2VolumescloneGetBadRequest{} } -/* PcloudV2VolumescloneGetBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2VolumescloneGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudV2VolumescloneGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone get bad request response has a 2xx status code +func (o *PcloudV2VolumescloneGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone get bad request response has a 3xx status code +func (o *PcloudV2VolumescloneGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone get bad request response has a 4xx status code +func (o *PcloudV2VolumescloneGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone get bad request response has a 5xx status code +func (o *PcloudV2VolumescloneGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone get bad request response a status code equal to that given +func (o *PcloudV2VolumescloneGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumesclone get bad request response +func (o *PcloudV2VolumescloneGetBadRequest) Code() int { + return 400 +} + func (o *PcloudV2VolumescloneGetBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2VolumescloneGetBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2VolumescloneGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudV2VolumescloneGetUnauthorized() *PcloudV2VolumescloneGetUnauthoriz return &PcloudV2VolumescloneGetUnauthorized{} } -/* PcloudV2VolumescloneGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumescloneGetUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudV2VolumescloneGetUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone get unauthorized response has a 2xx status code +func (o *PcloudV2VolumescloneGetUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone get unauthorized response has a 3xx status code +func (o *PcloudV2VolumescloneGetUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone get unauthorized response has a 4xx status code +func (o *PcloudV2VolumescloneGetUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone get unauthorized response has a 5xx status code +func (o *PcloudV2VolumescloneGetUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone get unauthorized response a status code equal to that given +func (o *PcloudV2VolumescloneGetUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumesclone get unauthorized response +func (o *PcloudV2VolumescloneGetUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumescloneGetUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumescloneGetUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumescloneGetUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudV2VolumescloneGetUnauthorized) readResponse(response runtime.Clie return nil } +// NewPcloudV2VolumescloneGetForbidden creates a PcloudV2VolumescloneGetForbidden with default headers values +func NewPcloudV2VolumescloneGetForbidden() *PcloudV2VolumescloneGetForbidden { + return &PcloudV2VolumescloneGetForbidden{} +} + +/* +PcloudV2VolumescloneGetForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumescloneGetForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 volumesclone get forbidden response has a 2xx status code +func (o *PcloudV2VolumescloneGetForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone get forbidden response has a 3xx status code +func (o *PcloudV2VolumescloneGetForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone get forbidden response has a 4xx status code +func (o *PcloudV2VolumescloneGetForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone get forbidden response has a 5xx status code +func (o *PcloudV2VolumescloneGetForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone get forbidden response a status code equal to that given +func (o *PcloudV2VolumescloneGetForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumesclone get forbidden response +func (o *PcloudV2VolumescloneGetForbidden) Code() int { + return 403 +} + +func (o *PcloudV2VolumescloneGetForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2VolumescloneGetForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2VolumescloneGetForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneGetForbidden) 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 +} + // NewPcloudV2VolumescloneGetNotFound creates a PcloudV2VolumescloneGetNotFound with default headers values func NewPcloudV2VolumescloneGetNotFound() *PcloudV2VolumescloneGetNotFound { return &PcloudV2VolumescloneGetNotFound{} } -/* PcloudV2VolumescloneGetNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumescloneGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudV2VolumescloneGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone get not found response has a 2xx status code +func (o *PcloudV2VolumescloneGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone get not found response has a 3xx status code +func (o *PcloudV2VolumescloneGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone get not found response has a 4xx status code +func (o *PcloudV2VolumescloneGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone get not found response has a 5xx status code +func (o *PcloudV2VolumescloneGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone get not found response a status code equal to that given +func (o *PcloudV2VolumescloneGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumesclone get not found response +func (o *PcloudV2VolumescloneGetNotFound) Code() int { + return 404 +} + func (o *PcloudV2VolumescloneGetNotFound) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2VolumescloneGetNotFound) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2VolumescloneGetNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudV2VolumescloneGetInternalServerError() *PcloudV2VolumescloneGetInt return &PcloudV2VolumescloneGetInternalServerError{} } -/* PcloudV2VolumescloneGetInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumescloneGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudV2VolumescloneGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone get internal server error response has a 2xx status code +func (o *PcloudV2VolumescloneGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone get internal server error response has a 3xx status code +func (o *PcloudV2VolumescloneGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone get internal server error response has a 4xx status code +func (o *PcloudV2VolumescloneGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone get internal server error response has a 5xx status code +func (o *PcloudV2VolumescloneGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumesclone get internal server error response a status code equal to that given +func (o *PcloudV2VolumescloneGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumesclone get internal server error response +func (o *PcloudV2VolumescloneGetInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumescloneGetInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumescloneGetInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneGetInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumescloneGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_parameters.go index f18506d0621..5bd97558cd6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_parameters.go @@ -52,10 +52,12 @@ func NewPcloudV2VolumescloneGetallParamsWithHTTPClient(client *http.Client) *Pcl } } -/* PcloudV2VolumescloneGetallParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumesclone getall operation. +/* +PcloudV2VolumescloneGetallParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumesclone getall operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumescloneGetallParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go index ed1b66608fe..95d3652e3d1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2VolumescloneGetallReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumescloneGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2VolumescloneGetallNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -54,7 +60,7 @@ func (o *PcloudV2VolumescloneGetallReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone] pcloud.v2.volumesclone.getall", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudV2VolumescloneGetallOK() *PcloudV2VolumescloneGetallOK { return &PcloudV2VolumescloneGetallOK{} } -/* PcloudV2VolumescloneGetallOK describes a response with status code 200, with default header values. +/* +PcloudV2VolumescloneGetallOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudV2VolumescloneGetallOK struct { Payload *models.VolumesClones } +// IsSuccess returns true when this pcloud v2 volumesclone getall o k response has a 2xx status code +func (o *PcloudV2VolumescloneGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumesclone getall o k response has a 3xx status code +func (o *PcloudV2VolumescloneGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone getall o k response has a 4xx status code +func (o *PcloudV2VolumescloneGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone getall o k response has a 5xx status code +func (o *PcloudV2VolumescloneGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone getall o k response a status code equal to that given +func (o *PcloudV2VolumescloneGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v2 volumesclone getall o k response +func (o *PcloudV2VolumescloneGetallOK) Code() int { + return 200 +} + func (o *PcloudV2VolumescloneGetallOK) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallOK %+v", 200, o.Payload) } + +func (o *PcloudV2VolumescloneGetallOK) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallOK %+v", 200, o.Payload) +} + func (o *PcloudV2VolumescloneGetallOK) GetPayload() *models.VolumesClones { return o.Payload } @@ -95,7 +137,8 @@ func NewPcloudV2VolumescloneGetallBadRequest() *PcloudV2VolumescloneGetallBadReq return &PcloudV2VolumescloneGetallBadRequest{} } -/* PcloudV2VolumescloneGetallBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2VolumescloneGetallBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -103,9 +146,44 @@ type PcloudV2VolumescloneGetallBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone getall bad request response has a 2xx status code +func (o *PcloudV2VolumescloneGetallBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone getall bad request response has a 3xx status code +func (o *PcloudV2VolumescloneGetallBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone getall bad request response has a 4xx status code +func (o *PcloudV2VolumescloneGetallBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone getall bad request response has a 5xx status code +func (o *PcloudV2VolumescloneGetallBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone getall bad request response a status code equal to that given +func (o *PcloudV2VolumescloneGetallBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumesclone getall bad request response +func (o *PcloudV2VolumescloneGetallBadRequest) Code() int { + return 400 +} + func (o *PcloudV2VolumescloneGetallBadRequest) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2VolumescloneGetallBadRequest) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2VolumescloneGetallBadRequest) GetPayload() *models.Error { return o.Payload } @@ -127,7 +205,8 @@ func NewPcloudV2VolumescloneGetallUnauthorized() *PcloudV2VolumescloneGetallUnau return &PcloudV2VolumescloneGetallUnauthorized{} } -/* PcloudV2VolumescloneGetallUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumescloneGetallUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -135,9 +214,44 @@ type PcloudV2VolumescloneGetallUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone getall unauthorized response has a 2xx status code +func (o *PcloudV2VolumescloneGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone getall unauthorized response has a 3xx status code +func (o *PcloudV2VolumescloneGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone getall unauthorized response has a 4xx status code +func (o *PcloudV2VolumescloneGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone getall unauthorized response has a 5xx status code +func (o *PcloudV2VolumescloneGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone getall unauthorized response a status code equal to that given +func (o *PcloudV2VolumescloneGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumesclone getall unauthorized response +func (o *PcloudV2VolumescloneGetallUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumescloneGetallUnauthorized) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumescloneGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumescloneGetallUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -154,12 +268,81 @@ func (o *PcloudV2VolumescloneGetallUnauthorized) readResponse(response runtime.C return nil } +// NewPcloudV2VolumescloneGetallForbidden creates a PcloudV2VolumescloneGetallForbidden with default headers values +func NewPcloudV2VolumescloneGetallForbidden() *PcloudV2VolumescloneGetallForbidden { + return &PcloudV2VolumescloneGetallForbidden{} +} + +/* +PcloudV2VolumescloneGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumescloneGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this pcloud v2 volumesclone getall forbidden response has a 2xx status code +func (o *PcloudV2VolumescloneGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone getall forbidden response has a 3xx status code +func (o *PcloudV2VolumescloneGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone getall forbidden response has a 4xx status code +func (o *PcloudV2VolumescloneGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone getall forbidden response has a 5xx status code +func (o *PcloudV2VolumescloneGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone getall forbidden response a status code equal to that given +func (o *PcloudV2VolumescloneGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumesclone getall forbidden response +func (o *PcloudV2VolumescloneGetallForbidden) Code() int { + return 403 +} + +func (o *PcloudV2VolumescloneGetallForbidden) Error() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2VolumescloneGetallForbidden) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallForbidden %+v", 403, o.Payload) +} + +func (o *PcloudV2VolumescloneGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneGetallForbidden) 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 +} + // 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. +/* +PcloudV2VolumescloneGetallNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ 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 } @@ -191,7 +409,8 @@ func NewPcloudV2VolumescloneGetallInternalServerError() *PcloudV2VolumescloneGet return &PcloudV2VolumescloneGetallInternalServerError{} } -/* PcloudV2VolumescloneGetallInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumescloneGetallInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudV2VolumescloneGetallInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone getall internal server error response has a 2xx status code +func (o *PcloudV2VolumescloneGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone getall internal server error response has a 3xx status code +func (o *PcloudV2VolumescloneGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone getall internal server error response has a 4xx status code +func (o *PcloudV2VolumescloneGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone getall internal server error response has a 5xx status code +func (o *PcloudV2VolumescloneGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumesclone getall internal server error response a status code equal to that given +func (o *PcloudV2VolumescloneGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumesclone getall internal server error response +func (o *PcloudV2VolumescloneGetallInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumescloneGetallInternalServerError) Error() string { return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumescloneGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumescloneGetallInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_parameters.go index f728df4e876..c318258781c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudV2VolumesclonePostParamsWithHTTPClient(client *http.Client) *Pclou } } -/* PcloudV2VolumesclonePostParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumesclone post operation. +/* +PcloudV2VolumesclonePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumesclone post operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumesclonePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go index 6caa458fd9e..396cbfce6db 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go @@ -60,7 +60,7 @@ func (o *PcloudV2VolumesclonePostReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone] pcloud.v2.volumesclone.post", response, response.Code()) } } @@ -69,7 +69,8 @@ func NewPcloudV2VolumesclonePostAccepted() *PcloudV2VolumesclonePostAccepted { return &PcloudV2VolumesclonePostAccepted{} } -/* PcloudV2VolumesclonePostAccepted describes a response with status code 202, with default header values. +/* +PcloudV2VolumesclonePostAccepted describes a response with status code 202, with default header values. Accepted */ @@ -77,9 +78,44 @@ type PcloudV2VolumesclonePostAccepted struct { Payload *models.VolumesClone } +// IsSuccess returns true when this pcloud v2 volumesclone post accepted response has a 2xx status code +func (o *PcloudV2VolumesclonePostAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumesclone post accepted response has a 3xx status code +func (o *PcloudV2VolumesclonePostAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone post accepted response has a 4xx status code +func (o *PcloudV2VolumesclonePostAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone post accepted response has a 5xx status code +func (o *PcloudV2VolumesclonePostAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone post accepted response a status code equal to that given +func (o *PcloudV2VolumesclonePostAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the pcloud v2 volumesclone post accepted response +func (o *PcloudV2VolumesclonePostAccepted) Code() int { + return 202 +} + func (o *PcloudV2VolumesclonePostAccepted) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostAccepted %+v", 202, o.Payload) } + +func (o *PcloudV2VolumesclonePostAccepted) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostAccepted %+v", 202, o.Payload) +} + func (o *PcloudV2VolumesclonePostAccepted) GetPayload() *models.VolumesClone { return o.Payload } @@ -101,7 +137,8 @@ func NewPcloudV2VolumesclonePostBadRequest() *PcloudV2VolumesclonePostBadRequest return &PcloudV2VolumesclonePostBadRequest{} } -/* PcloudV2VolumesclonePostBadRequest describes a response with status code 400, with default header values. +/* +PcloudV2VolumesclonePostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +146,44 @@ type PcloudV2VolumesclonePostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone post bad request response has a 2xx status code +func (o *PcloudV2VolumesclonePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone post bad request response has a 3xx status code +func (o *PcloudV2VolumesclonePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone post bad request response has a 4xx status code +func (o *PcloudV2VolumesclonePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone post bad request response has a 5xx status code +func (o *PcloudV2VolumesclonePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone post bad request response a status code equal to that given +func (o *PcloudV2VolumesclonePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud v2 volumesclone post bad request response +func (o *PcloudV2VolumesclonePostBadRequest) Code() int { + return 400 +} + func (o *PcloudV2VolumesclonePostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudV2VolumesclonePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudV2VolumesclonePostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +205,8 @@ func NewPcloudV2VolumesclonePostUnauthorized() *PcloudV2VolumesclonePostUnauthor return &PcloudV2VolumesclonePostUnauthorized{} } -/* PcloudV2VolumesclonePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumesclonePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +214,44 @@ type PcloudV2VolumesclonePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone post unauthorized response has a 2xx status code +func (o *PcloudV2VolumesclonePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone post unauthorized response has a 3xx status code +func (o *PcloudV2VolumesclonePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone post unauthorized response has a 4xx status code +func (o *PcloudV2VolumesclonePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone post unauthorized response has a 5xx status code +func (o *PcloudV2VolumesclonePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone post unauthorized response a status code equal to that given +func (o *PcloudV2VolumesclonePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumesclone post unauthorized response +func (o *PcloudV2VolumesclonePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumesclonePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumesclonePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumesclonePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +273,8 @@ func NewPcloudV2VolumesclonePostForbidden() *PcloudV2VolumesclonePostForbidden { return &PcloudV2VolumesclonePostForbidden{} } -/* PcloudV2VolumesclonePostForbidden describes a response with status code 403, with default header values. +/* +PcloudV2VolumesclonePostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +282,44 @@ type PcloudV2VolumesclonePostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone post forbidden response has a 2xx status code +func (o *PcloudV2VolumesclonePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone post forbidden response has a 3xx status code +func (o *PcloudV2VolumesclonePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone post forbidden response has a 4xx status code +func (o *PcloudV2VolumesclonePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone post forbidden response has a 5xx status code +func (o *PcloudV2VolumesclonePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone post forbidden response a status code equal to that given +func (o *PcloudV2VolumesclonePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumesclone post forbidden response +func (o *PcloudV2VolumesclonePostForbidden) Code() int { + return 403 +} + func (o *PcloudV2VolumesclonePostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostForbidden %+v", 403, o.Payload) } + +func (o *PcloudV2VolumesclonePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostForbidden %+v", 403, o.Payload) +} + func (o *PcloudV2VolumesclonePostForbidden) GetPayload() *models.Error { return o.Payload } @@ -197,7 +341,8 @@ func NewPcloudV2VolumesclonePostNotFound() *PcloudV2VolumesclonePostNotFound { return &PcloudV2VolumesclonePostNotFound{} } -/* PcloudV2VolumesclonePostNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumesclonePostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -205,9 +350,44 @@ 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 } @@ -229,7 +409,8 @@ func NewPcloudV2VolumesclonePostInternalServerError() *PcloudV2VolumesclonePostI return &PcloudV2VolumesclonePostInternalServerError{} } -/* PcloudV2VolumesclonePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumesclonePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +418,44 @@ type PcloudV2VolumesclonePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone post internal server error response has a 2xx status code +func (o *PcloudV2VolumesclonePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone post internal server error response has a 3xx status code +func (o *PcloudV2VolumesclonePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone post internal server error response has a 4xx status code +func (o *PcloudV2VolumesclonePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone post internal server error response has a 5xx status code +func (o *PcloudV2VolumesclonePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumesclone post internal server error response a status code equal to that given +func (o *PcloudV2VolumesclonePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumesclone post internal server error response +func (o *PcloudV2VolumesclonePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumesclonePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumesclonePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumesclonePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_parameters.go index 86e9c246841..5eeac3cd311 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_parameters.go @@ -52,10 +52,12 @@ func NewPcloudV2VolumescloneStartPostParamsWithHTTPClient(client *http.Client) * } } -/* PcloudV2VolumescloneStartPostParams contains all the parameters to send to the API endpoint - for the pcloud v2 volumesclone start post operation. +/* +PcloudV2VolumescloneStartPostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud v2 volumesclone start post operation. + + Typically these are written to a http.Request. */ type PcloudV2VolumescloneStartPostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go index 22fa2bf7d30..2c48aa399fe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -54,7 +60,7 @@ func (o *PcloudV2VolumescloneStartPostReader) ReadResponse(response runtime.Clie } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start] pcloud.v2.volumesclone.start.post", response, response.Code()) } } @@ -63,7 +69,8 @@ func NewPcloudV2VolumescloneStartPostOK() *PcloudV2VolumescloneStartPostOK { return &PcloudV2VolumescloneStartPostOK{} } -/* PcloudV2VolumescloneStartPostOK describes a response with status code 200, with default header values. +/* +PcloudV2VolumescloneStartPostOK describes a response with status code 200, with default header values. OK */ @@ -71,9 +78,44 @@ type PcloudV2VolumescloneStartPostOK struct { Payload *models.VolumesClone } +// IsSuccess returns true when this pcloud v2 volumesclone start post o k response has a 2xx status code +func (o *PcloudV2VolumescloneStartPostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud v2 volumesclone start post o k response has a 3xx status code +func (o *PcloudV2VolumescloneStartPostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone start post o k response has a 4xx status code +func (o *PcloudV2VolumescloneStartPostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone start post o k response has a 5xx status code +func (o *PcloudV2VolumescloneStartPostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone start post o k response a status code equal to that given +func (o *PcloudV2VolumescloneStartPostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud v2 volumesclone start post o k response +func (o *PcloudV2VolumescloneStartPostOK) Code() int { + return 200 +} + func (o *PcloudV2VolumescloneStartPostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostOK %+v", 200, o.Payload) } + +func (o *PcloudV2VolumescloneStartPostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostOK %+v", 200, o.Payload) +} + func (o *PcloudV2VolumescloneStartPostOK) GetPayload() *models.VolumesClone { return o.Payload } @@ -90,12 +132,81 @@ 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{} } -/* PcloudV2VolumescloneStartPostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudV2VolumescloneStartPostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -103,9 +214,44 @@ type PcloudV2VolumescloneStartPostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone start post unauthorized response has a 2xx status code +func (o *PcloudV2VolumescloneStartPostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone start post unauthorized response has a 3xx status code +func (o *PcloudV2VolumescloneStartPostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone start post unauthorized response has a 4xx status code +func (o *PcloudV2VolumescloneStartPostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone start post unauthorized response has a 5xx status code +func (o *PcloudV2VolumescloneStartPostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone start post unauthorized response a status code equal to that given +func (o *PcloudV2VolumescloneStartPostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud v2 volumesclone start post unauthorized response +func (o *PcloudV2VolumescloneStartPostUnauthorized) Code() int { + return 401 +} + func (o *PcloudV2VolumescloneStartPostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudV2VolumescloneStartPostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudV2VolumescloneStartPostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -127,7 +273,8 @@ func NewPcloudV2VolumescloneStartPostForbidden() *PcloudV2VolumescloneStartPostF return &PcloudV2VolumescloneStartPostForbidden{} } -/* PcloudV2VolumescloneStartPostForbidden describes a response with status code 403, with default header values. +/* +PcloudV2VolumescloneStartPostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -135,9 +282,44 @@ type PcloudV2VolumescloneStartPostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone start post forbidden response has a 2xx status code +func (o *PcloudV2VolumescloneStartPostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone start post forbidden response has a 3xx status code +func (o *PcloudV2VolumescloneStartPostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone start post forbidden response has a 4xx status code +func (o *PcloudV2VolumescloneStartPostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone start post forbidden response has a 5xx status code +func (o *PcloudV2VolumescloneStartPostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone start post forbidden response a status code equal to that given +func (o *PcloudV2VolumescloneStartPostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud v2 volumesclone start post forbidden response +func (o *PcloudV2VolumescloneStartPostForbidden) Code() int { + return 403 +} + func (o *PcloudV2VolumescloneStartPostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostForbidden %+v", 403, o.Payload) } + +func (o *PcloudV2VolumescloneStartPostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostForbidden %+v", 403, o.Payload) +} + func (o *PcloudV2VolumescloneStartPostForbidden) GetPayload() *models.Error { return o.Payload } @@ -159,7 +341,8 @@ func NewPcloudV2VolumescloneStartPostNotFound() *PcloudV2VolumescloneStartPostNo return &PcloudV2VolumescloneStartPostNotFound{} } -/* PcloudV2VolumescloneStartPostNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumescloneStartPostNotFound describes a response with status code 404, with default header values. Not Found */ @@ -167,9 +350,44 @@ type PcloudV2VolumescloneStartPostNotFound struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone start post not found response has a 2xx status code +func (o *PcloudV2VolumescloneStartPostNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone start post not found response has a 3xx status code +func (o *PcloudV2VolumescloneStartPostNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone start post not found response has a 4xx status code +func (o *PcloudV2VolumescloneStartPostNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud v2 volumesclone start post not found response has a 5xx status code +func (o *PcloudV2VolumescloneStartPostNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud v2 volumesclone start post not found response a status code equal to that given +func (o *PcloudV2VolumescloneStartPostNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the pcloud v2 volumesclone start post not found response +func (o *PcloudV2VolumescloneStartPostNotFound) Code() int { + return 404 +} + func (o *PcloudV2VolumescloneStartPostNotFound) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostNotFound %+v", 404, o.Payload) } + +func (o *PcloudV2VolumescloneStartPostNotFound) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostNotFound %+v", 404, o.Payload) +} + func (o *PcloudV2VolumescloneStartPostNotFound) GetPayload() *models.Error { return o.Payload } @@ -191,7 +409,8 @@ func NewPcloudV2VolumescloneStartPostInternalServerError() *PcloudV2Volumesclone return &PcloudV2VolumescloneStartPostInternalServerError{} } -/* PcloudV2VolumescloneStartPostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudV2VolumescloneStartPostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -199,9 +418,44 @@ type PcloudV2VolumescloneStartPostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud v2 volumesclone start post internal server error response has a 2xx status code +func (o *PcloudV2VolumescloneStartPostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud v2 volumesclone start post internal server error response has a 3xx status code +func (o *PcloudV2VolumescloneStartPostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud v2 volumesclone start post internal server error response has a 4xx status code +func (o *PcloudV2VolumescloneStartPostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud v2 volumesclone start post internal server error response has a 5xx status code +func (o *PcloudV2VolumescloneStartPostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud v2 volumesclone start post internal server error response a status code equal to that given +func (o *PcloudV2VolumescloneStartPostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud v2 volumesclone start post internal server error response +func (o *PcloudV2VolumescloneStartPostInternalServerError) Code() int { + return 500 +} + func (o *PcloudV2VolumescloneStartPostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudV2VolumescloneStartPostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudV2VolumescloneStartPostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_parameters.go index 44e22ad18e0..4b44d5e24a6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_parameters.go @@ -54,10 +54,12 @@ func NewPcloudVolumesClonePostParamsWithHTTPClient(client *http.Client) *PcloudV } } -/* PcloudVolumesClonePostParams contains all the parameters to send to the API endpoint - for the pcloud volumes clone post operation. +/* +PcloudVolumesClonePostParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the pcloud volumes clone post operation. + + Typically these are written to a http.Request. */ type PcloudVolumesClonePostParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go index 0c26160db8f..212814d9bca 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +66,7 @@ func (o *PcloudVolumesClonePostReader) ReadResponse(response runtime.ClientRespo } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone] pcloud.volumes.clone.post", response, response.Code()) } } @@ -69,7 +75,8 @@ func NewPcloudVolumesClonePostOK() *PcloudVolumesClonePostOK { return &PcloudVolumesClonePostOK{} } -/* PcloudVolumesClonePostOK describes a response with status code 200, with default header values. +/* +PcloudVolumesClonePostOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +84,44 @@ type PcloudVolumesClonePostOK struct { Payload *models.VolumesCloneResponse } +// IsSuccess returns true when this pcloud volumes clone post o k response has a 2xx status code +func (o *PcloudVolumesClonePostOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pcloud volumes clone post o k response has a 3xx status code +func (o *PcloudVolumesClonePostOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumes clone post o k response has a 4xx status code +func (o *PcloudVolumesClonePostOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumes clone post o k response has a 5xx status code +func (o *PcloudVolumesClonePostOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumes clone post o k response a status code equal to that given +func (o *PcloudVolumesClonePostOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pcloud volumes clone post o k response +func (o *PcloudVolumesClonePostOK) Code() int { + return 200 +} + func (o *PcloudVolumesClonePostOK) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostOK %+v", 200, o.Payload) } + +func (o *PcloudVolumesClonePostOK) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostOK %+v", 200, o.Payload) +} + func (o *PcloudVolumesClonePostOK) GetPayload() *models.VolumesCloneResponse { return o.Payload } @@ -101,7 +143,8 @@ func NewPcloudVolumesClonePostBadRequest() *PcloudVolumesClonePostBadRequest { return &PcloudVolumesClonePostBadRequest{} } -/* PcloudVolumesClonePostBadRequest describes a response with status code 400, with default header values. +/* +PcloudVolumesClonePostBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -109,9 +152,44 @@ type PcloudVolumesClonePostBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumes clone post bad request response has a 2xx status code +func (o *PcloudVolumesClonePostBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumes clone post bad request response has a 3xx status code +func (o *PcloudVolumesClonePostBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumes clone post bad request response has a 4xx status code +func (o *PcloudVolumesClonePostBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumes clone post bad request response has a 5xx status code +func (o *PcloudVolumesClonePostBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumes clone post bad request response a status code equal to that given +func (o *PcloudVolumesClonePostBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the pcloud volumes clone post bad request response +func (o *PcloudVolumesClonePostBadRequest) Code() int { + return 400 +} + func (o *PcloudVolumesClonePostBadRequest) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostBadRequest %+v", 400, o.Payload) } + +func (o *PcloudVolumesClonePostBadRequest) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostBadRequest %+v", 400, o.Payload) +} + func (o *PcloudVolumesClonePostBadRequest) GetPayload() *models.Error { return o.Payload } @@ -133,7 +211,8 @@ func NewPcloudVolumesClonePostUnauthorized() *PcloudVolumesClonePostUnauthorized return &PcloudVolumesClonePostUnauthorized{} } -/* PcloudVolumesClonePostUnauthorized describes a response with status code 401, with default header values. +/* +PcloudVolumesClonePostUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -141,9 +220,44 @@ type PcloudVolumesClonePostUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumes clone post unauthorized response has a 2xx status code +func (o *PcloudVolumesClonePostUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumes clone post unauthorized response has a 3xx status code +func (o *PcloudVolumesClonePostUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumes clone post unauthorized response has a 4xx status code +func (o *PcloudVolumesClonePostUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumes clone post unauthorized response has a 5xx status code +func (o *PcloudVolumesClonePostUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumes clone post unauthorized response a status code equal to that given +func (o *PcloudVolumesClonePostUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the pcloud volumes clone post unauthorized response +func (o *PcloudVolumesClonePostUnauthorized) Code() int { + return 401 +} + func (o *PcloudVolumesClonePostUnauthorized) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostUnauthorized %+v", 401, o.Payload) } + +func (o *PcloudVolumesClonePostUnauthorized) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostUnauthorized %+v", 401, o.Payload) +} + func (o *PcloudVolumesClonePostUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -165,7 +279,8 @@ func NewPcloudVolumesClonePostForbidden() *PcloudVolumesClonePostForbidden { return &PcloudVolumesClonePostForbidden{} } -/* PcloudVolumesClonePostForbidden describes a response with status code 403, with default header values. +/* +PcloudVolumesClonePostForbidden describes a response with status code 403, with default header values. Forbidden */ @@ -173,9 +288,44 @@ type PcloudVolumesClonePostForbidden struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumes clone post forbidden response has a 2xx status code +func (o *PcloudVolumesClonePostForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumes clone post forbidden response has a 3xx status code +func (o *PcloudVolumesClonePostForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumes clone post forbidden response has a 4xx status code +func (o *PcloudVolumesClonePostForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumes clone post forbidden response has a 5xx status code +func (o *PcloudVolumesClonePostForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumes clone post forbidden response a status code equal to that given +func (o *PcloudVolumesClonePostForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the pcloud volumes clone post forbidden response +func (o *PcloudVolumesClonePostForbidden) Code() int { + return 403 +} + func (o *PcloudVolumesClonePostForbidden) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostForbidden %+v", 403, o.Payload) } + +func (o *PcloudVolumesClonePostForbidden) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostForbidden %+v", 403, o.Payload) +} + func (o *PcloudVolumesClonePostForbidden) GetPayload() *models.Error { return o.Payload } @@ -192,12 +342,81 @@ 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{} } -/* PcloudVolumesClonePostConflict describes a response with status code 409, with default header values. +/* +PcloudVolumesClonePostConflict describes a response with status code 409, with default header values. Conflict */ @@ -205,9 +424,44 @@ type PcloudVolumesClonePostConflict struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumes clone post conflict response has a 2xx status code +func (o *PcloudVolumesClonePostConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumes clone post conflict response has a 3xx status code +func (o *PcloudVolumesClonePostConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumes clone post conflict response has a 4xx status code +func (o *PcloudVolumesClonePostConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this pcloud volumes clone post conflict response has a 5xx status code +func (o *PcloudVolumesClonePostConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this pcloud volumes clone post conflict response a status code equal to that given +func (o *PcloudVolumesClonePostConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the pcloud volumes clone post conflict response +func (o *PcloudVolumesClonePostConflict) Code() int { + return 409 +} + func (o *PcloudVolumesClonePostConflict) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostConflict %+v", 409, o.Payload) } + +func (o *PcloudVolumesClonePostConflict) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostConflict %+v", 409, o.Payload) +} + func (o *PcloudVolumesClonePostConflict) GetPayload() *models.Error { return o.Payload } @@ -229,7 +483,8 @@ func NewPcloudVolumesClonePostInternalServerError() *PcloudVolumesClonePostInter return &PcloudVolumesClonePostInternalServerError{} } -/* PcloudVolumesClonePostInternalServerError describes a response with status code 500, with default header values. +/* +PcloudVolumesClonePostInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -237,9 +492,44 @@ type PcloudVolumesClonePostInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this pcloud volumes clone post internal server error response has a 2xx status code +func (o *PcloudVolumesClonePostInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this pcloud volumes clone post internal server error response has a 3xx status code +func (o *PcloudVolumesClonePostInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pcloud volumes clone post internal server error response has a 4xx status code +func (o *PcloudVolumesClonePostInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this pcloud volumes clone post internal server error response has a 5xx status code +func (o *PcloudVolumesClonePostInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this pcloud volumes clone post internal server error response a status code equal to that given +func (o *PcloudVolumesClonePostInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the pcloud volumes clone post internal server error response +func (o *PcloudVolumesClonePostInternalServerError) Code() int { + return 500 +} + func (o *PcloudVolumesClonePostInternalServerError) Error() string { return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostInternalServerError %+v", 500, o.Payload) } + +func (o *PcloudVolumesClonePostInternalServerError) String() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostInternalServerError %+v", 500, o.Payload) +} + func (o *PcloudVolumesClonePostInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_api_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_api_client.go index f80657caa54..a74bb77f76d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_api_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/power_iaas_api_client.go @@ -13,6 +13,7 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/authentication" "github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances" "github.com/IBM-Cloud/power-go-client/power/client/catalog" + "github.com/IBM-Cloud/power-go-client/power/client/datacenters" "github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms" "github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker" "github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances" @@ -29,12 +30,14 @@ import ( "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups" + "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity" + "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks" "github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants" @@ -48,6 +51,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. @@ -95,6 +99,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaasA cli.Authentication = authentication.New(transport, formats) cli.BluemixServiceInstances = bluemix_service_instances.New(transport, formats) cli.Catalog = catalog.New(transport, formats) + cli.Datacenters = datacenters.New(transport, formats) cli.HardwarePlatforms = hardware_platforms.New(transport, formats) cli.IaasServiceBroker = iaas_service_broker.New(transport, formats) cli.InternalPowervsInstances = internal_power_v_s_instances.New(transport, formats) @@ -111,12 +116,14 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PowerIaasA cli.PCloudNetworks = p_cloud_networks.New(transport, formats) cli.PCloudpVMInstances = p_cloud_p_vm_instances.New(transport, formats) cli.PCloudPlacementGroups = p_cloud_placement_groups.New(transport, formats) + cli.PCloudPodCapacity = p_cloud_pod_capacity.New(transport, formats) cli.PCloudsap = p_cloud_s_a_p.New(transport, formats) cli.PCloudsppPlacementGroups = p_cloud_s_p_p_placement_groups.New(transport, formats) cli.PCloudServicedhcp = p_cloud_service_d_h_c_p.New(transport, formats) cli.PCloudSharedProcessorPools = p_cloud_shared_processor_pools.New(transport, formats) cli.PCloudSnapshots = p_cloud_snapshots.New(transport, formats) cli.PCloudStorageCapacity = p_cloud_storage_capacity.New(transport, formats) + cli.PCloudStorageTiers = p_cloud_storage_tiers.New(transport, formats) cli.PCloudSystemPools = p_cloud_system_pools.New(transport, formats) cli.PCloudTasks = p_cloud_tasks.New(transport, formats) cli.PCloudTenants = p_cloud_tenants.New(transport, formats) @@ -130,6 +137,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 } @@ -180,6 +188,8 @@ type PowerIaasAPI struct { Catalog catalog.ClientService + Datacenters datacenters.ClientService + HardwarePlatforms hardware_platforms.ClientService IaasServiceBroker iaas_service_broker.ClientService @@ -212,6 +222,8 @@ type PowerIaasAPI struct { PCloudPlacementGroups p_cloud_placement_groups.ClientService + PCloudPodCapacity p_cloud_pod_capacity.ClientService + PCloudsap p_cloud_s_a_p.ClientService PCloudsppPlacementGroups p_cloud_s_p_p_placement_groups.ClientService @@ -224,6 +236,8 @@ type PowerIaasAPI struct { PCloudStorageCapacity p_cloud_storage_capacity.ClientService + PCloudStorageTiers p_cloud_storage_tiers.ClientService + PCloudSystemPools p_cloud_system_pools.ClientService PCloudTasks p_cloud_tasks.ClientService @@ -250,6 +264,8 @@ type PowerIaasAPI struct { SwaggerSpec swagger_spec.ClientService + Workspaces workspaces.ClientService + Transport runtime.ClientTransport } @@ -259,6 +275,7 @@ func (c *PowerIaasAPI) SetTransport(transport runtime.ClientTransport) { c.Authentication.SetTransport(transport) c.BluemixServiceInstances.SetTransport(transport) c.Catalog.SetTransport(transport) + c.Datacenters.SetTransport(transport) c.HardwarePlatforms.SetTransport(transport) c.IaasServiceBroker.SetTransport(transport) c.InternalPowervsInstances.SetTransport(transport) @@ -275,12 +292,14 @@ func (c *PowerIaasAPI) SetTransport(transport runtime.ClientTransport) { c.PCloudNetworks.SetTransport(transport) c.PCloudpVMInstances.SetTransport(transport) c.PCloudPlacementGroups.SetTransport(transport) + c.PCloudPodCapacity.SetTransport(transport) c.PCloudsap.SetTransport(transport) c.PCloudsppPlacementGroups.SetTransport(transport) c.PCloudServicedhcp.SetTransport(transport) c.PCloudSharedProcessorPools.SetTransport(transport) c.PCloudSnapshots.SetTransport(transport) c.PCloudStorageCapacity.SetTransport(transport) + c.PCloudStorageTiers.SetTransport(transport) c.PCloudSystemPools.SetTransport(transport) c.PCloudTasks.SetTransport(transport) c.PCloudTenants.SetTransport(transport) @@ -294,4 +313,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_parameters.go index e2a1fc917c5..61d9b2d34c6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_parameters.go @@ -55,10 +55,12 @@ func NewServiceBindingBindingParamsWithHTTPClient(client *http.Client) *ServiceB } } -/* ServiceBindingBindingParams contains all the parameters to send to the API endpoint - for the service binding binding operation. +/* +ServiceBindingBindingParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service binding binding operation. + + Typically these are written to a http.Request. */ type ServiceBindingBindingParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_responses.go index 8d6a348a2c6..2c32202d796 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_binding_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +78,7 @@ func (o *ServiceBindingBindingReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}] serviceBinding.binding", response, response.Code()) } } @@ -69,7 +87,8 @@ func NewServiceBindingBindingOK() *ServiceBindingBindingOK { return &ServiceBindingBindingOK{} } -/* ServiceBindingBindingOK describes a response with status code 200, with default header values. +/* +ServiceBindingBindingOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +96,44 @@ type ServiceBindingBindingOK struct { Payload *models.ServiceBinding } +// IsSuccess returns true when this service binding binding o k response has a 2xx status code +func (o *ServiceBindingBindingOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service binding binding o k response has a 3xx status code +func (o *ServiceBindingBindingOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding o k response has a 4xx status code +func (o *ServiceBindingBindingOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service binding binding o k response has a 5xx status code +func (o *ServiceBindingBindingOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding o k response a status code equal to that given +func (o *ServiceBindingBindingOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service binding binding o k response +func (o *ServiceBindingBindingOK) Code() int { + return 200 +} + func (o *ServiceBindingBindingOK) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingOK %+v", 200, o.Payload) } + +func (o *ServiceBindingBindingOK) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingOK %+v", 200, o.Payload) +} + func (o *ServiceBindingBindingOK) GetPayload() *models.ServiceBinding { return o.Payload } @@ -101,7 +155,8 @@ func NewServiceBindingBindingCreated() *ServiceBindingBindingCreated { return &ServiceBindingBindingCreated{} } -/* ServiceBindingBindingCreated describes a response with status code 201, with default header values. +/* +ServiceBindingBindingCreated describes a response with status code 201, with default header values. Created */ @@ -109,9 +164,44 @@ type ServiceBindingBindingCreated struct { Payload *models.ServiceBinding } +// IsSuccess returns true when this service binding binding created response has a 2xx status code +func (o *ServiceBindingBindingCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service binding binding created response has a 3xx status code +func (o *ServiceBindingBindingCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding created response has a 4xx status code +func (o *ServiceBindingBindingCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this service binding binding created response has a 5xx status code +func (o *ServiceBindingBindingCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding created response a status code equal to that given +func (o *ServiceBindingBindingCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the service binding binding created response +func (o *ServiceBindingBindingCreated) Code() int { + return 201 +} + func (o *ServiceBindingBindingCreated) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingCreated %+v", 201, o.Payload) } + +func (o *ServiceBindingBindingCreated) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingCreated %+v", 201, o.Payload) +} + func (o *ServiceBindingBindingCreated) GetPayload() *models.ServiceBinding { return o.Payload } @@ -133,7 +223,8 @@ func NewServiceBindingBindingAccepted() *ServiceBindingBindingAccepted { return &ServiceBindingBindingAccepted{} } -/* ServiceBindingBindingAccepted describes a response with status code 202, with default header values. +/* +ServiceBindingBindingAccepted describes a response with status code 202, with default header values. Accepted */ @@ -141,9 +232,44 @@ type ServiceBindingBindingAccepted struct { Payload *models.AsyncOperation } +// IsSuccess returns true when this service binding binding accepted response has a 2xx status code +func (o *ServiceBindingBindingAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service binding binding accepted response has a 3xx status code +func (o *ServiceBindingBindingAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding accepted response has a 4xx status code +func (o *ServiceBindingBindingAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this service binding binding accepted response has a 5xx status code +func (o *ServiceBindingBindingAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding accepted response a status code equal to that given +func (o *ServiceBindingBindingAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the service binding binding accepted response +func (o *ServiceBindingBindingAccepted) Code() int { + return 202 +} + func (o *ServiceBindingBindingAccepted) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingAccepted %+v", 202, o.Payload) } + +func (o *ServiceBindingBindingAccepted) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingAccepted %+v", 202, o.Payload) +} + func (o *ServiceBindingBindingAccepted) GetPayload() *models.AsyncOperation { return o.Payload } @@ -165,7 +291,8 @@ func NewServiceBindingBindingBadRequest() *ServiceBindingBindingBadRequest { return &ServiceBindingBindingBadRequest{} } -/* ServiceBindingBindingBadRequest describes a response with status code 400, with default header values. +/* +ServiceBindingBindingBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -173,9 +300,44 @@ type ServiceBindingBindingBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service binding binding bad request response has a 2xx status code +func (o *ServiceBindingBindingBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding binding bad request response has a 3xx status code +func (o *ServiceBindingBindingBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding bad request response has a 4xx status code +func (o *ServiceBindingBindingBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding binding bad request response has a 5xx status code +func (o *ServiceBindingBindingBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding bad request response a status code equal to that given +func (o *ServiceBindingBindingBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service binding binding bad request response +func (o *ServiceBindingBindingBadRequest) Code() int { + return 400 +} + func (o *ServiceBindingBindingBadRequest) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBindingBindingBadRequest) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBindingBindingBadRequest) GetPayload() *models.Error { return o.Payload } @@ -192,12 +354,217 @@ 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{} } -/* ServiceBindingBindingConflict describes a response with status code 409, with default header values. +/* +ServiceBindingBindingConflict describes a response with status code 409, with default header values. Conflict */ @@ -205,9 +572,44 @@ type ServiceBindingBindingConflict struct { Payload *models.Error } +// IsSuccess returns true when this service binding binding conflict response has a 2xx status code +func (o *ServiceBindingBindingConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding binding conflict response has a 3xx status code +func (o *ServiceBindingBindingConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding conflict response has a 4xx status code +func (o *ServiceBindingBindingConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding binding conflict response has a 5xx status code +func (o *ServiceBindingBindingConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding conflict response a status code equal to that given +func (o *ServiceBindingBindingConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the service binding binding conflict response +func (o *ServiceBindingBindingConflict) Code() int { + return 409 +} + func (o *ServiceBindingBindingConflict) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingConflict %+v", 409, o.Payload) } + +func (o *ServiceBindingBindingConflict) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingConflict %+v", 409, o.Payload) +} + func (o *ServiceBindingBindingConflict) GetPayload() *models.Error { return o.Payload } @@ -229,7 +631,8 @@ func NewServiceBindingBindingUnprocessableEntity() *ServiceBindingBindingUnproce return &ServiceBindingBindingUnprocessableEntity{} } -/* ServiceBindingBindingUnprocessableEntity describes a response with status code 422, with default header values. +/* +ServiceBindingBindingUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -237,9 +640,44 @@ type ServiceBindingBindingUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this service binding binding unprocessable entity response has a 2xx status code +func (o *ServiceBindingBindingUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding binding unprocessable entity response has a 3xx status code +func (o *ServiceBindingBindingUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding binding unprocessable entity response has a 4xx status code +func (o *ServiceBindingBindingUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding binding unprocessable entity response has a 5xx status code +func (o *ServiceBindingBindingUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding binding unprocessable entity response a status code equal to that given +func (o *ServiceBindingBindingUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the service binding binding unprocessable entity response +func (o *ServiceBindingBindingUnprocessableEntity) Code() int { + return 422 +} + func (o *ServiceBindingBindingUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnprocessableEntity %+v", 422, o.Payload) } + +func (o *ServiceBindingBindingUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingBindingUnprocessableEntity %+v", 422, o.Payload) +} + func (o *ServiceBindingBindingUnprocessableEntity) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_parameters.go index 98450eb6c29..399963c8063 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceBindingGetParamsWithHTTPClient(client *http.Client) *ServiceBindi } } -/* ServiceBindingGetParams contains all the parameters to send to the API endpoint - for the service binding get operation. +/* +ServiceBindingGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service binding get operation. + + Typically these are written to a http.Request. */ type ServiceBindingGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_responses.go index ba1f5d08def..3701f13caaa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -36,7 +54,7 @@ func (o *ServiceBindingGetReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}] serviceBinding.get", response, response.Code()) } } @@ -45,7 +63,8 @@ func NewServiceBindingGetOK() *ServiceBindingGetOK { return &ServiceBindingGetOK{} } -/* ServiceBindingGetOK describes a response with status code 200, with default header values. +/* +ServiceBindingGetOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +72,44 @@ type ServiceBindingGetOK struct { Payload *models.ServiceBindingResource } +// IsSuccess returns true when this service binding get o k response has a 2xx status code +func (o *ServiceBindingGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service binding get o k response has a 3xx status code +func (o *ServiceBindingGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding get o k response has a 4xx status code +func (o *ServiceBindingGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service binding get o k response has a 5xx status code +func (o *ServiceBindingGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding get o k response a status code equal to that given +func (o *ServiceBindingGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service binding get o k response +func (o *ServiceBindingGetOK) Code() int { + return 200 +} + func (o *ServiceBindingGetOK) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetOK %+v", 200, o.Payload) } + +func (o *ServiceBindingGetOK) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetOK %+v", 200, o.Payload) +} + func (o *ServiceBindingGetOK) GetPayload() *models.ServiceBindingResource { return o.Payload } @@ -72,12 +126,217 @@ 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{} } -/* ServiceBindingGetNotFound describes a response with status code 404, with default header values. +/* +ServiceBindingGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -85,9 +344,44 @@ type ServiceBindingGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this service binding get not found response has a 2xx status code +func (o *ServiceBindingGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding get not found response has a 3xx status code +func (o *ServiceBindingGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding get not found response has a 4xx status code +func (o *ServiceBindingGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding get not found response has a 5xx status code +func (o *ServiceBindingGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding get not found response a status code equal to that given +func (o *ServiceBindingGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service binding get not found response +func (o *ServiceBindingGetNotFound) Code() int { + return 404 +} + func (o *ServiceBindingGetNotFound) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetNotFound %+v", 404, o.Payload) } + +func (o *ServiceBindingGetNotFound) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingGetNotFound %+v", 404, o.Payload) +} + func (o *ServiceBindingGetNotFound) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_parameters.go index 20ee289c29f..061552784a7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceBindingLastOperationGetParamsWithHTTPClient(client *http.Client) } } -/* ServiceBindingLastOperationGetParams contains all the parameters to send to the API endpoint - for the service binding last operation get operation. +/* +ServiceBindingLastOperationGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service binding last operation get operation. + + Typically these are written to a http.Request. */ type ServiceBindingLastOperationGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_responses.go index 46779aad171..000668256cc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_last_operation_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -42,7 +60,7 @@ func (o *ServiceBindingLastOperationGetReader) ReadResponse(response runtime.Cli } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation] serviceBinding.lastOperation.get", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewServiceBindingLastOperationGetOK() *ServiceBindingLastOperationGetOK { return &ServiceBindingLastOperationGetOK{} } -/* ServiceBindingLastOperationGetOK describes a response with status code 200, with default header values. +/* +ServiceBindingLastOperationGetOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type ServiceBindingLastOperationGetOK struct { Payload *models.LastOperationResource } +// IsSuccess returns true when this service binding last operation get o k response has a 2xx status code +func (o *ServiceBindingLastOperationGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service binding last operation get o k response has a 3xx status code +func (o *ServiceBindingLastOperationGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding last operation get o k response has a 4xx status code +func (o *ServiceBindingLastOperationGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service binding last operation get o k response has a 5xx status code +func (o *ServiceBindingLastOperationGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding last operation get o k response a status code equal to that given +func (o *ServiceBindingLastOperationGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service binding last operation get o k response +func (o *ServiceBindingLastOperationGetOK) Code() int { + return 200 +} + func (o *ServiceBindingLastOperationGetOK) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetOK %+v", 200, o.Payload) } + +func (o *ServiceBindingLastOperationGetOK) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetOK %+v", 200, o.Payload) +} + func (o *ServiceBindingLastOperationGetOK) GetPayload() *models.LastOperationResource { return o.Payload } @@ -83,7 +137,8 @@ func NewServiceBindingLastOperationGetBadRequest() *ServiceBindingLastOperationG return &ServiceBindingLastOperationGetBadRequest{} } -/* ServiceBindingLastOperationGetBadRequest describes a response with status code 400, with default header values. +/* +ServiceBindingLastOperationGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -91,9 +146,44 @@ type ServiceBindingLastOperationGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service binding last operation get bad request response has a 2xx status code +func (o *ServiceBindingLastOperationGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding last operation get bad request response has a 3xx status code +func (o *ServiceBindingLastOperationGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding last operation get bad request response has a 4xx status code +func (o *ServiceBindingLastOperationGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding last operation get bad request response has a 5xx status code +func (o *ServiceBindingLastOperationGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding last operation get bad request response a status code equal to that given +func (o *ServiceBindingLastOperationGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service binding last operation get bad request response +func (o *ServiceBindingLastOperationGetBadRequest) Code() int { + return 400 +} + func (o *ServiceBindingLastOperationGetBadRequest) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBindingLastOperationGetBadRequest) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBindingLastOperationGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -110,12 +200,217 @@ 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{} } -/* ServiceBindingLastOperationGetGone describes a response with status code 410, with default header values. +/* +ServiceBindingLastOperationGetGone describes a response with status code 410, with default header values. Gone */ @@ -123,9 +418,44 @@ type ServiceBindingLastOperationGetGone struct { Payload *models.Error } +// IsSuccess returns true when this service binding last operation get gone response has a 2xx status code +func (o *ServiceBindingLastOperationGetGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding last operation get gone response has a 3xx status code +func (o *ServiceBindingLastOperationGetGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding last operation get gone response has a 4xx status code +func (o *ServiceBindingLastOperationGetGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding last operation get gone response has a 5xx status code +func (o *ServiceBindingLastOperationGetGone) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding last operation get gone response a status code equal to that given +func (o *ServiceBindingLastOperationGetGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the service binding last operation get gone response +func (o *ServiceBindingLastOperationGetGone) Code() int { + return 410 +} + func (o *ServiceBindingLastOperationGetGone) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetGone %+v", 410, o.Payload) } + +func (o *ServiceBindingLastOperationGetGone) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation][%d] serviceBindingLastOperationGetGone %+v", 410, o.Payload) +} + func (o *ServiceBindingLastOperationGetGone) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_parameters.go index fb2dc202daf..091881ba34b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_parameters.go @@ -53,10 +53,12 @@ func NewServiceBindingUnbindingParamsWithHTTPClient(client *http.Client) *Servic } } -/* ServiceBindingUnbindingParams contains all the parameters to send to the API endpoint - for the service binding unbinding operation. +/* +ServiceBindingUnbindingParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service binding unbinding operation. + + Typically these are written to a http.Request. */ type ServiceBindingUnbindingParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_responses.go index 2416449a3f8..6f1cb703319 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_binding_unbinding_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +66,7 @@ func (o *ServiceBindingUnbindingReader) ReadResponse(response runtime.ClientResp } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}] serviceBinding.unbinding", response, response.Code()) } } @@ -57,7 +75,8 @@ func NewServiceBindingUnbindingOK() *ServiceBindingUnbindingOK { return &ServiceBindingUnbindingOK{} } -/* ServiceBindingUnbindingOK describes a response with status code 200, with default header values. +/* +ServiceBindingUnbindingOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +84,44 @@ type ServiceBindingUnbindingOK struct { Payload models.Object } +// IsSuccess returns true when this service binding unbinding o k response has a 2xx status code +func (o *ServiceBindingUnbindingOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service binding unbinding o k response has a 3xx status code +func (o *ServiceBindingUnbindingOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding unbinding o k response has a 4xx status code +func (o *ServiceBindingUnbindingOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service binding unbinding o k response has a 5xx status code +func (o *ServiceBindingUnbindingOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding unbinding o k response a status code equal to that given +func (o *ServiceBindingUnbindingOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service binding unbinding o k response +func (o *ServiceBindingUnbindingOK) Code() int { + return 200 +} + func (o *ServiceBindingUnbindingOK) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingOK %+v", 200, o.Payload) } + +func (o *ServiceBindingUnbindingOK) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingOK %+v", 200, o.Payload) +} + func (o *ServiceBindingUnbindingOK) GetPayload() models.Object { return o.Payload } @@ -87,7 +141,8 @@ func NewServiceBindingUnbindingAccepted() *ServiceBindingUnbindingAccepted { return &ServiceBindingUnbindingAccepted{} } -/* ServiceBindingUnbindingAccepted describes a response with status code 202, with default header values. +/* +ServiceBindingUnbindingAccepted describes a response with status code 202, with default header values. Accepted */ @@ -95,9 +150,44 @@ type ServiceBindingUnbindingAccepted struct { Payload *models.AsyncOperation } +// IsSuccess returns true when this service binding unbinding accepted response has a 2xx status code +func (o *ServiceBindingUnbindingAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service binding unbinding accepted response has a 3xx status code +func (o *ServiceBindingUnbindingAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding unbinding accepted response has a 4xx status code +func (o *ServiceBindingUnbindingAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this service binding unbinding accepted response has a 5xx status code +func (o *ServiceBindingUnbindingAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding unbinding accepted response a status code equal to that given +func (o *ServiceBindingUnbindingAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the service binding unbinding accepted response +func (o *ServiceBindingUnbindingAccepted) Code() int { + return 202 +} + func (o *ServiceBindingUnbindingAccepted) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingAccepted %+v", 202, o.Payload) } + +func (o *ServiceBindingUnbindingAccepted) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingAccepted %+v", 202, o.Payload) +} + func (o *ServiceBindingUnbindingAccepted) GetPayload() *models.AsyncOperation { return o.Payload } @@ -119,7 +209,8 @@ func NewServiceBindingUnbindingBadRequest() *ServiceBindingUnbindingBadRequest { return &ServiceBindingUnbindingBadRequest{} } -/* ServiceBindingUnbindingBadRequest describes a response with status code 400, with default header values. +/* +ServiceBindingUnbindingBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -127,9 +218,44 @@ type ServiceBindingUnbindingBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service binding unbinding bad request response has a 2xx status code +func (o *ServiceBindingUnbindingBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding unbinding bad request response has a 3xx status code +func (o *ServiceBindingUnbindingBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding unbinding bad request response has a 4xx status code +func (o *ServiceBindingUnbindingBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding unbinding bad request response has a 5xx status code +func (o *ServiceBindingUnbindingBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding unbinding bad request response a status code equal to that given +func (o *ServiceBindingUnbindingBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service binding unbinding bad request response +func (o *ServiceBindingUnbindingBadRequest) Code() int { + return 400 +} + func (o *ServiceBindingUnbindingBadRequest) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingBadRequest %+v", 400, o.Payload) } + +func (o *ServiceBindingUnbindingBadRequest) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingBadRequest %+v", 400, o.Payload) +} + func (o *ServiceBindingUnbindingBadRequest) GetPayload() *models.Error { return o.Payload } @@ -146,12 +272,217 @@ 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{} } -/* ServiceBindingUnbindingGone describes a response with status code 410, with default header values. +/* +ServiceBindingUnbindingGone describes a response with status code 410, with default header values. Gone */ @@ -159,9 +490,44 @@ type ServiceBindingUnbindingGone struct { Payload *models.Error } +// IsSuccess returns true when this service binding unbinding gone response has a 2xx status code +func (o *ServiceBindingUnbindingGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service binding unbinding gone response has a 3xx status code +func (o *ServiceBindingUnbindingGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service binding unbinding gone response has a 4xx status code +func (o *ServiceBindingUnbindingGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this service binding unbinding gone response has a 5xx status code +func (o *ServiceBindingUnbindingGone) IsServerError() bool { + return false +} + +// IsCode returns true when this service binding unbinding gone response a status code equal to that given +func (o *ServiceBindingUnbindingGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the service binding unbinding gone response +func (o *ServiceBindingUnbindingGone) Code() int { + return 410 +} + func (o *ServiceBindingUnbindingGone) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingGone %+v", 410, o.Payload) } + +func (o *ServiceBindingUnbindingGone) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}][%d] serviceBindingUnbindingGone %+v", 410, o.Payload) +} + func (o *ServiceBindingUnbindingGone) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_bindings_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_bindings_client.go index 554b058d834..73c69f53e52 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_bindings_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_bindings/service_bindings_client.go @@ -42,7 +42,7 @@ type ClientService interface { } /* - ServiceBindingBinding generations of a service binding +ServiceBindingBinding generations of a service binding */ func (a *Client) ServiceBindingBinding(params *ServiceBindingBindingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBindingBindingOK, *ServiceBindingBindingCreated, *ServiceBindingBindingAccepted, error) { // TODO: Validate the params before sending @@ -84,7 +84,7 @@ func (a *Client) ServiceBindingBinding(params *ServiceBindingBindingParams, auth } /* - ServiceBindingGet gets a service binding +ServiceBindingGet gets a service binding */ func (a *Client) ServiceBindingGet(params *ServiceBindingGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBindingGetOK, error) { // TODO: Validate the params before sending @@ -123,7 +123,7 @@ func (a *Client) ServiceBindingGet(params *ServiceBindingGetParams, authInfo run } /* - ServiceBindingLastOperationGet lasts requested operation state for service binding +ServiceBindingLastOperationGet lasts requested operation state for service binding */ func (a *Client) ServiceBindingLastOperationGet(params *ServiceBindingLastOperationGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBindingLastOperationGetOK, error) { // TODO: Validate the params before sending @@ -162,7 +162,7 @@ func (a *Client) ServiceBindingLastOperationGet(params *ServiceBindingLastOperat } /* - ServiceBindingUnbinding deprovisions of a service binding +ServiceBindingUnbinding deprovisions of a service binding */ func (a *Client) ServiceBindingUnbinding(params *ServiceBindingUnbindingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceBindingUnbindingOK, *ServiceBindingUnbindingAccepted, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_parameters.go index a9f8033ef78..45aa2dc2b4f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_parameters.go @@ -53,10 +53,12 @@ func NewServiceInstanceDeprovisionParamsWithHTTPClient(client *http.Client) *Ser } } -/* ServiceInstanceDeprovisionParams contains all the parameters to send to the API endpoint - for the service instance deprovision operation. +/* +ServiceInstanceDeprovisionParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service instance deprovision operation. + + Typically these are written to a http.Request. */ type ServiceInstanceDeprovisionParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_responses.go index 3c0425c6c45..9c2251ee84e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_deprovision_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +72,7 @@ func (o *ServiceInstanceDeprovisionReader) ReadResponse(response runtime.ClientR } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[DELETE /v2/service_instances/{instance_id}] serviceInstance.deprovision", response, response.Code()) } } @@ -69,7 +81,8 @@ func NewServiceInstanceDeprovisionOK() *ServiceInstanceDeprovisionOK { return &ServiceInstanceDeprovisionOK{} } -/* ServiceInstanceDeprovisionOK describes a response with status code 200, with default header values. +/* +ServiceInstanceDeprovisionOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +90,44 @@ type ServiceInstanceDeprovisionOK struct { Payload models.Object } +// IsSuccess returns true when this service instance deprovision o k response has a 2xx status code +func (o *ServiceInstanceDeprovisionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance deprovision o k response has a 3xx status code +func (o *ServiceInstanceDeprovisionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance deprovision o k response has a 4xx status code +func (o *ServiceInstanceDeprovisionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance deprovision o k response has a 5xx status code +func (o *ServiceInstanceDeprovisionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance deprovision o k response a status code equal to that given +func (o *ServiceInstanceDeprovisionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service instance deprovision o k response +func (o *ServiceInstanceDeprovisionOK) Code() int { + return 200 +} + func (o *ServiceInstanceDeprovisionOK) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionOK %+v", 200, o.Payload) } + +func (o *ServiceInstanceDeprovisionOK) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionOK %+v", 200, o.Payload) +} + func (o *ServiceInstanceDeprovisionOK) GetPayload() models.Object { return o.Payload } @@ -99,7 +147,8 @@ func NewServiceInstanceDeprovisionAccepted() *ServiceInstanceDeprovisionAccepted return &ServiceInstanceDeprovisionAccepted{} } -/* ServiceInstanceDeprovisionAccepted describes a response with status code 202, with default header values. +/* +ServiceInstanceDeprovisionAccepted describes a response with status code 202, with default header values. Accepted */ @@ -107,9 +156,44 @@ type ServiceInstanceDeprovisionAccepted struct { Payload *models.AsyncOperation } +// IsSuccess returns true when this service instance deprovision accepted response has a 2xx status code +func (o *ServiceInstanceDeprovisionAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance deprovision accepted response has a 3xx status code +func (o *ServiceInstanceDeprovisionAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance deprovision accepted response has a 4xx status code +func (o *ServiceInstanceDeprovisionAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance deprovision accepted response has a 5xx status code +func (o *ServiceInstanceDeprovisionAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance deprovision accepted response a status code equal to that given +func (o *ServiceInstanceDeprovisionAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the service instance deprovision accepted response +func (o *ServiceInstanceDeprovisionAccepted) Code() int { + return 202 +} + func (o *ServiceInstanceDeprovisionAccepted) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionAccepted %+v", 202, o.Payload) } + +func (o *ServiceInstanceDeprovisionAccepted) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionAccepted %+v", 202, o.Payload) +} + func (o *ServiceInstanceDeprovisionAccepted) GetPayload() *models.AsyncOperation { return o.Payload } @@ -131,7 +215,8 @@ func NewServiceInstanceDeprovisionBadRequest() *ServiceInstanceDeprovisionBadReq return &ServiceInstanceDeprovisionBadRequest{} } -/* ServiceInstanceDeprovisionBadRequest describes a response with status code 400, with default header values. +/* +ServiceInstanceDeprovisionBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -139,9 +224,44 @@ type ServiceInstanceDeprovisionBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service instance deprovision bad request response has a 2xx status code +func (o *ServiceInstanceDeprovisionBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance deprovision bad request response has a 3xx status code +func (o *ServiceInstanceDeprovisionBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance deprovision bad request response has a 4xx status code +func (o *ServiceInstanceDeprovisionBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance deprovision bad request response has a 5xx status code +func (o *ServiceInstanceDeprovisionBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance deprovision bad request response a status code equal to that given +func (o *ServiceInstanceDeprovisionBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service instance deprovision bad request response +func (o *ServiceInstanceDeprovisionBadRequest) Code() int { + return 400 +} + func (o *ServiceInstanceDeprovisionBadRequest) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionBadRequest %+v", 400, o.Payload) } + +func (o *ServiceInstanceDeprovisionBadRequest) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionBadRequest %+v", 400, o.Payload) +} + func (o *ServiceInstanceDeprovisionBadRequest) GetPayload() *models.Error { return o.Payload } @@ -163,7 +283,8 @@ func NewServiceInstanceDeprovisionUnauthorized() *ServiceInstanceDeprovisionUnau return &ServiceInstanceDeprovisionUnauthorized{} } -/* ServiceInstanceDeprovisionUnauthorized describes a response with status code 401, with default header values. +/* +ServiceInstanceDeprovisionUnauthorized describes a response with status code 401, with default header values. Unauthorized */ @@ -171,9 +292,44 @@ type ServiceInstanceDeprovisionUnauthorized struct { Payload *models.Error } +// IsSuccess returns true when this service instance deprovision unauthorized response has a 2xx status code +func (o *ServiceInstanceDeprovisionUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance deprovision unauthorized response has a 3xx status code +func (o *ServiceInstanceDeprovisionUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance deprovision unauthorized response has a 4xx status code +func (o *ServiceInstanceDeprovisionUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance deprovision unauthorized response has a 5xx status code +func (o *ServiceInstanceDeprovisionUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance deprovision unauthorized response a status code equal to that given +func (o *ServiceInstanceDeprovisionUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the service instance deprovision unauthorized response +func (o *ServiceInstanceDeprovisionUnauthorized) Code() int { + return 401 +} + func (o *ServiceInstanceDeprovisionUnauthorized) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnauthorized %+v", 401, o.Payload) } + +func (o *ServiceInstanceDeprovisionUnauthorized) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnauthorized %+v", 401, o.Payload) +} + func (o *ServiceInstanceDeprovisionUnauthorized) GetPayload() *models.Error { return o.Payload } @@ -190,12 +346,149 @@ 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{} } -/* ServiceInstanceDeprovisionGone describes a response with status code 410, with default header values. +/* +ServiceInstanceDeprovisionGone describes a response with status code 410, with default header values. Gone */ @@ -203,9 +496,44 @@ type ServiceInstanceDeprovisionGone struct { Payload *models.Error } +// IsSuccess returns true when this service instance deprovision gone response has a 2xx status code +func (o *ServiceInstanceDeprovisionGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance deprovision gone response has a 3xx status code +func (o *ServiceInstanceDeprovisionGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance deprovision gone response has a 4xx status code +func (o *ServiceInstanceDeprovisionGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance deprovision gone response has a 5xx status code +func (o *ServiceInstanceDeprovisionGone) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance deprovision gone response a status code equal to that given +func (o *ServiceInstanceDeprovisionGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the service instance deprovision gone response +func (o *ServiceInstanceDeprovisionGone) Code() int { + return 410 +} + func (o *ServiceInstanceDeprovisionGone) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionGone %+v", 410, o.Payload) } + +func (o *ServiceInstanceDeprovisionGone) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionGone %+v", 410, o.Payload) +} + func (o *ServiceInstanceDeprovisionGone) GetPayload() *models.Error { return o.Payload } @@ -227,7 +555,8 @@ func NewServiceInstanceDeprovisionUnprocessableEntity() *ServiceInstanceDeprovis return &ServiceInstanceDeprovisionUnprocessableEntity{} } -/* ServiceInstanceDeprovisionUnprocessableEntity describes a response with status code 422, with default header values. +/* +ServiceInstanceDeprovisionUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -235,9 +564,44 @@ type ServiceInstanceDeprovisionUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this service instance deprovision unprocessable entity response has a 2xx status code +func (o *ServiceInstanceDeprovisionUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance deprovision unprocessable entity response has a 3xx status code +func (o *ServiceInstanceDeprovisionUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance deprovision unprocessable entity response has a 4xx status code +func (o *ServiceInstanceDeprovisionUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance deprovision unprocessable entity response has a 5xx status code +func (o *ServiceInstanceDeprovisionUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance deprovision unprocessable entity response a status code equal to that given +func (o *ServiceInstanceDeprovisionUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the service instance deprovision unprocessable entity response +func (o *ServiceInstanceDeprovisionUnprocessableEntity) Code() int { + return 422 +} + func (o *ServiceInstanceDeprovisionUnprocessableEntity) Error() string { return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnprocessableEntity %+v", 422, o.Payload) } + +func (o *ServiceInstanceDeprovisionUnprocessableEntity) String() string { + return fmt.Sprintf("[DELETE /v2/service_instances/{instance_id}][%d] serviceInstanceDeprovisionUnprocessableEntity %+v", 422, o.Payload) +} + func (o *ServiceInstanceDeprovisionUnprocessableEntity) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_parameters.go index c3594fe6d0b..c931d3c17bc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceInstanceGetParamsWithHTTPClient(client *http.Client) *ServiceInst } } -/* ServiceInstanceGetParams contains all the parameters to send to the API endpoint - for the service instance get operation. +/* +ServiceInstanceGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service instance get operation. + + Typically these are written to a http.Request. */ type ServiceInstanceGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_responses.go index 94ecfeca2c9..f80a178fc43 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -36,7 +54,7 @@ func (o *ServiceInstanceGetReader) ReadResponse(response runtime.ClientResponse, } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /v2/service_instances/{instance_id}] serviceInstance.get", response, response.Code()) } } @@ -45,7 +63,8 @@ func NewServiceInstanceGetOK() *ServiceInstanceGetOK { return &ServiceInstanceGetOK{} } -/* ServiceInstanceGetOK describes a response with status code 200, with default header values. +/* +ServiceInstanceGetOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +72,44 @@ type ServiceInstanceGetOK struct { Payload *models.ServiceInstanceResource } +// IsSuccess returns true when this service instance get o k response has a 2xx status code +func (o *ServiceInstanceGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance get o k response has a 3xx status code +func (o *ServiceInstanceGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance get o k response has a 4xx status code +func (o *ServiceInstanceGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance get o k response has a 5xx status code +func (o *ServiceInstanceGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance get o k response a status code equal to that given +func (o *ServiceInstanceGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service instance get o k response +func (o *ServiceInstanceGetOK) Code() int { + return 200 +} + func (o *ServiceInstanceGetOK) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetOK %+v", 200, o.Payload) } + +func (o *ServiceInstanceGetOK) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetOK %+v", 200, o.Payload) +} + func (o *ServiceInstanceGetOK) GetPayload() *models.ServiceInstanceResource { return o.Payload } @@ -72,12 +126,217 @@ 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{} } -/* ServiceInstanceGetNotFound describes a response with status code 404, with default header values. +/* +ServiceInstanceGetNotFound describes a response with status code 404, with default header values. Not Found */ @@ -85,9 +344,44 @@ type ServiceInstanceGetNotFound struct { Payload *models.Error } +// IsSuccess returns true when this service instance get not found response has a 2xx status code +func (o *ServiceInstanceGetNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance get not found response has a 3xx status code +func (o *ServiceInstanceGetNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance get not found response has a 4xx status code +func (o *ServiceInstanceGetNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance get not found response has a 5xx status code +func (o *ServiceInstanceGetNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance get not found response a status code equal to that given +func (o *ServiceInstanceGetNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the service instance get not found response +func (o *ServiceInstanceGetNotFound) Code() int { + return 404 +} + func (o *ServiceInstanceGetNotFound) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetNotFound %+v", 404, o.Payload) } + +func (o *ServiceInstanceGetNotFound) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}][%d] serviceInstanceGetNotFound %+v", 404, o.Payload) +} + func (o *ServiceInstanceGetNotFound) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_parameters.go index 8c735cce5ef..9a08b521250 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceInstanceLastOperationGetParamsWithHTTPClient(client *http.Client) } } -/* ServiceInstanceLastOperationGetParams contains all the parameters to send to the API endpoint - for the service instance last operation get operation. +/* +ServiceInstanceLastOperationGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service instance last operation get operation. + + Typically these are written to a http.Request. */ type ServiceInstanceLastOperationGetParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_responses.go index 10e635bfcd5..866c00b5a00 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_last_operation_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -42,7 +60,7 @@ func (o *ServiceInstanceLastOperationGetReader) ReadResponse(response runtime.Cl } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /v2/service_instances/{instance_id}/last_operation] serviceInstance.lastOperation.get", response, response.Code()) } } @@ -51,7 +69,8 @@ func NewServiceInstanceLastOperationGetOK() *ServiceInstanceLastOperationGetOK { return &ServiceInstanceLastOperationGetOK{} } -/* ServiceInstanceLastOperationGetOK describes a response with status code 200, with default header values. +/* +ServiceInstanceLastOperationGetOK describes a response with status code 200, with default header values. OK */ @@ -59,9 +78,44 @@ type ServiceInstanceLastOperationGetOK struct { Payload *models.LastOperationResource } +// IsSuccess returns true when this service instance last operation get o k response has a 2xx status code +func (o *ServiceInstanceLastOperationGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance last operation get o k response has a 3xx status code +func (o *ServiceInstanceLastOperationGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance last operation get o k response has a 4xx status code +func (o *ServiceInstanceLastOperationGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance last operation get o k response has a 5xx status code +func (o *ServiceInstanceLastOperationGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance last operation get o k response a status code equal to that given +func (o *ServiceInstanceLastOperationGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service instance last operation get o k response +func (o *ServiceInstanceLastOperationGetOK) Code() int { + return 200 +} + func (o *ServiceInstanceLastOperationGetOK) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetOK %+v", 200, o.Payload) } + +func (o *ServiceInstanceLastOperationGetOK) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetOK %+v", 200, o.Payload) +} + func (o *ServiceInstanceLastOperationGetOK) GetPayload() *models.LastOperationResource { return o.Payload } @@ -83,7 +137,8 @@ func NewServiceInstanceLastOperationGetBadRequest() *ServiceInstanceLastOperatio return &ServiceInstanceLastOperationGetBadRequest{} } -/* ServiceInstanceLastOperationGetBadRequest describes a response with status code 400, with default header values. +/* +ServiceInstanceLastOperationGetBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -91,9 +146,44 @@ type ServiceInstanceLastOperationGetBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service instance last operation get bad request response has a 2xx status code +func (o *ServiceInstanceLastOperationGetBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance last operation get bad request response has a 3xx status code +func (o *ServiceInstanceLastOperationGetBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance last operation get bad request response has a 4xx status code +func (o *ServiceInstanceLastOperationGetBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance last operation get bad request response has a 5xx status code +func (o *ServiceInstanceLastOperationGetBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance last operation get bad request response a status code equal to that given +func (o *ServiceInstanceLastOperationGetBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service instance last operation get bad request response +func (o *ServiceInstanceLastOperationGetBadRequest) Code() int { + return 400 +} + func (o *ServiceInstanceLastOperationGetBadRequest) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetBadRequest %+v", 400, o.Payload) } + +func (o *ServiceInstanceLastOperationGetBadRequest) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetBadRequest %+v", 400, o.Payload) +} + func (o *ServiceInstanceLastOperationGetBadRequest) GetPayload() *models.Error { return o.Payload } @@ -110,12 +200,217 @@ 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{} } -/* ServiceInstanceLastOperationGetGone describes a response with status code 410, with default header values. +/* +ServiceInstanceLastOperationGetGone describes a response with status code 410, with default header values. Gone */ @@ -123,9 +418,44 @@ type ServiceInstanceLastOperationGetGone struct { Payload *models.Error } +// IsSuccess returns true when this service instance last operation get gone response has a 2xx status code +func (o *ServiceInstanceLastOperationGetGone) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance last operation get gone response has a 3xx status code +func (o *ServiceInstanceLastOperationGetGone) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance last operation get gone response has a 4xx status code +func (o *ServiceInstanceLastOperationGetGone) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance last operation get gone response has a 5xx status code +func (o *ServiceInstanceLastOperationGetGone) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance last operation get gone response a status code equal to that given +func (o *ServiceInstanceLastOperationGetGone) IsCode(code int) bool { + return code == 410 +} + +// Code gets the status code for the service instance last operation get gone response +func (o *ServiceInstanceLastOperationGetGone) Code() int { + return 410 +} + func (o *ServiceInstanceLastOperationGetGone) Error() string { return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetGone %+v", 410, o.Payload) } + +func (o *ServiceInstanceLastOperationGetGone) String() string { + return fmt.Sprintf("[GET /v2/service_instances/{instance_id}/last_operation][%d] serviceInstanceLastOperationGetGone %+v", 410, o.Payload) +} + func (o *ServiceInstanceLastOperationGetGone) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_parameters.go index 89458c04fcd..3769157594e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_parameters.go @@ -55,10 +55,12 @@ func NewServiceInstanceProvisionParamsWithHTTPClient(client *http.Client) *Servi } } -/* ServiceInstanceProvisionParams contains all the parameters to send to the API endpoint - for the service instance provision operation. +/* +ServiceInstanceProvisionParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service instance provision operation. + + Typically these are written to a http.Request. */ type ServiceInstanceProvisionParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_responses.go index 1b457b956aa..89e977add60 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_provision_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -60,7 +78,7 @@ func (o *ServiceInstanceProvisionReader) ReadResponse(response runtime.ClientRes } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PUT /v2/service_instances/{instance_id}] serviceInstance.provision", response, response.Code()) } } @@ -69,7 +87,8 @@ func NewServiceInstanceProvisionOK() *ServiceInstanceProvisionOK { return &ServiceInstanceProvisionOK{} } -/* ServiceInstanceProvisionOK describes a response with status code 200, with default header values. +/* +ServiceInstanceProvisionOK describes a response with status code 200, with default header values. OK */ @@ -77,9 +96,44 @@ type ServiceInstanceProvisionOK struct { Payload *models.ServiceInstanceProvision } +// IsSuccess returns true when this service instance provision o k response has a 2xx status code +func (o *ServiceInstanceProvisionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance provision o k response has a 3xx status code +func (o *ServiceInstanceProvisionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision o k response has a 4xx status code +func (o *ServiceInstanceProvisionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance provision o k response has a 5xx status code +func (o *ServiceInstanceProvisionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision o k response a status code equal to that given +func (o *ServiceInstanceProvisionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service instance provision o k response +func (o *ServiceInstanceProvisionOK) Code() int { + return 200 +} + func (o *ServiceInstanceProvisionOK) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionOK %+v", 200, o.Payload) } + +func (o *ServiceInstanceProvisionOK) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionOK %+v", 200, o.Payload) +} + func (o *ServiceInstanceProvisionOK) GetPayload() *models.ServiceInstanceProvision { return o.Payload } @@ -101,7 +155,8 @@ func NewServiceInstanceProvisionCreated() *ServiceInstanceProvisionCreated { return &ServiceInstanceProvisionCreated{} } -/* ServiceInstanceProvisionCreated describes a response with status code 201, with default header values. +/* +ServiceInstanceProvisionCreated describes a response with status code 201, with default header values. Created */ @@ -109,9 +164,44 @@ type ServiceInstanceProvisionCreated struct { Payload *models.ServiceInstanceProvision } +// IsSuccess returns true when this service instance provision created response has a 2xx status code +func (o *ServiceInstanceProvisionCreated) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance provision created response has a 3xx status code +func (o *ServiceInstanceProvisionCreated) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision created response has a 4xx status code +func (o *ServiceInstanceProvisionCreated) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance provision created response has a 5xx status code +func (o *ServiceInstanceProvisionCreated) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision created response a status code equal to that given +func (o *ServiceInstanceProvisionCreated) IsCode(code int) bool { + return code == 201 +} + +// Code gets the status code for the service instance provision created response +func (o *ServiceInstanceProvisionCreated) Code() int { + return 201 +} + func (o *ServiceInstanceProvisionCreated) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionCreated %+v", 201, o.Payload) } + +func (o *ServiceInstanceProvisionCreated) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionCreated %+v", 201, o.Payload) +} + func (o *ServiceInstanceProvisionCreated) GetPayload() *models.ServiceInstanceProvision { return o.Payload } @@ -133,7 +223,8 @@ func NewServiceInstanceProvisionAccepted() *ServiceInstanceProvisionAccepted { return &ServiceInstanceProvisionAccepted{} } -/* ServiceInstanceProvisionAccepted describes a response with status code 202, with default header values. +/* +ServiceInstanceProvisionAccepted describes a response with status code 202, with default header values. Accepted */ @@ -141,9 +232,44 @@ type ServiceInstanceProvisionAccepted struct { Payload *models.ServiceInstanceAsyncOperation } +// IsSuccess returns true when this service instance provision accepted response has a 2xx status code +func (o *ServiceInstanceProvisionAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance provision accepted response has a 3xx status code +func (o *ServiceInstanceProvisionAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision accepted response has a 4xx status code +func (o *ServiceInstanceProvisionAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance provision accepted response has a 5xx status code +func (o *ServiceInstanceProvisionAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision accepted response a status code equal to that given +func (o *ServiceInstanceProvisionAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the service instance provision accepted response +func (o *ServiceInstanceProvisionAccepted) Code() int { + return 202 +} + func (o *ServiceInstanceProvisionAccepted) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionAccepted %+v", 202, o.Payload) } + +func (o *ServiceInstanceProvisionAccepted) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionAccepted %+v", 202, o.Payload) +} + func (o *ServiceInstanceProvisionAccepted) GetPayload() *models.ServiceInstanceAsyncOperation { return o.Payload } @@ -165,7 +291,8 @@ func NewServiceInstanceProvisionBadRequest() *ServiceInstanceProvisionBadRequest return &ServiceInstanceProvisionBadRequest{} } -/* ServiceInstanceProvisionBadRequest describes a response with status code 400, with default header values. +/* +ServiceInstanceProvisionBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -173,9 +300,44 @@ type ServiceInstanceProvisionBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service instance provision bad request response has a 2xx status code +func (o *ServiceInstanceProvisionBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance provision bad request response has a 3xx status code +func (o *ServiceInstanceProvisionBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision bad request response has a 4xx status code +func (o *ServiceInstanceProvisionBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance provision bad request response has a 5xx status code +func (o *ServiceInstanceProvisionBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision bad request response a status code equal to that given +func (o *ServiceInstanceProvisionBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service instance provision bad request response +func (o *ServiceInstanceProvisionBadRequest) Code() int { + return 400 +} + func (o *ServiceInstanceProvisionBadRequest) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionBadRequest %+v", 400, o.Payload) } + +func (o *ServiceInstanceProvisionBadRequest) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionBadRequest %+v", 400, o.Payload) +} + func (o *ServiceInstanceProvisionBadRequest) GetPayload() *models.Error { return o.Payload } @@ -192,12 +354,217 @@ 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{} } -/* ServiceInstanceProvisionConflict describes a response with status code 409, with default header values. +/* +ServiceInstanceProvisionConflict describes a response with status code 409, with default header values. Conflict */ @@ -205,9 +572,44 @@ type ServiceInstanceProvisionConflict struct { Payload *models.Error } +// IsSuccess returns true when this service instance provision conflict response has a 2xx status code +func (o *ServiceInstanceProvisionConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance provision conflict response has a 3xx status code +func (o *ServiceInstanceProvisionConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision conflict response has a 4xx status code +func (o *ServiceInstanceProvisionConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance provision conflict response has a 5xx status code +func (o *ServiceInstanceProvisionConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision conflict response a status code equal to that given +func (o *ServiceInstanceProvisionConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the service instance provision conflict response +func (o *ServiceInstanceProvisionConflict) Code() int { + return 409 +} + func (o *ServiceInstanceProvisionConflict) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionConflict %+v", 409, o.Payload) } + +func (o *ServiceInstanceProvisionConflict) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionConflict %+v", 409, o.Payload) +} + func (o *ServiceInstanceProvisionConflict) GetPayload() *models.Error { return o.Payload } @@ -229,7 +631,8 @@ func NewServiceInstanceProvisionUnprocessableEntity() *ServiceInstanceProvisionU return &ServiceInstanceProvisionUnprocessableEntity{} } -/* ServiceInstanceProvisionUnprocessableEntity describes a response with status code 422, with default header values. +/* +ServiceInstanceProvisionUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity */ @@ -237,9 +640,44 @@ type ServiceInstanceProvisionUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this service instance provision unprocessable entity response has a 2xx status code +func (o *ServiceInstanceProvisionUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance provision unprocessable entity response has a 3xx status code +func (o *ServiceInstanceProvisionUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance provision unprocessable entity response has a 4xx status code +func (o *ServiceInstanceProvisionUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance provision unprocessable entity response has a 5xx status code +func (o *ServiceInstanceProvisionUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance provision unprocessable entity response a status code equal to that given +func (o *ServiceInstanceProvisionUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the service instance provision unprocessable entity response +func (o *ServiceInstanceProvisionUnprocessableEntity) Code() int { + return 422 +} + func (o *ServiceInstanceProvisionUnprocessableEntity) Error() string { return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnprocessableEntity %+v", 422, o.Payload) } + +func (o *ServiceInstanceProvisionUnprocessableEntity) String() string { + return fmt.Sprintf("[PUT /v2/service_instances/{instance_id}][%d] serviceInstanceProvisionUnprocessableEntity %+v", 422, o.Payload) +} + func (o *ServiceInstanceProvisionUnprocessableEntity) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_parameters.go index 0e27172b211..669fdcff222 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_parameters.go @@ -55,10 +55,12 @@ func NewServiceInstanceUpdateParamsWithHTTPClient(client *http.Client) *ServiceI } } -/* ServiceInstanceUpdateParams contains all the parameters to send to the API endpoint - for the service instance update operation. +/* +ServiceInstanceUpdateParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service instance update operation. + + Typically these are written to a http.Request. */ type ServiceInstanceUpdateParams struct { diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_responses.go index b86564971bb..eeb9bd7cf76 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instance_update_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 { @@ -48,7 +66,7 @@ func (o *ServiceInstanceUpdateReader) ReadResponse(response runtime.ClientRespon } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[PATCH /v2/service_instances/{instance_id}] serviceInstance.update", response, response.Code()) } } @@ -57,7 +75,8 @@ func NewServiceInstanceUpdateOK() *ServiceInstanceUpdateOK { return &ServiceInstanceUpdateOK{} } -/* ServiceInstanceUpdateOK describes a response with status code 200, with default header values. +/* +ServiceInstanceUpdateOK describes a response with status code 200, with default header values. OK */ @@ -65,9 +84,44 @@ type ServiceInstanceUpdateOK struct { Payload models.Object } +// IsSuccess returns true when this service instance update o k response has a 2xx status code +func (o *ServiceInstanceUpdateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance update o k response has a 3xx status code +func (o *ServiceInstanceUpdateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance update o k response has a 4xx status code +func (o *ServiceInstanceUpdateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance update o k response has a 5xx status code +func (o *ServiceInstanceUpdateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance update o k response a status code equal to that given +func (o *ServiceInstanceUpdateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service instance update o k response +func (o *ServiceInstanceUpdateOK) Code() int { + return 200 +} + func (o *ServiceInstanceUpdateOK) Error() string { return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateOK %+v", 200, o.Payload) } + +func (o *ServiceInstanceUpdateOK) String() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateOK %+v", 200, o.Payload) +} + func (o *ServiceInstanceUpdateOK) GetPayload() models.Object { return o.Payload } @@ -87,7 +141,8 @@ func NewServiceInstanceUpdateAccepted() *ServiceInstanceUpdateAccepted { return &ServiceInstanceUpdateAccepted{} } -/* ServiceInstanceUpdateAccepted describes a response with status code 202, with default header values. +/* +ServiceInstanceUpdateAccepted describes a response with status code 202, with default header values. Accepted */ @@ -95,9 +150,44 @@ type ServiceInstanceUpdateAccepted struct { Payload *models.ServiceInstanceAsyncOperation } +// IsSuccess returns true when this service instance update accepted response has a 2xx status code +func (o *ServiceInstanceUpdateAccepted) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service instance update accepted response has a 3xx status code +func (o *ServiceInstanceUpdateAccepted) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance update accepted response has a 4xx status code +func (o *ServiceInstanceUpdateAccepted) IsClientError() bool { + return false +} + +// IsServerError returns true when this service instance update accepted response has a 5xx status code +func (o *ServiceInstanceUpdateAccepted) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance update accepted response a status code equal to that given +func (o *ServiceInstanceUpdateAccepted) IsCode(code int) bool { + return code == 202 +} + +// Code gets the status code for the service instance update accepted response +func (o *ServiceInstanceUpdateAccepted) Code() int { + return 202 +} + func (o *ServiceInstanceUpdateAccepted) Error() string { return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateAccepted %+v", 202, o.Payload) } + +func (o *ServiceInstanceUpdateAccepted) String() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateAccepted %+v", 202, o.Payload) +} + func (o *ServiceInstanceUpdateAccepted) GetPayload() *models.ServiceInstanceAsyncOperation { return o.Payload } @@ -119,7 +209,8 @@ func NewServiceInstanceUpdateBadRequest() *ServiceInstanceUpdateBadRequest { return &ServiceInstanceUpdateBadRequest{} } -/* ServiceInstanceUpdateBadRequest describes a response with status code 400, with default header values. +/* +ServiceInstanceUpdateBadRequest describes a response with status code 400, with default header values. Bad Request */ @@ -127,9 +218,44 @@ type ServiceInstanceUpdateBadRequest struct { Payload *models.Error } +// IsSuccess returns true when this service instance update bad request response has a 2xx status code +func (o *ServiceInstanceUpdateBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance update bad request response has a 3xx status code +func (o *ServiceInstanceUpdateBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance update bad request response has a 4xx status code +func (o *ServiceInstanceUpdateBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance update bad request response has a 5xx status code +func (o *ServiceInstanceUpdateBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance update bad request response a status code equal to that given +func (o *ServiceInstanceUpdateBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the service instance update bad request response +func (o *ServiceInstanceUpdateBadRequest) Code() int { + return 400 +} + func (o *ServiceInstanceUpdateBadRequest) Error() string { return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateBadRequest %+v", 400, o.Payload) } + +func (o *ServiceInstanceUpdateBadRequest) String() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateBadRequest %+v", 400, o.Payload) +} + func (o *ServiceInstanceUpdateBadRequest) GetPayload() *models.Error { return o.Payload } @@ -146,12 +272,217 @@ 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{} } -/* ServiceInstanceUpdateUnprocessableEntity describes a response with status code 422, with default header values. +/* +ServiceInstanceUpdateUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable entity */ @@ -159,9 +490,44 @@ type ServiceInstanceUpdateUnprocessableEntity struct { Payload *models.Error } +// IsSuccess returns true when this service instance update unprocessable entity response has a 2xx status code +func (o *ServiceInstanceUpdateUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service instance update unprocessable entity response has a 3xx status code +func (o *ServiceInstanceUpdateUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service instance update unprocessable entity response has a 4xx status code +func (o *ServiceInstanceUpdateUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this service instance update unprocessable entity response has a 5xx status code +func (o *ServiceInstanceUpdateUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this service instance update unprocessable entity response a status code equal to that given +func (o *ServiceInstanceUpdateUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the service instance update unprocessable entity response +func (o *ServiceInstanceUpdateUnprocessableEntity) Code() int { + return 422 +} + func (o *ServiceInstanceUpdateUnprocessableEntity) Error() string { return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnprocessableEntity %+v", 422, o.Payload) } + +func (o *ServiceInstanceUpdateUnprocessableEntity) String() string { + return fmt.Sprintf("[PATCH /v2/service_instances/{instance_id}][%d] serviceInstanceUpdateUnprocessableEntity %+v", 422, o.Payload) +} + func (o *ServiceInstanceUpdateUnprocessableEntity) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instances_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instances_client.go index 13b07b16890..9dc2833e336 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instances_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/service_instances/service_instances_client.go @@ -44,7 +44,7 @@ type ClientService interface { } /* - ServiceInstanceDeprovision deprovisions a service instance +ServiceInstanceDeprovision deprovisions a service instance */ func (a *Client) ServiceInstanceDeprovision(params *ServiceInstanceDeprovisionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceDeprovisionOK, *ServiceInstanceDeprovisionAccepted, error) { // TODO: Validate the params before sending @@ -84,7 +84,7 @@ func (a *Client) ServiceInstanceDeprovision(params *ServiceInstanceDeprovisionPa } /* - ServiceInstanceGet gets a service instance +ServiceInstanceGet gets a service instance */ func (a *Client) ServiceInstanceGet(params *ServiceInstanceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceGetOK, error) { // TODO: Validate the params before sending @@ -123,7 +123,7 @@ func (a *Client) ServiceInstanceGet(params *ServiceInstanceGetParams, authInfo r } /* - ServiceInstanceLastOperationGet lasts requested operation state for service instance +ServiceInstanceLastOperationGet lasts requested operation state for service instance */ func (a *Client) ServiceInstanceLastOperationGet(params *ServiceInstanceLastOperationGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceLastOperationGetOK, error) { // TODO: Validate the params before sending @@ -162,7 +162,7 @@ func (a *Client) ServiceInstanceLastOperationGet(params *ServiceInstanceLastOper } /* - ServiceInstanceProvision provisions a service instance +ServiceInstanceProvision provisions a service instance */ func (a *Client) ServiceInstanceProvision(params *ServiceInstanceProvisionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceProvisionOK, *ServiceInstanceProvisionCreated, *ServiceInstanceProvisionAccepted, error) { // TODO: Validate the params before sending @@ -204,7 +204,7 @@ func (a *Client) ServiceInstanceProvision(params *ServiceInstanceProvisionParams } /* - ServiceInstanceUpdate updates a service instance +ServiceInstanceUpdate updates a service instance */ func (a *Client) ServiceInstanceUpdate(params *ServiceInstanceUpdateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ServiceInstanceUpdateOK, *ServiceInstanceUpdateAccepted, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_parameters.go index 932bb7a0e93..81cd3a2985c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerStoragetypesGetParamsWithHTTPClient(client *http.Client) *S } } -/* ServiceBrokerStoragetypesGetParams contains all the parameters to send to the API endpoint - for the service broker storagetypes get operation. +/* +ServiceBrokerStoragetypesGetParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker storagetypes get operation. + + Typically these are written to a http.Request. */ type ServiceBrokerStoragetypesGetParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_responses.go index 30d420dd824..e1fb7e6b0b4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/service_broker_storagetypes_get_responses.go @@ -29,6 +29,36 @@ 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 { + return nil, err + } + return nil, result case 500: result := NewServiceBrokerStoragetypesGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -36,7 +66,7 @@ func (o *ServiceBrokerStoragetypesGetReader) ReadResponse(response runtime.Clien } return nil, result default: - return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /broker/v1/storage-types] serviceBroker.storagetypes.get", response, response.Code()) } } @@ -45,7 +75,8 @@ func NewServiceBrokerStoragetypesGetOK() *ServiceBrokerStoragetypesGetOK { return &ServiceBrokerStoragetypesGetOK{} } -/* ServiceBrokerStoragetypesGetOK describes a response with status code 200, with default header values. +/* +ServiceBrokerStoragetypesGetOK describes a response with status code 200, with default header values. OK */ @@ -53,9 +84,44 @@ type ServiceBrokerStoragetypesGetOK struct { Payload models.StorageTypes } +// IsSuccess returns true when this service broker storagetypes get o k response has a 2xx status code +func (o *ServiceBrokerStoragetypesGetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker storagetypes get o k response has a 3xx status code +func (o *ServiceBrokerStoragetypesGetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker storagetypes get o k response has a 4xx status code +func (o *ServiceBrokerStoragetypesGetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker storagetypes get o k response has a 5xx status code +func (o *ServiceBrokerStoragetypesGetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker storagetypes get o k response a status code equal to that given +func (o *ServiceBrokerStoragetypesGetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker storagetypes get o k response +func (o *ServiceBrokerStoragetypesGetOK) Code() int { + return 200 +} + func (o *ServiceBrokerStoragetypesGetOK) Error() string { return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerStoragetypesGetOK) String() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerStoragetypesGetOK) GetPayload() models.StorageTypes { return o.Payload } @@ -70,12 +136,353 @@ 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{} +} + +/* +ServiceBrokerStoragetypesGetUnprocessableEntity describes a response with status code 422, with default header values. + +Unprocessable Entity +*/ +type ServiceBrokerStoragetypesGetUnprocessableEntity struct { + Payload *models.Error +} + +// IsSuccess returns true when this service broker storagetypes get unprocessable entity response has a 2xx status code +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker storagetypes get unprocessable entity response has a 3xx status code +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker storagetypes get unprocessable entity response has a 4xx status code +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) IsClientError() bool { + return true +} + +// IsServerError returns true when this service broker storagetypes get unprocessable entity response has a 5xx status code +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker storagetypes get unprocessable entity response a status code equal to that given +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) IsCode(code int) bool { + return code == 422 +} + +// Code gets the status code for the service broker storagetypes get unprocessable entity response +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) Code() int { + return 422 +} + +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) String() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) GetPayload() *models.Error { + return o.Payload +} + +func (o *ServiceBrokerStoragetypesGetUnprocessableEntity) 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 +} + // NewServiceBrokerStoragetypesGetInternalServerError creates a ServiceBrokerStoragetypesGetInternalServerError with default headers values func NewServiceBrokerStoragetypesGetInternalServerError() *ServiceBrokerStoragetypesGetInternalServerError { return &ServiceBrokerStoragetypesGetInternalServerError{} } -/* ServiceBrokerStoragetypesGetInternalServerError describes a response with status code 500, with default header values. +/* +ServiceBrokerStoragetypesGetInternalServerError describes a response with status code 500, with default header values. Internal Server Error */ @@ -83,9 +490,44 @@ type ServiceBrokerStoragetypesGetInternalServerError struct { Payload *models.Error } +// IsSuccess returns true when this service broker storagetypes get internal server error response has a 2xx status code +func (o *ServiceBrokerStoragetypesGetInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this service broker storagetypes get internal server error response has a 3xx status code +func (o *ServiceBrokerStoragetypesGetInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker storagetypes get internal server error response has a 4xx status code +func (o *ServiceBrokerStoragetypesGetInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker storagetypes get internal server error response has a 5xx status code +func (o *ServiceBrokerStoragetypesGetInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this service broker storagetypes get internal server error response a status code equal to that given +func (o *ServiceBrokerStoragetypesGetInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the service broker storagetypes get internal server error response +func (o *ServiceBrokerStoragetypesGetInternalServerError) Code() int { + return 500 +} + func (o *ServiceBrokerStoragetypesGetInternalServerError) Error() string { return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetInternalServerError %+v", 500, o.Payload) } + +func (o *ServiceBrokerStoragetypesGetInternalServerError) String() string { + return fmt.Sprintf("[GET /broker/v1/storage-types][%d] serviceBrokerStoragetypesGetInternalServerError %+v", 500, o.Payload) +} + func (o *ServiceBrokerStoragetypesGetInternalServerError) GetPayload() *models.Error { return o.Payload } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/storage_types_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/storage_types_client.go index 5adc4f1ed4f..7a981903086 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/storage_types_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/storage_types/storage_types_client.go @@ -36,7 +36,11 @@ type ClientService interface { } /* - ServiceBrokerStoragetypesGet availables storage types in a region + ServiceBrokerStoragetypesGet availables storage types in a region + + This API is deprecated for /pcloud/v1/cloud-instances/{cloud_instance_id}/storage-tiers. + +>*Note*: Support for this API will be available till 31st October 2023. */ func (a *Client) ServiceBrokerStoragetypesGet(params *ServiceBrokerStoragetypesGetParams, opts ...ClientOption) (*ServiceBrokerStoragetypesGetOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_parameters.go index 12c76c9d807..42725e2a6d1 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_parameters.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_parameters.go @@ -52,10 +52,12 @@ func NewServiceBrokerSwaggerspecParamsWithHTTPClient(client *http.Client) *Servi } } -/* ServiceBrokerSwaggerspecParams contains all the parameters to send to the API endpoint - for the service broker swaggerspec operation. +/* +ServiceBrokerSwaggerspecParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the service broker swaggerspec operation. + + Typically these are written to a http.Request. */ type ServiceBrokerSwaggerspecParams struct { timeout time.Duration diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_responses.go index 7f37f6cdbd7..8e4459442c6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_responses.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/service_broker_swaggerspec_responses.go @@ -29,8 +29,32 @@ 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("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + return nil, runtime.NewAPIError("[GET /v1/swagger.json] serviceBroker.swaggerspec", response, response.Code()) } } @@ -39,7 +63,8 @@ func NewServiceBrokerSwaggerspecOK() *ServiceBrokerSwaggerspecOK { return &ServiceBrokerSwaggerspecOK{} } -/* ServiceBrokerSwaggerspecOK describes a response with status code 200, with default header values. +/* +ServiceBrokerSwaggerspecOK describes a response with status code 200, with default header values. OK */ @@ -47,9 +72,44 @@ type ServiceBrokerSwaggerspecOK struct { Payload models.Object } +// IsSuccess returns true when this service broker swaggerspec o k response has a 2xx status code +func (o *ServiceBrokerSwaggerspecOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this service broker swaggerspec o k response has a 3xx status code +func (o *ServiceBrokerSwaggerspecOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this service broker swaggerspec o k response has a 4xx status code +func (o *ServiceBrokerSwaggerspecOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this service broker swaggerspec o k response has a 5xx status code +func (o *ServiceBrokerSwaggerspecOK) IsServerError() bool { + return false +} + +// IsCode returns true when this service broker swaggerspec o k response a status code equal to that given +func (o *ServiceBrokerSwaggerspecOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the service broker swaggerspec o k response +func (o *ServiceBrokerSwaggerspecOK) Code() int { + return 200 +} + func (o *ServiceBrokerSwaggerspecOK) Error() string { return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecOK %+v", 200, o.Payload) } + +func (o *ServiceBrokerSwaggerspecOK) String() string { + return fmt.Sprintf("[GET /v1/swagger.json][%d] serviceBrokerSwaggerspecOK %+v", 200, o.Payload) +} + func (o *ServiceBrokerSwaggerspecOK) GetPayload() models.Object { return o.Payload } @@ -63,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/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/swagger_spec_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/swagger_spec_client.go index d6ba1ec15ab..32228ff381a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/swagger_spec_client.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/swagger_spec/swagger_spec_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - ServiceBrokerSwaggerspec gets swagger json spec +ServiceBrokerSwaggerspec gets swagger json spec */ func (a *Client) ServiceBrokerSwaggerspec(params *ServiceBrokerSwaggerspecParams, opts ...ClientOption) (*ServiceBrokerSwaggerspecOK, error) { // TODO: Validate the params before sending diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_parameters.go new file mode 100644 index 00000000000..9cf5760cd51 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/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/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_get_responses.go new file mode 100644 index 00000000000..e04a3ee5b1c --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/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/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_parameters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_parameters.go new file mode 100644 index 00000000000..7e777b84828 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_parameters.go @@ -0,0 +1,128 @@ +// 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" +) + +// NewV1WorkspacesGetallParams creates a new V1WorkspacesGetallParams 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 NewV1WorkspacesGetallParams() *V1WorkspacesGetallParams { + return &V1WorkspacesGetallParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesGetallParamsWithTimeout creates a new V1WorkspacesGetallParams object +// with the ability to set a timeout on a request. +func NewV1WorkspacesGetallParamsWithTimeout(timeout time.Duration) *V1WorkspacesGetallParams { + return &V1WorkspacesGetallParams{ + timeout: timeout, + } +} + +// NewV1WorkspacesGetallParamsWithContext creates a new V1WorkspacesGetallParams object +// with the ability to set a context for a request. +func NewV1WorkspacesGetallParamsWithContext(ctx context.Context) *V1WorkspacesGetallParams { + return &V1WorkspacesGetallParams{ + Context: ctx, + } +} + +// NewV1WorkspacesGetallParamsWithHTTPClient creates a new V1WorkspacesGetallParams object +// with the ability to set a custom HTTPClient for a request. +func NewV1WorkspacesGetallParamsWithHTTPClient(client *http.Client) *V1WorkspacesGetallParams { + return &V1WorkspacesGetallParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesGetallParams contains all the parameters to send to the API endpoint + + for the v1 workspaces getall operation. + + Typically these are written to a http.Request. +*/ +type V1WorkspacesGetallParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the v1 workspaces getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1WorkspacesGetallParams) WithDefaults() *V1WorkspacesGetallParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the v1 workspaces getall params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *V1WorkspacesGetallParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the v1 workspaces getall params +func (o *V1WorkspacesGetallParams) WithTimeout(timeout time.Duration) *V1WorkspacesGetallParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces getall params +func (o *V1WorkspacesGetallParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces getall params +func (o *V1WorkspacesGetallParams) WithContext(ctx context.Context) *V1WorkspacesGetallParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces getall params +func (o *V1WorkspacesGetallParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces getall params +func (o *V1WorkspacesGetallParams) WithHTTPClient(client *http.Client) *V1WorkspacesGetallParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces getall params +func (o *V1WorkspacesGetallParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesGetallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_responses.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_responses.go new file mode 100644 index 00000000000..671dc336097 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/v1_workspaces_getall_responses.go @@ -0,0 +1,399 @@ +// 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" +) + +// V1WorkspacesGetallReader is a Reader for the V1WorkspacesGetall structure. +type V1WorkspacesGetallReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesGetallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1WorkspacesGetallOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewV1WorkspacesGetallUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewV1WorkspacesGetallForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 429: + result := NewV1WorkspacesGetallTooManyRequests() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewV1WorkspacesGetallInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("[GET /v1/workspaces] v1.workspaces.getall", response, response.Code()) + } +} + +// NewV1WorkspacesGetallOK creates a V1WorkspacesGetallOK with default headers values +func NewV1WorkspacesGetallOK() *V1WorkspacesGetallOK { + return &V1WorkspacesGetallOK{} +} + +/* +V1WorkspacesGetallOK describes a response with status code 200, with default header values. + +OK +*/ +type V1WorkspacesGetallOK struct { + Payload *models.Workspaces +} + +// IsSuccess returns true when this v1 workspaces getall o k response has a 2xx status code +func (o *V1WorkspacesGetallOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this v1 workspaces getall o k response has a 3xx status code +func (o *V1WorkspacesGetallOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces getall o k response has a 4xx status code +func (o *V1WorkspacesGetallOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 workspaces getall o k response has a 5xx status code +func (o *V1WorkspacesGetallOK) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces getall o k response a status code equal to that given +func (o *V1WorkspacesGetallOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the v1 workspaces getall o k response +func (o *V1WorkspacesGetallOK) Code() int { + return 200 +} + +func (o *V1WorkspacesGetallOK) Error() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallOK %+v", 200, o.Payload) +} + +func (o *V1WorkspacesGetallOK) String() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallOK %+v", 200, o.Payload) +} + +func (o *V1WorkspacesGetallOK) GetPayload() *models.Workspaces { + return o.Payload +} + +func (o *V1WorkspacesGetallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Workspaces) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewV1WorkspacesGetallUnauthorized creates a V1WorkspacesGetallUnauthorized with default headers values +func NewV1WorkspacesGetallUnauthorized() *V1WorkspacesGetallUnauthorized { + return &V1WorkspacesGetallUnauthorized{} +} + +/* +V1WorkspacesGetallUnauthorized describes a response with status code 401, with default header values. + +Unauthorized +*/ +type V1WorkspacesGetallUnauthorized struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces getall unauthorized response has a 2xx status code +func (o *V1WorkspacesGetallUnauthorized) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces getall unauthorized response has a 3xx status code +func (o *V1WorkspacesGetallUnauthorized) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces getall unauthorized response has a 4xx status code +func (o *V1WorkspacesGetallUnauthorized) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 workspaces getall unauthorized response has a 5xx status code +func (o *V1WorkspacesGetallUnauthorized) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces getall unauthorized response a status code equal to that given +func (o *V1WorkspacesGetallUnauthorized) IsCode(code int) bool { + return code == 401 +} + +// Code gets the status code for the v1 workspaces getall unauthorized response +func (o *V1WorkspacesGetallUnauthorized) Code() int { + return 401 +} + +func (o *V1WorkspacesGetallUnauthorized) Error() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *V1WorkspacesGetallUnauthorized) String() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallUnauthorized %+v", 401, o.Payload) +} + +func (o *V1WorkspacesGetallUnauthorized) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetallUnauthorized) 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 +} + +// NewV1WorkspacesGetallForbidden creates a V1WorkspacesGetallForbidden with default headers values +func NewV1WorkspacesGetallForbidden() *V1WorkspacesGetallForbidden { + return &V1WorkspacesGetallForbidden{} +} + +/* +V1WorkspacesGetallForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type V1WorkspacesGetallForbidden struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces getall forbidden response has a 2xx status code +func (o *V1WorkspacesGetallForbidden) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces getall forbidden response has a 3xx status code +func (o *V1WorkspacesGetallForbidden) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces getall forbidden response has a 4xx status code +func (o *V1WorkspacesGetallForbidden) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 workspaces getall forbidden response has a 5xx status code +func (o *V1WorkspacesGetallForbidden) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces getall forbidden response a status code equal to that given +func (o *V1WorkspacesGetallForbidden) IsCode(code int) bool { + return code == 403 +} + +// Code gets the status code for the v1 workspaces getall forbidden response +func (o *V1WorkspacesGetallForbidden) Code() int { + return 403 +} + +func (o *V1WorkspacesGetallForbidden) Error() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallForbidden %+v", 403, o.Payload) +} + +func (o *V1WorkspacesGetallForbidden) String() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallForbidden %+v", 403, o.Payload) +} + +func (o *V1WorkspacesGetallForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetallForbidden) 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 +} + +// NewV1WorkspacesGetallTooManyRequests creates a V1WorkspacesGetallTooManyRequests with default headers values +func NewV1WorkspacesGetallTooManyRequests() *V1WorkspacesGetallTooManyRequests { + return &V1WorkspacesGetallTooManyRequests{} +} + +/* +V1WorkspacesGetallTooManyRequests describes a response with status code 429, with default header values. + +Too Many Requests +*/ +type V1WorkspacesGetallTooManyRequests struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces getall too many requests response has a 2xx status code +func (o *V1WorkspacesGetallTooManyRequests) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces getall too many requests response has a 3xx status code +func (o *V1WorkspacesGetallTooManyRequests) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces getall too many requests response has a 4xx status code +func (o *V1WorkspacesGetallTooManyRequests) IsClientError() bool { + return true +} + +// IsServerError returns true when this v1 workspaces getall too many requests response has a 5xx status code +func (o *V1WorkspacesGetallTooManyRequests) IsServerError() bool { + return false +} + +// IsCode returns true when this v1 workspaces getall too many requests response a status code equal to that given +func (o *V1WorkspacesGetallTooManyRequests) IsCode(code int) bool { + return code == 429 +} + +// Code gets the status code for the v1 workspaces getall too many requests response +func (o *V1WorkspacesGetallTooManyRequests) Code() int { + return 429 +} + +func (o *V1WorkspacesGetallTooManyRequests) Error() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallTooManyRequests %+v", 429, o.Payload) +} + +func (o *V1WorkspacesGetallTooManyRequests) String() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallTooManyRequests %+v", 429, o.Payload) +} + +func (o *V1WorkspacesGetallTooManyRequests) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetallTooManyRequests) 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 +} + +// NewV1WorkspacesGetallInternalServerError creates a V1WorkspacesGetallInternalServerError with default headers values +func NewV1WorkspacesGetallInternalServerError() *V1WorkspacesGetallInternalServerError { + return &V1WorkspacesGetallInternalServerError{} +} + +/* +V1WorkspacesGetallInternalServerError describes a response with status code 500, with default header values. + +Internal Server Error +*/ +type V1WorkspacesGetallInternalServerError struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 workspaces getall internal server error response has a 2xx status code +func (o *V1WorkspacesGetallInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 workspaces getall internal server error response has a 3xx status code +func (o *V1WorkspacesGetallInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 workspaces getall internal server error response has a 4xx status code +func (o *V1WorkspacesGetallInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 workspaces getall internal server error response has a 5xx status code +func (o *V1WorkspacesGetallInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 workspaces getall internal server error response a status code equal to that given +func (o *V1WorkspacesGetallInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the v1 workspaces getall internal server error response +func (o *V1WorkspacesGetallInternalServerError) Code() int { + return 500 +} + +func (o *V1WorkspacesGetallInternalServerError) Error() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *V1WorkspacesGetallInternalServerError) String() string { + return fmt.Sprintf("[GET /v1/workspaces][%d] v1WorkspacesGetallInternalServerError %+v", 500, o.Payload) +} + +func (o *V1WorkspacesGetallInternalServerError) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1WorkspacesGetallInternalServerError) 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/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/workspaces_client.go b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/workspaces_client.go new file mode 100644 index 00000000000..4929b69575b --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/client/workspaces/workspaces_client.go @@ -0,0 +1,121 @@ +// 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) + + V1WorkspacesGetall(params *V1WorkspacesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1WorkspacesGetallOK, 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) +} + +/* +V1WorkspacesGetall gets all workspaces information and capabilities for a tenant +*/ +func (a *Client) V1WorkspacesGetall(params *V1WorkspacesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*V1WorkspacesGetallOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesGetallParams() + } + op := &runtime.ClientOperation{ + ID: "v1.workspaces.getall", + Method: "GET", + PathPattern: "/v1/workspaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &V1WorkspacesGetallReader{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.(*V1WorkspacesGetallOK) + 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.getall: 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/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_config.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_config.go new file mode 100644 index 00000000000..a7cc67e920f --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_config.go @@ -0,0 +1,92 @@ +// 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/validate" +) + +// AccessConfig Network communication configuration (for satellite locations only) +// - `internal-only` - network is only used for internal host communication +// - `outbound-only` - network will be capable of egress traffic +// - `bidirectional-static-route` - network will be capable of ingress and egress traffic via static routes +// - `bidirectional-bgp` - network will be capable of ingress and egress traffic via bgp configuration +// - `bidirectional-l2out` - network will be capable of ingress and egress traffic via l2out ACI configuration +// +// swagger:model AccessConfig +type AccessConfig string + +func NewAccessConfig(value AccessConfig) *AccessConfig { + return &value +} + +// Pointer returns a pointer to a freshly-allocated AccessConfig. +func (m AccessConfig) Pointer() *AccessConfig { + return &m +} + +const ( + + // AccessConfigInternalDashOnly captures enum value "internal-only" + AccessConfigInternalDashOnly AccessConfig = "internal-only" + + // AccessConfigOutboundDashOnly captures enum value "outbound-only" + AccessConfigOutboundDashOnly AccessConfig = "outbound-only" + + // AccessConfigBidirectionalDashStaticDashRoute captures enum value "bidirectional-static-route" + AccessConfigBidirectionalDashStaticDashRoute AccessConfig = "bidirectional-static-route" + + // AccessConfigBidirectionalDashBgp captures enum value "bidirectional-bgp" + AccessConfigBidirectionalDashBgp AccessConfig = "bidirectional-bgp" + + // AccessConfigBidirectionalDashL2out captures enum value "bidirectional-l2out" + AccessConfigBidirectionalDashL2out AccessConfig = "bidirectional-l2out" +) + +// for schema +var accessConfigEnum []interface{} + +func init() { + var res []AccessConfig + if err := json.Unmarshal([]byte(`["internal-only","outbound-only","bidirectional-static-route","bidirectional-bgp","bidirectional-l2out"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + accessConfigEnum = append(accessConfigEnum, v) + } +} + +func (m AccessConfig) validateAccessConfigEnum(path, location string, value AccessConfig) error { + if err := validate.EnumCase(path, location, value, accessConfigEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this access config +func (m AccessConfig) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateAccessConfigEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this access config based on context it is used +func (m AccessConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_role.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_role.go index 42734647e41..8b9f0224cc3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_role.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/access_role.go @@ -78,6 +78,7 @@ func (m *AccessRole) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *AccessRole) contextValidatePermissions(ctx context.Context, formats strfmt.Registry) error { if m.Permissions != nil { + if err := m.Permissions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("permissions") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/auxiliary_volumes_for_onboarding.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/auxiliary_volumes_for_onboarding.go index 41893a15c31..0fd76126515 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/auxiliary_volumes_for_onboarding.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/auxiliary_volumes_for_onboarding.go @@ -102,6 +102,11 @@ func (m *AuxiliaryVolumesForOnboarding) contextValidateAuxiliaryVolumes(ctx cont for i := 0; i < len(m.AuxiliaryVolumes); i++ { if m.AuxiliaryVolumes[i] != nil { + + if swag.IsZero(m.AuxiliaryVolumes[i]) { // not required + return nil + } + if err := m.AuxiliaryVolumes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("auxiliaryVolumes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/catalog.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/catalog.go index dab6aafe03e..a5091d5ca3b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/catalog.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/catalog.go @@ -82,6 +82,11 @@ func (m *Catalog) contextValidateServices(ctx context.Context, formats strfmt.Re for i := 0; i < len(m.Services); i++ { if m.Services[i] != nil { + + if swag.IsZero(m.Services[i]) { // not required + return nil + } + if err := m.Services[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("services" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/clone_task_status.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/clone_task_status.go index c17b76df8f4..cb47470dff0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/clone_task_status.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/clone_task_status.go @@ -162,6 +162,11 @@ func (m *CloneTaskStatus) contextValidateClonedVolumes(ctx context.Context, form for i := 0; i < len(m.ClonedVolumes); i++ { if m.ClonedVolumes[i] != nil { + + if swag.IsZero(m.ClonedVolumes[i]) { // not required + return nil + } + if err := m.ClonedVolumes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloned_volume_detail.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloned_volume_detail.go index 67757963b8b..0b241dc4059 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloned_volume_detail.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloned_volume_detail.go @@ -107,6 +107,7 @@ func (m *ClonedVolumeDetail) ContextValidate(ctx context.Context, formats strfmt func (m *ClonedVolumeDetail) contextValidateClone(ctx context.Context, formats strfmt.Registry) error { if m.Clone != nil { + if err := m.Clone.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("clone") @@ -123,6 +124,7 @@ func (m *ClonedVolumeDetail) contextValidateClone(ctx context.Context, formats s func (m *ClonedVolumeDetail) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { if m.Source != nil { + if err := m.Source.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("source") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection.go index 83c804c95af..3aa1bdd0d4d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection.go @@ -319,6 +319,11 @@ func (m *CloudConnection) ContextValidate(ctx context.Context, formats strfmt.Re func (m *CloudConnection) contextValidateClassic(ctx context.Context, formats strfmt.Registry) error { if m.Classic != nil { + + if swag.IsZero(m.Classic) { // not required + return nil + } + if err := m.Classic.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("classic") @@ -337,6 +342,11 @@ func (m *CloudConnection) contextValidateNetworks(ctx context.Context, formats s for i := 0; i < len(m.Networks); i++ { if m.Networks[i] != nil { + + if swag.IsZero(m.Networks[i]) { // not required + return nil + } + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) @@ -355,6 +365,11 @@ func (m *CloudConnection) contextValidateNetworks(ctx context.Context, formats s func (m *CloudConnection) contextValidateVpc(ctx context.Context, formats strfmt.Registry) error { if m.Vpc != nil { + + if swag.IsZero(m.Vpc) { // not required + return nil + } + if err := m.Vpc.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vpc") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go index 52daa130463..dba0f6413b9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create.go @@ -176,6 +176,11 @@ func (m *CloudConnectionCreate) ContextValidate(ctx context.Context, formats str func (m *CloudConnectionCreate) contextValidateClassic(ctx context.Context, formats strfmt.Registry) error { if m.Classic != nil { + + if swag.IsZero(m.Classic) { // not required + return nil + } + if err := m.Classic.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("classic") @@ -192,6 +197,11 @@ func (m *CloudConnectionCreate) contextValidateClassic(ctx context.Context, form func (m *CloudConnectionCreate) contextValidateVpc(ctx context.Context, formats strfmt.Registry) error { if m.Vpc != nil { + + if swag.IsZero(m.Vpc) { // not required + return nil + } + if err := m.Vpc.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vpc") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create_response.go index cf8c089942a..4797f9a4168 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_create_response.go @@ -128,6 +128,11 @@ func (m *CloudConnectionCreateResponse) ContextValidate(ctx context.Context, for func (m *CloudConnectionCreateResponse) contextValidateJobRef(ctx context.Context, formats strfmt.Registry) error { if m.JobRef != nil { + + if swag.IsZero(m.JobRef) { // not required + return nil + } + if err := m.JobRef.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("jobRef") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go index 9ca73c49d34..201be27e5b9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic.go @@ -75,6 +75,11 @@ func (m *CloudConnectionEndpointClassic) ContextValidate(ctx context.Context, fo func (m *CloudConnectionEndpointClassic) contextValidateGre(ctx context.Context, formats strfmt.Registry) error { if m.Gre != nil { + + if swag.IsZero(m.Gre) { // not required + return nil + } + if err := m.Gre.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("gre") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go index 300fef2a19c..bda835e0c30 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_classic_update.go @@ -75,6 +75,11 @@ func (m *CloudConnectionEndpointClassicUpdate) ContextValidate(ctx context.Conte func (m *CloudConnectionEndpointClassicUpdate) contextValidateGre(ctx context.Context, formats strfmt.Registry) error { if m.Gre != nil { + + if swag.IsZero(m.Gre) { // not required + return nil + } + if err := m.Gre.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("gre") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_v_p_c.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_v_p_c.go index 873c365c195..c2b158c4ab8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_v_p_c.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_endpoint_v_p_c.go @@ -85,6 +85,11 @@ func (m *CloudConnectionEndpointVPC) contextValidateVpcs(ctx context.Context, fo for i := 0; i < len(m.Vpcs); i++ { if m.Vpcs[i] != nil { + + if swag.IsZero(m.Vpcs[i]) { // not required + return nil + } + if err := m.Vpcs[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vpcs" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go index df7e0c302d1..4274cf1c8d5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_update.go @@ -154,6 +154,11 @@ func (m *CloudConnectionUpdate) ContextValidate(ctx context.Context, formats str func (m *CloudConnectionUpdate) contextValidateClassic(ctx context.Context, formats strfmt.Registry) error { if m.Classic != nil { + + if swag.IsZero(m.Classic) { // not required + return nil + } + if err := m.Classic.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("classic") @@ -170,6 +175,11 @@ func (m *CloudConnectionUpdate) contextValidateClassic(ctx context.Context, form func (m *CloudConnectionUpdate) contextValidateVpc(ctx context.Context, formats strfmt.Registry) error { if m.Vpc != nil { + + if swag.IsZero(m.Vpc) { // not required + return nil + } + if err := m.Vpc.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vpc") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go index 5c97aab8b7f..509dc9ce763 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connection_virtual_private_clouds.go @@ -85,6 +85,11 @@ func (m *CloudConnectionVirtualPrivateClouds) contextValidateVirtualPrivateCloud for i := 0; i < len(m.VirtualPrivateClouds); i++ { if m.VirtualPrivateClouds[i] != nil { + + if swag.IsZero(m.VirtualPrivateClouds[i]) { // not required + return nil + } + if err := m.VirtualPrivateClouds[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualPrivateClouds" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connections.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connections.go index 1c9696c6cdb..337c969024b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connections.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_connections.go @@ -85,6 +85,11 @@ func (m *CloudConnections) contextValidateCloudConnections(ctx context.Context, for i := 0; i < len(m.CloudConnections); i++ { if m.CloudConnections[i] != nil { + + if swag.IsZero(m.CloudConnections[i]) { // not required + return nil + } + if err := m.CloudConnections[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_initialization.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_initialization.go new file mode 100644 index 00000000000..5eb1550d006 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_initialization.go @@ -0,0 +1,102 @@ +// 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" +) + +// CloudInitialization cloud initialization +// +// swagger:model CloudInitialization +type CloudInitialization struct { + + // Virtual Machine's Cloud Initialization Virtual Optical Device + // Enum: [attach] + VirtualOpticalDevice string `json:"virtualOpticalDevice,omitempty"` +} + +// Validate validates this cloud initialization +func (m *CloudInitialization) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVirtualOpticalDevice(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var cloudInitializationTypeVirtualOpticalDevicePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["attach"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + cloudInitializationTypeVirtualOpticalDevicePropEnum = append(cloudInitializationTypeVirtualOpticalDevicePropEnum, v) + } +} + +const ( + + // CloudInitializationVirtualOpticalDeviceAttach captures enum value "attach" + CloudInitializationVirtualOpticalDeviceAttach string = "attach" +) + +// prop value enum +func (m *CloudInitialization) validateVirtualOpticalDeviceEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, cloudInitializationTypeVirtualOpticalDevicePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *CloudInitialization) validateVirtualOpticalDevice(formats strfmt.Registry) error { + if swag.IsZero(m.VirtualOpticalDevice) { // not required + return nil + } + + // value enum + if err := m.validateVirtualOpticalDeviceEnum("virtualOpticalDevice", "body", m.VirtualOpticalDevice); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this cloud initialization based on context it is used +func (m *CloudInitialization) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CloudInitialization) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CloudInitialization) UnmarshalBinary(b []byte) error { + var res CloudInitialization + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance.go index 307eab24199..8a66d0a3f5e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance.go @@ -269,6 +269,7 @@ func (m *CloudInstance) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *CloudInstance) contextValidateLimits(ctx context.Context, formats strfmt.Registry) error { if m.Limits != nil { + if err := m.Limits.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("limits") @@ -287,6 +288,11 @@ func (m *CloudInstance) contextValidatePvmInstances(ctx context.Context, formats for i := 0; i < len(m.PvmInstances); i++ { if m.PvmInstances[i] != nil { + + if swag.IsZero(m.PvmInstances[i]) { // not required + return nil + } + if err := m.PvmInstances[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) @@ -305,6 +311,7 @@ func (m *CloudInstance) contextValidatePvmInstances(ctx context.Context, formats func (m *CloudInstance) contextValidateUsage(ctx context.Context, formats strfmt.Registry) error { if m.Usage != nil { + if err := m.Usage.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("usage") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_reference.go index 22901098b01..c9129f31694 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/cloud_instance_reference.go @@ -180,6 +180,7 @@ func (m *CloudInstanceReference) ContextValidate(ctx context.Context, formats st func (m *CloudInstanceReference) contextValidateLimits(ctx context.Context, formats strfmt.Registry) error { if m.Limits != nil { + if err := m.Limits.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("limits") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/console_languages.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/console_languages.go index adfe7d6540a..414ad193d5a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/console_languages.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/console_languages.go @@ -85,6 +85,11 @@ func (m *ConsoleLanguages) contextValidateConsoleLanguages(ctx context.Context, for i := 0; i < len(m.ConsoleLanguages); i++ { if m.ConsoleLanguages[i] != nil { + + if swag.IsZero(m.ConsoleLanguages[i]) { // not required + return nil + } + if err := m.ConsoleLanguages[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("consoleLanguages" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_cos_image_import_job.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_cos_image_import_job.go index 164c9a5a9da..7939bebbc3a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_cos_image_import_job.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_cos_image_import_job.go @@ -56,7 +56,7 @@ type CreateCosImageImportJob struct { // Storage pool where the image will be loaded, if provided then storageType and storageAffinity will be ignored StoragePool string `json:"storagePool,omitempty"` - // Type of storage; will be ignored if storagePool or storageAffinity is provided. If only using storageType for storage selection then the storage pool with the most available space will be selected + // Type of storage; will be ignored if storagePool and or storageAffinity is provided. If only using storageType for storage selection then the storage pool with the most available space will be selected StorageType string `json:"storageType,omitempty"` } @@ -260,6 +260,11 @@ func (m *CreateCosImageImportJob) ContextValidate(ctx context.Context, formats s func (m *CreateCosImageImportJob) contextValidateStorageAffinity(ctx context.Context, formats strfmt.Registry) error { if m.StorageAffinity != nil { + + if swag.IsZero(m.StorageAffinity) { // not required + return nil + } + if err := m.StorageAffinity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("storageAffinity") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go index b55fb483db9..33005acddbb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/create_image.go @@ -52,6 +52,8 @@ type CreateImage struct { SecretKey string `json:"secretKey,omitempty"` // Source of the image + // >*Note*: url option is deprecated, this option is supported till Oct 2022 + // // Required: true // Enum: [root-project url] Source *string `json:"source"` @@ -212,6 +214,11 @@ func (m *CreateImage) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *CreateImage) contextValidateStorageAffinity(ctx context.Context, formats strfmt.Registry) error { if m.StorageAffinity != nil { + + if swag.IsZero(m.StorageAffinity) { // not required + return nil + } + if err := m.StorageAffinity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("storageAffinity") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server.go index 5602d9d0a79..9721c12b555 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server.go @@ -109,6 +109,7 @@ func (m *DHCPServer) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *DHCPServer) contextValidateNetwork(ctx context.Context, formats strfmt.Registry) error { if m.Network != nil { + if err := m.Network.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("network") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server_detail.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server_detail.go index fc6284fff02..fac08ad210f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server_detail.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_server_detail.go @@ -149,6 +149,11 @@ func (m *DHCPServerDetail) contextValidateLeases(ctx context.Context, formats st for i := 0; i < len(m.Leases); i++ { if m.Leases[i] != nil { + + if swag.IsZero(m.Leases[i]) { // not required + return nil + } + if err := m.Leases[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("leases" + "." + strconv.Itoa(i)) @@ -167,6 +172,7 @@ func (m *DHCPServerDetail) contextValidateLeases(ctx context.Context, formats st func (m *DHCPServerDetail) contextValidateNetwork(ctx context.Context, formats strfmt.Registry) error { if m.Network != nil { + if err := m.Network.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("network") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_servers.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_servers.go index 947db73c45e..4ebec2cc022 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_servers.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/d_h_c_p_servers.go @@ -54,6 +54,11 @@ func (m DHCPServers) ContextValidate(ctx context.Context, formats strfmt.Registr for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter.go new file mode 100644 index 00000000000..d32f9f87678 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter.go @@ -0,0 +1,236 @@ +// 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" +) + +// Datacenter datacenter +// +// swagger:model Datacenter +type Datacenter struct { + + // Datacenter Capabilities + // Required: true + Capabilities map[string]bool `json:"capabilities"` + + // Link to Datacenter Region + Href string `json:"href,omitempty"` + + // The Datacenter location + // Required: true + Location *DatacenterLocation `json:"location"` + + // The Datacenter status + // Required: true + // Enum: [Active Maintenance Down] + Status *string `json:"status"` + + // The Datacenter type + // Required: true + // Enum: [Public Cloud Private Cloud] + Type *string `json:"type"` +} + +// Validate validates this datacenter +func (m *Datacenter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCapabilities(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(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 *Datacenter) validateCapabilities(formats strfmt.Registry) error { + + if err := validate.Required("capabilities", "body", m.Capabilities); err != nil { + return err + } + + return nil +} + +func (m *Datacenter) 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 +} + +var datacenterTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Active","Maintenance","Down"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + datacenterTypeStatusPropEnum = append(datacenterTypeStatusPropEnum, v) + } +} + +const ( + + // DatacenterStatusActive captures enum value "Active" + DatacenterStatusActive string = "Active" + + // DatacenterStatusMaintenance captures enum value "Maintenance" + DatacenterStatusMaintenance string = "Maintenance" + + // DatacenterStatusDown captures enum value "Down" + DatacenterStatusDown string = "Down" +) + +// prop value enum +func (m *Datacenter) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, datacenterTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Datacenter) 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 datacenterTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Public Cloud","Private Cloud"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + datacenterTypeTypePropEnum = append(datacenterTypeTypePropEnum, v) + } +} + +const ( + + // DatacenterTypePublicCloud captures enum value "Public Cloud" + DatacenterTypePublicCloud string = "Public Cloud" + + // DatacenterTypePrivateCloud captures enum value "Private Cloud" + DatacenterTypePrivateCloud string = "Private Cloud" +) + +// prop value enum +func (m *Datacenter) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, datacenterTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Datacenter) 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 datacenter based on the context it is used +func (m *Datacenter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLocation(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Datacenter) 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 *Datacenter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Datacenter) UnmarshalBinary(b []byte) error { + var res Datacenter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter_location.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter_location.go new file mode 100644 index 00000000000..2e0fb83835d --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenter_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" +) + +// DatacenterLocation datacenter location +// +// swagger:model DatacenterLocation +type DatacenterLocation struct { + + // The Datacenter location region zone + // Required: true + Region *string `json:"region"` + + // The Datacenter location region type + // Required: true + Type *string `json:"type"` + + // The Datacenter location region url + // Required: true + URL *string `json:"url"` +} + +// Validate validates this datacenter location +func (m *DatacenterLocation) 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 *DatacenterLocation) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +func (m *DatacenterLocation) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +func (m *DatacenterLocation) validateURL(formats strfmt.Registry) error { + + if err := validate.Required("url", "body", m.URL); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this datacenter location based on context it is used +func (m *DatacenterLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *DatacenterLocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DatacenterLocation) UnmarshalBinary(b []byte) error { + var res DatacenterLocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenters.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenters.go new file mode 100644 index 00000000000..9fd22e8fcb7 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/datacenters.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" +) + +// Datacenters datacenters +// +// swagger:model Datacenters +type Datacenters struct { + + // Power Systems Virtual Server available Datacenters + // Required: true + Datacenters []*Datacenter `json:"datacenters"` +} + +// Validate validates this datacenters +func (m *Datacenters) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDatacenters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Datacenters) validateDatacenters(formats strfmt.Registry) error { + + if err := validate.Required("datacenters", "body", m.Datacenters); err != nil { + return err + } + + for i := 0; i < len(m.Datacenters); i++ { + if swag.IsZero(m.Datacenters[i]) { // not required + continue + } + + if m.Datacenters[i] != nil { + if err := m.Datacenters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datacenters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("datacenters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this datacenters based on the context it is used +func (m *Datacenters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDatacenters(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Datacenters) contextValidateDatacenters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Datacenters); i++ { + + if m.Datacenters[i] != nil { + + if swag.IsZero(m.Datacenters[i]) { // not required + return nil + } + + if err := m.Datacenters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datacenters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("datacenters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Datacenters) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Datacenters) UnmarshalBinary(b []byte) error { + var res Datacenters + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_locations.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_locations.go index 31d522ca866..ac7f31209dd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_locations.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/disaster_recovery_locations.go @@ -85,6 +85,11 @@ func (m *DisasterRecoveryLocations) contextValidateDisasterRecoveryLocations(ctx for i := 0; i < len(m.DisasterRecoveryLocations); i++ { if m.DisasterRecoveryLocations[i] != nil { + + if swag.IsZero(m.DisasterRecoveryLocations[i]) { // not required + return nil + } + if err := m.DisasterRecoveryLocations[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/event.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/event.go index b9190c8f625..bd5ac368e13 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/event.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/event.go @@ -242,6 +242,11 @@ func (m *Event) ContextValidate(ctx context.Context, formats strfmt.Registry) er func (m *Event) contextValidateUser(ctx context.Context, formats strfmt.Registry) error { if m.User != nil { + + if swag.IsZero(m.User) { // not required + return nil + } + if err := m.User.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("user") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/events.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/events.go index 721b97fcf45..669909f7222 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/events.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/events.go @@ -85,6 +85,11 @@ func (m *Events) contextValidateEvents(ctx context.Context, formats strfmt.Regis for i := 0; i < len(m.Events); i++ { if m.Events[i] != nil { + + if swag.IsZero(m.Events[i]) { // not required + return nil + } + if err := m.Events[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("events" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/flash_copy_mappings.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/flash_copy_mappings.go index 514a13be355..70242a75282 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/flash_copy_mappings.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/flash_copy_mappings.go @@ -54,6 +54,11 @@ func (m FlashCopyMappings) ContextValidate(ctx context.Context, formats strfmt.R for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platform.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platform.go index 8c78c41fcf9..0f6592e2639 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platform.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/hardware_platform.go @@ -100,6 +100,11 @@ func (m *HardwarePlatform) contextValidateHostsResources(ctx context.Context, fo for i := 0; i < len(m.HostsResources); i++ { if m.HostsResources[i] != nil { + + if swag.IsZero(m.HostsResources[i]) { // not required + return nil + } + if err := m.HostsResources[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("hostsResources" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_info.go index ab262805407..754ed4ad22b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_info.go @@ -181,6 +181,7 @@ func (m *HostInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *HostInfo) contextValidateCores(ctx context.Context, formats strfmt.Registry) error { if m.Cores != nil { + if err := m.Cores.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cores") @@ -197,6 +198,7 @@ func (m *HostInfo) contextValidateCores(ctx context.Context, formats strfmt.Regi func (m *HostInfo) contextValidateMemory(ctx context.Context, formats strfmt.Registry) error { if m.Memory != nil { + if err := m.Memory.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("memory") @@ -215,6 +217,11 @@ func (m *HostInfo) contextValidatePvmInstances(ctx context.Context, formats strf for i := 0; i < len(m.PvmInstances); i++ { if m.PvmInstances[i] != nil { + + if swag.IsZero(m.PvmInstances[i]) { // not required + return nil + } + if err := m.PvmInstances[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_p_vm_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_p_vm_instance.go index 5a04d4fbd87..d6c024a612a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_p_vm_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/host_p_vm_instance.go @@ -160,6 +160,7 @@ func (m *HostPVMInstance) ContextValidate(ctx context.Context, formats strfmt.Re func (m *HostPVMInstance) contextValidateOwner(ctx context.Context, formats strfmt.Registry) error { if m.Owner != nil { + if err := m.Owner.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("owner") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policies.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policies.go index 5cfe23d7a87..d8d27199cc5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policies.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policies.go @@ -85,6 +85,11 @@ func (m *IKEPolicies) contextValidateIkePolicies(ctx context.Context, formats st for i := 0; i < len(m.IkePolicies); i++ { if m.IkePolicies[i] != nil { + + if swag.IsZero(m.IkePolicies[i]) { // not required + return nil + } + if err := m.IkePolicies[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ikePolicies" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy.go index c6eb1bd7968..4a101ecf19b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy.go @@ -305,6 +305,7 @@ func (m *IKEPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *IKEPolicy) contextValidateAuthentication(ctx context.Context, formats strfmt.Registry) error { if m.Authentication != nil { + if err := m.Authentication.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("authentication") @@ -321,6 +322,7 @@ func (m *IKEPolicy) contextValidateAuthentication(ctx context.Context, formats s func (m *IKEPolicy) contextValidateKeyLifetime(ctx context.Context, formats strfmt.Registry) error { if m.KeyLifetime != nil { + if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("keyLifetime") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_create.go index decb59aa550..39757af5049 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_create.go @@ -305,6 +305,10 @@ func (m *IKEPolicyCreate) ContextValidate(ctx context.Context, formats strfmt.Re func (m *IKEPolicyCreate) contextValidateAuthentication(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Authentication) { // not required + return nil + } + if err := m.Authentication.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("authentication") @@ -320,6 +324,7 @@ func (m *IKEPolicyCreate) contextValidateAuthentication(ctx context.Context, for func (m *IKEPolicyCreate) contextValidateKeyLifetime(ctx context.Context, formats strfmt.Registry) error { if m.KeyLifetime != nil { + if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("keyLifetime") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_template.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_template.go index ac09368f8ee..afcf73e6fa0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_template.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_template.go @@ -151,6 +151,7 @@ func (m *IKEPolicyTemplate) ContextValidate(ctx context.Context, formats strfmt. func (m *IKEPolicyTemplate) contextValidateKeyLifetime(ctx context.Context, formats strfmt.Registry) error { if m.KeyLifetime != nil { + if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("keyLifetime") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_update.go index 5d92a6607fe..e8d42411fc9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/i_k_e_policy_update.go @@ -447,6 +447,10 @@ func (m *IKEPolicyUpdate) ContextValidate(ctx context.Context, formats strfmt.Re func (m *IKEPolicyUpdate) contextValidateAuthentication(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Authentication) { // not required + return nil + } + if err := m.Authentication.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("authentication") @@ -461,6 +465,10 @@ func (m *IKEPolicyUpdate) contextValidateAuthentication(ctx context.Context, for func (m *IKEPolicyUpdate) contextValidateKeyLifetime(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.KeyLifetime) { // not required + return nil + } + if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("keyLifetime") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image.go index 1d79e34d139..d3690795565 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image.go @@ -279,6 +279,11 @@ func (m *Image) ContextValidate(ctx context.Context, formats strfmt.Registry) er func (m *Image) contextValidateSpecifications(ctx context.Context, formats strfmt.Registry) error { if m.Specifications != nil { + + if swag.IsZero(m.Specifications) { // not required + return nil + } + if err := m.Specifications.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("specifications") @@ -295,6 +300,11 @@ func (m *Image) contextValidateSpecifications(ctx context.Context, formats strfm func (m *Image) contextValidateTaskref(ctx context.Context, formats strfmt.Registry) error { if m.Taskref != nil { + + if swag.IsZero(m.Taskref) { // not required + return nil + } + if err := m.Taskref.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("taskref") @@ -313,6 +323,11 @@ func (m *Image) contextValidateVolumes(ctx context.Context, formats strfmt.Regis for i := 0; i < len(m.Volumes); i++ { if m.Volumes[i] != nil { + + if swag.IsZero(m.Volumes[i]) { // not required + return nil + } + if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_reference.go index 0d1fb25dcb0..bd1811be347 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/image_reference.go @@ -238,6 +238,7 @@ func (m *ImageReference) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *ImageReference) contextValidateSpecifications(ctx context.Context, formats strfmt.Registry) error { if m.Specifications != nil { + if err := m.Specifications.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("specifications") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/images.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/images.go index b9c4473c0c1..7ffa8a6320d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/images.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/images.go @@ -85,6 +85,11 @@ func (m *Images) contextValidateImages(ctx context.Context, formats strfmt.Regis for i := 0; i < len(m.Images); i++ { if m.Images[i] != nil { + + if swag.IsZero(m.Images[i]) { // not required + return nil + } + if err := m.Images[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("images" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policies.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policies.go index 6e0996a4a39..062ac0921eb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policies.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policies.go @@ -85,6 +85,11 @@ func (m *IPSecPolicies) contextValidateIPSecPolicies(ctx context.Context, format for i := 0; i < len(m.IPSecPolicies); i++ { if m.IPSecPolicies[i] != nil { + + if swag.IsZero(m.IPSecPolicies[i]) { // not required + return nil + } + if err := m.IPSecPolicies[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipSecPolicies" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy.go index d13ba5a5631..d2e62f421bb 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy.go @@ -282,6 +282,7 @@ func (m *IPSecPolicy) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *IPSecPolicy) contextValidateAuthentication(ctx context.Context, formats strfmt.Registry) error { if m.Authentication != nil { + if err := m.Authentication.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("authentication") @@ -298,6 +299,7 @@ func (m *IPSecPolicy) contextValidateAuthentication(ctx context.Context, formats func (m *IPSecPolicy) contextValidateKeyLifetime(ctx context.Context, formats strfmt.Registry) error { if m.KeyLifetime != nil { + if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("keyLifetime") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_create.go index 2dbcb92c074..b46a3812ec8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_create.go @@ -265,6 +265,10 @@ func (m *IPSecPolicyCreate) ContextValidate(ctx context.Context, formats strfmt. func (m *IPSecPolicyCreate) contextValidateAuthentication(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Authentication) { // not required + return nil + } + if err := m.Authentication.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("authentication") @@ -280,6 +284,7 @@ func (m *IPSecPolicyCreate) contextValidateAuthentication(ctx context.Context, f func (m *IPSecPolicyCreate) contextValidateKeyLifetime(ctx context.Context, formats strfmt.Registry) error { if m.KeyLifetime != nil { + if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("keyLifetime") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_template.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_template.go index 7f8c3413714..e854608ccd4 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_template.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_template.go @@ -133,6 +133,7 @@ func (m *IPSecPolicyTemplate) ContextValidate(ctx context.Context, formats strfm func (m *IPSecPolicyTemplate) contextValidateKeyLifetime(ctx context.Context, formats strfmt.Registry) error { if m.KeyLifetime != nil { + if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("keyLifetime") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_update.go index 7ec614b2ba3..f753650c48d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ip_sec_policy_update.go @@ -398,6 +398,10 @@ func (m *IPSecPolicyUpdate) ContextValidate(ctx context.Context, formats strfmt. func (m *IPSecPolicyUpdate) contextValidateAuthentication(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Authentication) { // not required + return nil + } + if err := m.Authentication.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("authentication") @@ -412,6 +416,10 @@ func (m *IPSecPolicyUpdate) contextValidateAuthentication(ctx context.Context, f func (m *IPSecPolicyUpdate) contextValidateKeyLifetime(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.KeyLifetime) { // not required + return nil + } + if err := m.KeyLifetime.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("keyLifetime") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/job.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/job.go index fd59b76c97e..b9a5884115f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/job.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/job.go @@ -144,6 +144,7 @@ func (m *Job) ContextValidate(ctx context.Context, formats strfmt.Registry) erro func (m *Job) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { if m.Operation != nil { + if err := m.Operation.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("operation") @@ -160,6 +161,7 @@ func (m *Job) contextValidateOperation(ctx context.Context, formats strfmt.Regis func (m *Job) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("status") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/jobs.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/jobs.go index 99fd189bf69..983b9d90a60 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/jobs.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/jobs.go @@ -85,6 +85,11 @@ func (m *Jobs) contextValidateJobs(ctx context.Context, formats strfmt.Registry) for i := 0; i < len(m.Jobs); i++ { if m.Jobs[i] != nil { + + if swag.IsZero(m.Jobs[i]) { // not required + return nil + } + if err := m.Jobs[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network.go index 0d008cd8111..458eed549fc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network.go @@ -21,6 +21,9 @@ import ( // swagger:model Network type Network struct { + // access config + AccessConfig AccessConfig `json:"accessConfig,omitempty"` + // Network in CIDR notation (192.168.0.0/24) // Required: true Cidr *string `json:"cidr"` @@ -46,9 +49,13 @@ type Network struct { // Required: true IPAddressRanges []*IPAddressRange `json:"ipAddressRanges"` - // MTU Jumbo Network enabled - // Required: true - Jumbo *bool `json:"jumbo"` + // Enable MTU Jumbo Network (for multi-zone locations only) + Jumbo bool `json:"jumbo,omitempty"` + + // Maximum transmission unit (for satellite locations only) + // Maximum: 9000 + // Minimum: 1450 + Mtu int64 `json:"mtu,omitempty"` // Network Name // Required: true @@ -61,9 +68,9 @@ type Network struct { // Public IP Address Ranges (for pub-vlan networks) PublicIPAddressRanges []*IPAddressRange `json:"publicIPAddressRanges,omitempty"` - // Type of Network {vlan, pub-vlan} + // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) 'dhcp-vlan' (for satellite locations only) // Required: true - // Enum: [vlan pub-vlan] + // Enum: [vlan pub-vlan dhcp-vlan] Type *string `json:"type"` // VLAN ID @@ -75,6 +82,10 @@ type Network struct { func (m *Network) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAccessConfig(formats); err != nil { + res = append(res, err) + } + if err := m.validateCidr(formats); err != nil { res = append(res, err) } @@ -95,7 +106,7 @@ func (m *Network) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateJumbo(formats); err != nil { + if err := m.validateMtu(formats); err != nil { res = append(res, err) } @@ -125,6 +136,23 @@ func (m *Network) Validate(formats strfmt.Registry) error { return nil } +func (m *Network) validateAccessConfig(formats strfmt.Registry) error { + if swag.IsZero(m.AccessConfig) { // not required + return nil + } + + if err := m.AccessConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("accessConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("accessConfig") + } + return err + } + + return nil +} + func (m *Network) validateCidr(formats strfmt.Registry) error { if err := validate.Required("cidr", "body", m.Cidr); err != nil { @@ -216,9 +244,16 @@ func (m *Network) validateIPAddressRanges(formats strfmt.Registry) error { return nil } -func (m *Network) validateJumbo(formats strfmt.Registry) error { +func (m *Network) validateMtu(formats strfmt.Registry) error { + if swag.IsZero(m.Mtu) { // not required + return nil + } - if err := validate.Required("jumbo", "body", m.Jumbo); err != nil { + if err := validate.MinimumInt("mtu", "body", m.Mtu, 1450, false); err != nil { + return err + } + + if err := validate.MaximumInt("mtu", "body", m.Mtu, 9000, false); err != nil { return err } @@ -273,7 +308,7 @@ var networkTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["vlan","pub-vlan"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["vlan","pub-vlan","dhcp-vlan"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -288,6 +323,9 @@ const ( // NetworkTypePubDashVlan captures enum value "pub-vlan" NetworkTypePubDashVlan string = "pub-vlan" + + // NetworkTypeDhcpDashVlan captures enum value "dhcp-vlan" + NetworkTypeDhcpDashVlan string = "dhcp-vlan" ) // prop value enum @@ -325,6 +363,10 @@ func (m *Network) validateVlanID(formats strfmt.Registry) error { func (m *Network) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAccessConfig(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateCloudConnections(ctx, formats); err != nil { res = append(res, err) } @@ -347,11 +389,34 @@ func (m *Network) ContextValidate(ctx context.Context, formats strfmt.Registry) return nil } +func (m *Network) contextValidateAccessConfig(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.AccessConfig) { // not required + return nil + } + + if err := m.AccessConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("accessConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("accessConfig") + } + return err + } + + return nil +} + func (m *Network) contextValidateCloudConnections(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.CloudConnections); i++ { if m.CloudConnections[i] != nil { + + if swag.IsZero(m.CloudConnections[i]) { // not required + return nil + } + if err := m.CloudConnections[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cloudConnections" + "." + strconv.Itoa(i)) @@ -370,6 +435,7 @@ func (m *Network) contextValidateCloudConnections(ctx context.Context, formats s func (m *Network) contextValidateIPAddressMetrics(ctx context.Context, formats strfmt.Registry) error { if m.IPAddressMetrics != nil { + if err := m.IPAddressMetrics.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipAddressMetrics") @@ -388,6 +454,11 @@ func (m *Network) contextValidateIPAddressRanges(ctx context.Context, formats st for i := 0; i < len(m.IPAddressRanges); i++ { if m.IPAddressRanges[i] != nil { + + if swag.IsZero(m.IPAddressRanges[i]) { // not required + return nil + } + if err := m.IPAddressRanges[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) @@ -408,6 +479,11 @@ func (m *Network) contextValidatePublicIPAddressRanges(ctx context.Context, form for i := 0; i < len(m.PublicIPAddressRanges); i++ { if m.PublicIPAddressRanges[i] != nil { + + if swag.IsZero(m.PublicIPAddressRanges[i]) { // not required + return nil + } + if err := m.PublicIPAddressRanges[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("publicIPAddressRanges" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create.go index 483d03500bc..d045895b89b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_create.go @@ -17,10 +17,14 @@ import ( ) // NetworkCreate network create +// Example: {"accessConfig":"internal-only","cidr":"192.168.1.0/24","gateway":"192.168.1.1","ipAddressRanges":[{"endingIPAddress":"192.168.1.254","startingIPAddress":"192.168.1.2"}],"mtu":1450,"name":"sample-network","type":"vlan"} // // swagger:model NetworkCreate type NetworkCreate struct { + // access config + AccessConfig AccessConfig `json:"accessConfig,omitempty"` + // Network in CIDR notation (192.168.0.0/24) Cidr string `json:"cidr,omitempty"` @@ -33,15 +37,21 @@ type NetworkCreate struct { // IP Address Ranges IPAddressRanges []*IPAddressRange `json:"ipAddressRanges"` - // Enable MTU Jumbo Network + // Enable MTU Jumbo Network (for multi-zone locations only) Jumbo bool `json:"jumbo,omitempty"` + // Maximum transmission unit (for satellite locations only) + // Maximum: 9000 + // Minimum: 1450 + Mtu *int64 `json:"mtu,omitempty"` + // Network Name + // Max Length: 255 Name string `json:"name,omitempty"` - // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) + // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) 'dhcp-vlan' (for satellite locations only) // Required: true - // Enum: [vlan pub-vlan] + // Enum: [vlan pub-vlan dhcp-vlan] Type *string `json:"type"` } @@ -49,10 +59,22 @@ type NetworkCreate struct { func (m *NetworkCreate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAccessConfig(formats); err != nil { + res = append(res, err) + } + if err := m.validateIPAddressRanges(formats); err != nil { res = append(res, err) } + if err := m.validateMtu(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } @@ -63,6 +85,23 @@ func (m *NetworkCreate) Validate(formats strfmt.Registry) error { return nil } +func (m *NetworkCreate) validateAccessConfig(formats strfmt.Registry) error { + if swag.IsZero(m.AccessConfig) { // not required + return nil + } + + if err := m.AccessConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("accessConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("accessConfig") + } + return err + } + + return nil +} + func (m *NetworkCreate) validateIPAddressRanges(formats strfmt.Registry) error { if swag.IsZero(m.IPAddressRanges) { // not required return nil @@ -89,11 +128,39 @@ func (m *NetworkCreate) validateIPAddressRanges(formats strfmt.Registry) error { return nil } +func (m *NetworkCreate) validateMtu(formats strfmt.Registry) error { + if swag.IsZero(m.Mtu) { // not required + return nil + } + + if err := validate.MinimumInt("mtu", "body", *m.Mtu, 1450, false); err != nil { + return err + } + + if err := validate.MaximumInt("mtu", "body", *m.Mtu, 9000, false); err != nil { + return err + } + + return nil +} + +func (m *NetworkCreate) validateName(formats strfmt.Registry) error { + if swag.IsZero(m.Name) { // not required + return nil + } + + if err := validate.MaxLength("name", "body", m.Name, 255); err != nil { + return err + } + + return nil +} + var networkCreateTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["vlan","pub-vlan"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["vlan","pub-vlan","dhcp-vlan"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -108,6 +175,9 @@ const ( // NetworkCreateTypePubDashVlan captures enum value "pub-vlan" NetworkCreateTypePubDashVlan string = "pub-vlan" + + // NetworkCreateTypeDhcpDashVlan captures enum value "dhcp-vlan" + NetworkCreateTypeDhcpDashVlan string = "dhcp-vlan" ) // prop value enum @@ -136,6 +206,10 @@ func (m *NetworkCreate) validateType(formats strfmt.Registry) error { func (m *NetworkCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAccessConfig(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateIPAddressRanges(ctx, formats); err != nil { res = append(res, err) } @@ -146,11 +220,34 @@ func (m *NetworkCreate) ContextValidate(ctx context.Context, formats strfmt.Regi return nil } +func (m *NetworkCreate) contextValidateAccessConfig(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.AccessConfig) { // not required + return nil + } + + if err := m.AccessConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("accessConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("accessConfig") + } + return err + } + + return nil +} + func (m *NetworkCreate) contextValidateIPAddressRanges(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.IPAddressRanges); i++ { if m.IPAddressRanges[i] != nil { + + if swag.IsZero(m.IPAddressRanges[i]) { // not required + return nil + } + if err := m.IPAddressRanges[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port.go index 360de77afd7..bcd23747f72 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_port.go @@ -164,6 +164,11 @@ func (m *NetworkPort) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *NetworkPort) contextValidatePvmInstance(ctx context.Context, formats strfmt.Registry) error { if m.PvmInstance != nil { + + if swag.IsZero(m.PvmInstance) { // not required + return nil + } + if err := m.PvmInstance.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pvmInstance") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_ports.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_ports.go index 78f26b2249c..66ba99b6484 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_ports.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_ports.go @@ -85,6 +85,11 @@ func (m *NetworkPorts) contextValidatePorts(ctx context.Context, formats strfmt. for i := 0; i < len(m.Ports); i++ { if m.Ports[i] != nil { + + if swag.IsZero(m.Ports[i]) { // not required + return nil + } + if err := m.Ports[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ports" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_reference.go index 0398445e891..ff36c5b6a1b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_reference.go @@ -20,6 +20,9 @@ import ( // swagger:model NetworkReference type NetworkReference struct { + // access config + AccessConfig AccessConfig `json:"accessConfig,omitempty"` + // DHCP Managed Network DhcpManaged bool `json:"dhcpManaged,omitempty"` @@ -27,9 +30,13 @@ type NetworkReference struct { // Required: true Href *string `json:"href"` - // MTU Jumbo Network enabled - // Required: true - Jumbo *bool `json:"jumbo"` + // Enable MTU Jumbo Network (for multi-zone locations only) + Jumbo bool `json:"jumbo,omitempty"` + + // Maximum transmission unit (for satellite locations only) + // Maximum: 9000 + // Minimum: 1450 + Mtu int64 `json:"mtu,omitempty"` // Network Name // Required: true @@ -39,9 +46,9 @@ type NetworkReference struct { // Required: true NetworkID *string `json:"networkID"` - // Type of Network {vlan, pub-vlan} + // Type of Network - 'vlan' (private network) 'pub-vlan' (public network) 'dhcp-vlan' (for satellite locations only) // Required: true - // Enum: [vlan pub-vlan] + // Enum: [vlan pub-vlan dhcp-vlan] Type *string `json:"type"` // VLAN ID @@ -53,11 +60,15 @@ type NetworkReference struct { func (m *NetworkReference) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAccessConfig(formats); err != nil { + res = append(res, err) + } + if err := m.validateHref(formats); err != nil { res = append(res, err) } - if err := m.validateJumbo(formats); err != nil { + if err := m.validateMtu(formats); err != nil { res = append(res, err) } @@ -83,6 +94,23 @@ func (m *NetworkReference) Validate(formats strfmt.Registry) error { return nil } +func (m *NetworkReference) validateAccessConfig(formats strfmt.Registry) error { + if swag.IsZero(m.AccessConfig) { // not required + return nil + } + + if err := m.AccessConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("accessConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("accessConfig") + } + return err + } + + return nil +} + func (m *NetworkReference) validateHref(formats strfmt.Registry) error { if err := validate.Required("href", "body", m.Href); err != nil { @@ -92,9 +120,16 @@ func (m *NetworkReference) validateHref(formats strfmt.Registry) error { return nil } -func (m *NetworkReference) validateJumbo(formats strfmt.Registry) error { +func (m *NetworkReference) validateMtu(formats strfmt.Registry) error { + if swag.IsZero(m.Mtu) { // not required + return nil + } + + if err := validate.MinimumInt("mtu", "body", m.Mtu, 1450, false); err != nil { + return err + } - if err := validate.Required("jumbo", "body", m.Jumbo); err != nil { + if err := validate.MaximumInt("mtu", "body", m.Mtu, 9000, false); err != nil { return err } @@ -123,7 +158,7 @@ var networkReferenceTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["vlan","pub-vlan"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["vlan","pub-vlan","dhcp-vlan"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -138,6 +173,9 @@ const ( // NetworkReferenceTypePubDashVlan captures enum value "pub-vlan" NetworkReferenceTypePubDashVlan string = "pub-vlan" + + // NetworkReferenceTypeDhcpDashVlan captures enum value "dhcp-vlan" + NetworkReferenceTypeDhcpDashVlan string = "dhcp-vlan" ) // prop value enum @@ -171,8 +209,35 @@ func (m *NetworkReference) validateVlanID(formats strfmt.Registry) error { return nil } -// ContextValidate validates this network reference based on context it is used +// ContextValidate validate this network reference based on the context it is used func (m *NetworkReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAccessConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NetworkReference) contextValidateAccessConfig(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.AccessConfig) { // not required + return nil + } + + if err := m.AccessConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("accessConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("accessConfig") + } + return err + } + return nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_update.go index af849c48872..642b474bf01 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/network_update.go @@ -12,6 +12,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NetworkUpdate network update @@ -29,6 +30,7 @@ type NetworkUpdate struct { IPAddressRanges []*IPAddressRange `json:"ipAddressRanges"` // Replaces the current Network Name + // Max Length: 255 Name *string `json:"name,omitempty"` } @@ -40,6 +42,10 @@ func (m *NetworkUpdate) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -72,6 +78,18 @@ func (m *NetworkUpdate) validateIPAddressRanges(formats strfmt.Registry) error { return nil } +func (m *NetworkUpdate) validateName(formats strfmt.Registry) error { + if swag.IsZero(m.Name) { // not required + return nil + } + + if err := validate.MaxLength("name", "body", *m.Name, 255); err != nil { + return err + } + + return nil +} + // ContextValidate validate this network update based on the context it is used func (m *NetworkUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -91,6 +109,11 @@ func (m *NetworkUpdate) contextValidateIPAddressRanges(ctx context.Context, form for i := 0; i < len(m.IPAddressRanges); i++ { if m.IPAddressRanges[i] != nil { + + if swag.IsZero(m.IPAddressRanges[i]) { // not required + return nil + } + if err := m.IPAddressRanges[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipAddressRanges" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/networks.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/networks.go index 42428ee31df..24e4160a058 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/networks.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/networks.go @@ -85,6 +85,11 @@ func (m *Networks) contextValidateNetworks(ctx context.Context, formats strfmt.R for i := 0; i < len(m.Networks); i++ { if m.Networks[i] != nil { + + if swag.IsZero(m.Networks[i]) { // not required + return nil + } + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stack_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stack_info.go index b98ee9762c7..58b1e46136d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stack_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stack_info.go @@ -102,6 +102,11 @@ func (m *OpenStackInfo) contextValidateHosts(ctx context.Context, formats strfmt for i := 0; i < len(m.Hosts); i++ { if m.Hosts[i] != nil { + + if swag.IsZero(m.Hosts[i]) { // not required + return nil + } + if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stacks.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stacks.go index 3b4c526548c..bddbddfa73c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stacks.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/open_stacks.go @@ -85,6 +85,11 @@ func (m *OpenStacks) contextValidateOpenStacks(ctx context.Context, formats strf for i := 0; i < len(m.OpenStacks); i++ { if m.OpenStacks[i] != nil { + + if swag.IsZero(m.OpenStacks[i]) { // not required + return nil + } + if err := m.OpenStacks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("openStacks" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/options.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/options.go index f0738536b33..19f536f0937 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/options.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/options.go @@ -75,6 +75,7 @@ func (m *Options) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Options) contextValidateVpnaasOptions(ctx context.Context, formats strfmt.Registry) error { if m.VpnaasOptions != nil { + if err := m.VpnaasOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vpnaasOptions") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go index 3ed158c49e4..6377b7f79a8 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/owner_info.go @@ -207,6 +207,11 @@ func (m *OwnerInfo) contextValidateSoftlayerSubscriptions(ctx context.Context, f for i := 0; i < len(m.SoftlayerSubscriptions); i++ { if m.SoftlayerSubscriptions[i] != nil { + + if swag.IsZero(m.SoftlayerSubscriptions[i]) { // not required + return nil + } + if err := m.SoftlayerSubscriptions[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("softlayerSubscriptions" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go index 19f52b67968..34f7728bce2 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance.go @@ -31,7 +31,7 @@ type PVMInstance struct { // Format: date-time CreationDate strfmt.DateTime `json:"creationDate,omitempty"` - // Custom Deployment Type Information (For Internal Use Only) + // The custom deployment type DeploymentType string `json:"deploymentType,omitempty"` // Size of allocated disk (in GB) @@ -678,6 +678,11 @@ func (m *PVMInstance) contextValidateAddresses(ctx context.Context, formats strf for i := 0; i < len(m.Addresses); i++ { if m.Addresses[i] != nil { + + if swag.IsZero(m.Addresses[i]) { // not required + return nil + } + if err := m.Addresses[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("addresses" + "." + strconv.Itoa(i)) @@ -696,6 +701,11 @@ func (m *PVMInstance) contextValidateAddresses(ctx context.Context, formats strf func (m *PVMInstance) contextValidateConsoleLanguage(ctx context.Context, formats strfmt.Registry) error { if m.ConsoleLanguage != nil { + + if swag.IsZero(m.ConsoleLanguage) { // not required + return nil + } + if err := m.ConsoleLanguage.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("consoleLanguage") @@ -712,6 +722,11 @@ func (m *PVMInstance) contextValidateConsoleLanguage(ctx context.Context, format func (m *PVMInstance) contextValidateFault(ctx context.Context, formats strfmt.Registry) error { if m.Fault != nil { + + if swag.IsZero(m.Fault) { // not required + return nil + } + if err := m.Fault.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("fault") @@ -728,6 +743,11 @@ func (m *PVMInstance) contextValidateFault(ctx context.Context, formats strfmt.R func (m *PVMInstance) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { if m.Health != nil { + + if swag.IsZero(m.Health) { // not required + return nil + } + if err := m.Health.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("health") @@ -746,6 +766,11 @@ func (m *PVMInstance) contextValidateNetworks(ctx context.Context, formats strfm for i := 0; i < len(m.Networks); i++ { if m.Networks[i] != nil { + + if swag.IsZero(m.Networks[i]) { // not required + return nil + } + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) @@ -764,6 +789,11 @@ func (m *PVMInstance) contextValidateNetworks(ctx context.Context, formats strfm func (m *PVMInstance) contextValidateSapProfile(ctx context.Context, formats strfmt.Registry) error { if m.SapProfile != nil { + + if swag.IsZero(m.SapProfile) { // not required + return nil + } + if err := m.SapProfile.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sapProfile") @@ -780,6 +810,11 @@ func (m *PVMInstance) contextValidateSapProfile(ctx context.Context, formats str func (m *PVMInstance) contextValidateSoftwareLicenses(ctx context.Context, formats strfmt.Registry) error { if m.SoftwareLicenses != nil { + + if swag.IsZero(m.SoftwareLicenses) { // not required + return nil + } + if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("softwareLicenses") @@ -800,6 +835,11 @@ func (m *PVMInstance) contextValidateSrcs(ctx context.Context, formats strfmt.Re for ii := 0; ii < len(m.Srcs[i]); ii++ { if m.Srcs[i][ii] != nil { + + if swag.IsZero(m.Srcs[i][ii]) { // not required + return nil + } + if err := m.Srcs[i][ii].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) @@ -820,6 +860,11 @@ func (m *PVMInstance) contextValidateSrcs(ctx context.Context, formats strfmt.Re func (m *PVMInstance) contextValidateVirtualCores(ctx context.Context, formats strfmt.Registry) error { if m.VirtualCores != nil { + + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualCores") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_clone.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_clone.go index c517f97070f..6604fcf86af 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_clone.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_clone.go @@ -198,6 +198,11 @@ func (m *PVMInstanceClone) contextValidateNetworks(ctx context.Context, formats for i := 0; i < len(m.Networks); i++ { if m.Networks[i] != nil { + + if swag.IsZero(m.Networks[i]) { // not required + return nil + } + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) @@ -216,6 +221,11 @@ func (m *PVMInstanceClone) contextValidateNetworks(ctx context.Context, formats func (m *PVMInstanceClone) contextValidateSoftwareLicenses(ctx context.Context, formats strfmt.Registry) error { if m.SoftwareLicenses != nil { + + if swag.IsZero(m.SoftwareLicenses) { // not required + return nil + } + if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("softwareLicenses") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_configuration.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_configuration.go new file mode 100644 index 00000000000..10c13a146b5 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_configuration.go @@ -0,0 +1,285 @@ +// 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" +) + +// PVMInstanceConfiguration p VM instance configuration +// +// swagger:model PVMInstanceConfiguration +type PVMInstanceConfiguration struct { + + // Console language and code + ConsoleLanguage *ConsoleLanguage `json:"consoleLanguage,omitempty"` + + // The VTL license repository capacity TB value + LicenseRepositoryCapacity int64 `json:"licenseRepositoryCapacity,omitempty"` + + // If this is an SAP pvm-instance the profile reference will link to the SAP profile + SapProfile *SAPProfileReference `json:"sapProfile,omitempty"` + + // The pvm instance Software Licenses + SoftwareLicenses *SoftwareLicenses `json:"softwareLicenses,omitempty"` + + // The pvm instance system reference code lists + SystemReferenceCodes [][]*SRC `json:"systemReferenceCodes"` +} + +// Validate validates this p VM instance configuration +func (m *PVMInstanceConfiguration) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConsoleLanguage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSapProfile(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSoftwareLicenses(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSystemReferenceCodes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceConfiguration) validateConsoleLanguage(formats strfmt.Registry) error { + if swag.IsZero(m.ConsoleLanguage) { // not required + return nil + } + + if m.ConsoleLanguage != nil { + if err := m.ConsoleLanguage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("consoleLanguage") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("consoleLanguage") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceConfiguration) validateSapProfile(formats strfmt.Registry) error { + if swag.IsZero(m.SapProfile) { // not required + return nil + } + + if m.SapProfile != nil { + if err := m.SapProfile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sapProfile") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sapProfile") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceConfiguration) validateSoftwareLicenses(formats strfmt.Registry) error { + if swag.IsZero(m.SoftwareLicenses) { // not required + return nil + } + + if m.SoftwareLicenses != nil { + if err := m.SoftwareLicenses.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("softwareLicenses") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("softwareLicenses") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceConfiguration) validateSystemReferenceCodes(formats strfmt.Registry) error { + if swag.IsZero(m.SystemReferenceCodes) { // not required + return nil + } + + for i := 0; i < len(m.SystemReferenceCodes); i++ { + + for ii := 0; ii < len(m.SystemReferenceCodes[i]); ii++ { + if swag.IsZero(m.SystemReferenceCodes[i][ii]) { // not required + continue + } + + if m.SystemReferenceCodes[i][ii] != nil { + if err := m.SystemReferenceCodes[i][ii].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("systemReferenceCodes" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("systemReferenceCodes" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) + } + return err + } + } + + } + + } + + return nil +} + +// ContextValidate validate this p VM instance configuration based on the context it is used +func (m *PVMInstanceConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConsoleLanguage(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSapProfile(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSoftwareLicenses(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSystemReferenceCodes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceConfiguration) contextValidateConsoleLanguage(ctx context.Context, formats strfmt.Registry) error { + + if m.ConsoleLanguage != nil { + + if swag.IsZero(m.ConsoleLanguage) { // not required + return nil + } + + if err := m.ConsoleLanguage.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("consoleLanguage") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("consoleLanguage") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceConfiguration) contextValidateSapProfile(ctx context.Context, formats strfmt.Registry) error { + + if m.SapProfile != nil { + + if swag.IsZero(m.SapProfile) { // not required + return nil + } + + if err := m.SapProfile.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sapProfile") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sapProfile") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceConfiguration) contextValidateSoftwareLicenses(ctx context.Context, formats strfmt.Registry) error { + + if m.SoftwareLicenses != nil { + + if swag.IsZero(m.SoftwareLicenses) { // not required + return nil + } + + if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("softwareLicenses") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("softwareLicenses") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceConfiguration) contextValidateSystemReferenceCodes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SystemReferenceCodes); i++ { + + for ii := 0; ii < len(m.SystemReferenceCodes[i]); ii++ { + + if m.SystemReferenceCodes[i][ii] != nil { + + if swag.IsZero(m.SystemReferenceCodes[i][ii]) { // not required + return nil + } + + if err := m.SystemReferenceCodes[i][ii].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("systemReferenceCodes" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("systemReferenceCodes" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) + } + return err + } + } + + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstanceConfiguration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstanceConfiguration) UnmarshalBinary(b []byte) error { + var res PVMInstanceConfiguration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_cores.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_cores.go new file mode 100644 index 00000000000..5a74aa1e937 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_cores.go @@ -0,0 +1,77 @@ +// 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" +) + +// PVMInstanceCores p VM instance cores +// +// swagger:model PVMInstanceCores +type PVMInstanceCores struct { + + // The active processor information + // Required: true + Assigned *float64 `json:"assigned"` + + // The maximum number of processors that can be allocated (for resize) + Maximum float64 `json:"maximum,omitempty"` + + // The minimum number of processors that can be allocated (for resize) + Minimum float64 `json:"minimum,omitempty"` +} + +// Validate validates this p VM instance cores +func (m *PVMInstanceCores) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssigned(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceCores) validateAssigned(formats strfmt.Registry) error { + + if err := validate.Required("assigned", "body", m.Assigned); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p VM instance cores based on context it is used +func (m *PVMInstanceCores) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstanceCores) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstanceCores) UnmarshalBinary(b []byte) error { + var res PVMInstanceCores + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go index 24872097751..5404989baee 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_create.go @@ -21,7 +21,7 @@ import ( // swagger:model PVMInstanceCreate type PVMInstanceCreate struct { - // Custom Deployment Type Information (For Internal Use Only) + // The custom deployment type DeploymentType string `json:"deploymentType,omitempty"` // Image ID of the image to use for the server @@ -514,6 +514,11 @@ func (m *PVMInstanceCreate) contextValidateNetworks(ctx context.Context, formats for i := 0; i < len(m.Networks); i++ { if m.Networks[i] != nil { + + if swag.IsZero(m.Networks[i]) { // not required + return nil + } + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) @@ -531,6 +536,10 @@ func (m *PVMInstanceCreate) contextValidateNetworks(ctx context.Context, formats func (m *PVMInstanceCreate) contextValidatePinPolicy(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.PinPolicy) { // not required + return nil + } + if err := m.PinPolicy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pinPolicy") @@ -546,6 +555,11 @@ func (m *PVMInstanceCreate) contextValidatePinPolicy(ctx context.Context, format func (m *PVMInstanceCreate) contextValidateSoftwareLicenses(ctx context.Context, formats strfmt.Registry) error { if m.SoftwareLicenses != nil { + + if swag.IsZero(m.SoftwareLicenses) { // not required + return nil + } + if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("softwareLicenses") @@ -562,6 +576,11 @@ func (m *PVMInstanceCreate) contextValidateSoftwareLicenses(ctx context.Context, func (m *PVMInstanceCreate) contextValidateStorageAffinity(ctx context.Context, formats strfmt.Registry) error { if m.StorageAffinity != nil { + + if swag.IsZero(m.StorageAffinity) { // not required + return nil + } + if err := m.StorageAffinity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("storageAffinity") @@ -578,6 +597,11 @@ func (m *PVMInstanceCreate) contextValidateStorageAffinity(ctx context.Context, func (m *PVMInstanceCreate) contextValidateVirtualCores(ctx context.Context, formats strfmt.Registry) error { if m.VirtualCores != nil { + + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualCores") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_list.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_list.go index 2345d10dd6c..531cb4b870e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_list.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_list.go @@ -54,6 +54,11 @@ func (m PVMInstanceList) ContextValidate(ctx context.Context, formats strfmt.Reg for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_memory.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_memory.go new file mode 100644 index 00000000000..daec175bc18 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_memory.go @@ -0,0 +1,77 @@ +// 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" +) + +// PVMInstanceMemory p VM instance memory +// +// swagger:model PVMInstanceMemory +type PVMInstanceMemory struct { + + // The active memory information + // Required: true + Assigned *float64 `json:"assigned"` + + // The maximum amount of memory that can be allocated (in GB, for resize) + Maximum float64 `json:"maximum,omitempty"` + + // The minimum amount of memory that can be allocated (in GB, for resize) + Minimum float64 `json:"minimum,omitempty"` +} + +// Validate validates this p VM instance memory +func (m *PVMInstanceMemory) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssigned(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceMemory) validateAssigned(formats strfmt.Registry) error { + + if err := validate.Required("assigned", "body", m.Assigned); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p VM instance memory based on context it is used +func (m *PVMInstanceMemory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstanceMemory) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstanceMemory) UnmarshalBinary(b []byte) error { + var res PVMInstanceMemory + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_networks.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_networks.go index e511b64dfc3..dab3b208330 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_networks.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_networks.go @@ -85,6 +85,11 @@ func (m *PVMInstanceNetworks) contextValidateNetworks(ctx context.Context, forma for i := 0; i < len(m.Networks); i++ { if m.Networks[i] != nil { + + if swag.IsZero(m.Networks[i]) { // not required + return nil + } + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operating_system.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operating_system.go new file mode 100644 index 00000000000..378d58f5461 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operating_system.go @@ -0,0 +1,74 @@ +// 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" +) + +// PVMInstanceOperatingSystem p VM instance operating system +// +// swagger:model PVMInstanceOperatingSystem +type PVMInstanceOperatingSystem struct { + + // Type of the OS [aix, ibmi, rhel, sles, vtl, rhcos] + // Required: true + Type *string `json:"type"` + + // OS system information (usually version and build) + Version string `json:"version,omitempty"` +} + +// Validate validates this p VM instance operating system +func (m *PVMInstanceOperatingSystem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceOperatingSystem) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p VM instance operating system based on context it is used +func (m *PVMInstanceOperatingSystem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstanceOperatingSystem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstanceOperatingSystem) UnmarshalBinary(b []byte) error { + var res PVMInstanceOperatingSystem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operation.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operation.go index f9c202e542a..37c18f85a16 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operation.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_operation.go @@ -128,6 +128,7 @@ func (m *PVMInstanceOperation) ContextValidate(ctx context.Context, formats strf func (m *PVMInstanceOperation) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { if m.Operation != nil { + if err := m.Operation.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("operation") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go index 67d579dcc50..79227b4c720 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference.go @@ -638,6 +638,11 @@ func (m *PVMInstanceReference) contextValidateAddresses(ctx context.Context, for for i := 0; i < len(m.Addresses); i++ { if m.Addresses[i] != nil { + + if swag.IsZero(m.Addresses[i]) { // not required + return nil + } + if err := m.Addresses[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("addresses" + "." + strconv.Itoa(i)) @@ -656,6 +661,11 @@ func (m *PVMInstanceReference) contextValidateAddresses(ctx context.Context, for func (m *PVMInstanceReference) contextValidateConsoleLanguage(ctx context.Context, formats strfmt.Registry) error { if m.ConsoleLanguage != nil { + + if swag.IsZero(m.ConsoleLanguage) { // not required + return nil + } + if err := m.ConsoleLanguage.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("consoleLanguage") @@ -672,6 +682,11 @@ func (m *PVMInstanceReference) contextValidateConsoleLanguage(ctx context.Contex func (m *PVMInstanceReference) contextValidateFault(ctx context.Context, formats strfmt.Registry) error { if m.Fault != nil { + + if swag.IsZero(m.Fault) { // not required + return nil + } + if err := m.Fault.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("fault") @@ -688,6 +703,11 @@ func (m *PVMInstanceReference) contextValidateFault(ctx context.Context, formats func (m *PVMInstanceReference) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { if m.Health != nil { + + if swag.IsZero(m.Health) { // not required + return nil + } + if err := m.Health.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("health") @@ -706,6 +726,11 @@ func (m *PVMInstanceReference) contextValidateNetworks(ctx context.Context, form for i := 0; i < len(m.Networks); i++ { if m.Networks[i] != nil { + + if swag.IsZero(m.Networks[i]) { // not required + return nil + } + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) @@ -724,6 +749,11 @@ func (m *PVMInstanceReference) contextValidateNetworks(ctx context.Context, form func (m *PVMInstanceReference) contextValidateSapProfile(ctx context.Context, formats strfmt.Registry) error { if m.SapProfile != nil { + + if swag.IsZero(m.SapProfile) { // not required + return nil + } + if err := m.SapProfile.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sapProfile") @@ -740,6 +770,11 @@ func (m *PVMInstanceReference) contextValidateSapProfile(ctx context.Context, fo func (m *PVMInstanceReference) contextValidateSoftwareLicenses(ctx context.Context, formats strfmt.Registry) error { if m.SoftwareLicenses != nil { + + if swag.IsZero(m.SoftwareLicenses) { // not required + return nil + } + if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("softwareLicenses") @@ -760,6 +795,11 @@ func (m *PVMInstanceReference) contextValidateSrcs(ctx context.Context, formats for ii := 0; ii < len(m.Srcs[i]); ii++ { if m.Srcs[i][ii] != nil { + + if swag.IsZero(m.Srcs[i][ii]) { // not required + return nil + } + if err := m.Srcs[i][ii].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("srcs" + "." + strconv.Itoa(i) + "." + strconv.Itoa(ii)) @@ -780,6 +820,11 @@ func (m *PVMInstanceReference) contextValidateSrcs(ctx context.Context, formats func (m *PVMInstanceReference) contextValidateVirtualCores(ctx context.Context, formats strfmt.Registry) error { if m.VirtualCores != nil { + + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualCores") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference_v2.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference_v2.go new file mode 100644 index 00000000000..4fcc6864da2 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_reference_v2.go @@ -0,0 +1,663 @@ +// 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" +) + +// PVMInstanceReferenceV2 p VM instance reference v2 +// +// swagger:model PVMInstanceReferenceV2 +type PVMInstanceReferenceV2 struct { + + // The pvm instance server configuration + Configuration *PVMInstanceConfiguration `json:"configuration,omitempty"` + + // The pvm instance cores information + // Required: true + Cores *PVMInstanceCores `json:"cores"` + + // Date/Time of PVM creation + // Format: date-time + CreationDate strfmt.DateTime `json:"creationDate,omitempty"` + + // The pvm instance deployment information + // Required: true + Deployment *PvmInstanceDeployment `json:"deployment"` + + // health + Health *PVMInstanceV2Health `json:"health,omitempty"` + + // The pvm instance host information + Host *PvmInstanceHost `json:"host,omitempty"` + + // Link to Cloud Instance resource + // Required: true + Href *string `json:"href"` + + // PCloud PVM Instance ID + // Required: true + ID *string `json:"id"` + + // The pvm instance memory information + // Required: true + Memory *PVMInstanceMemory `json:"memory"` + + // Name of the server + // Required: true + Name *string `json:"name"` + + // The pvm instance network ports information + // Required: true + NetworkPorts []*PVMInstanceV2NetworkPort `json:"networkPorts"` + + // The pvm instance OS system information + // Required: true + OperatingSystem *PVMInstanceOperatingSystem `json:"operatingSystem"` + + // The pvm instance placement group information + PlacementGroup *PvmInstancePlacementGroup `json:"placementGroup,omitempty"` + + // The status of the instance + // Required: true + Status *string `json:"status"` + + // The pvm instance virtual CPU information + VirtualCores *PVMInstanceVirtualCores `json:"virtualCores,omitempty"` +} + +// Validate validates this p VM instance reference v2 +func (m *PVMInstanceReferenceV2) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfiguration(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreationDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeployment(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHref(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworkPorts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperatingSystem(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacementGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVirtualCores(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceReferenceV2) validateConfiguration(formats strfmt.Registry) error { + if swag.IsZero(m.Configuration) { // not required + return nil + } + + if m.Configuration != nil { + if err := m.Configuration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configuration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configuration") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateCores(formats strfmt.Registry) error { + + if err := validate.Required("cores", "body", m.Cores); err != nil { + return err + } + + if m.Cores != nil { + if err := m.Cores.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cores") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateCreationDate(formats strfmt.Registry) error { + if swag.IsZero(m.CreationDate) { // not required + return nil + } + + if err := validate.FormatOf("creationDate", "body", "date-time", m.CreationDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateDeployment(formats strfmt.Registry) error { + + if err := validate.Required("deployment", "body", m.Deployment); err != nil { + return err + } + + if m.Deployment != nil { + if err := m.Deployment.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deployment") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deployment") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateHealth(formats strfmt.Registry) error { + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("health") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateHost(formats strfmt.Registry) error { + if swag.IsZero(m.Host) { // not required + return nil + } + + if m.Host != nil { + if err := m.Host.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("host") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("host") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateHref(formats strfmt.Registry) error { + + if err := validate.Required("href", "body", m.Href); err != nil { + return err + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateMemory(formats strfmt.Registry) error { + + if err := validate.Required("memory", "body", m.Memory); err != nil { + return err + } + + if m.Memory != nil { + if err := m.Memory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("memory") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateNetworkPorts(formats strfmt.Registry) error { + + if err := validate.Required("networkPorts", "body", m.NetworkPorts); err != nil { + return err + } + + for i := 0; i < len(m.NetworkPorts); i++ { + if swag.IsZero(m.NetworkPorts[i]) { // not required + continue + } + + if m.NetworkPorts[i] != nil { + if err := m.NetworkPorts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networkPorts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("networkPorts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateOperatingSystem(formats strfmt.Registry) error { + + if err := validate.Required("operatingSystem", "body", m.OperatingSystem); err != nil { + return err + } + + if m.OperatingSystem != nil { + if err := m.OperatingSystem.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operatingSystem") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("operatingSystem") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validatePlacementGroup(formats strfmt.Registry) error { + if swag.IsZero(m.PlacementGroup) { // not required + return nil + } + + if m.PlacementGroup != nil { + if err := m.PlacementGroup.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placementGroup") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placementGroup") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *PVMInstanceReferenceV2) validateVirtualCores(formats strfmt.Registry) error { + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + + if m.VirtualCores != nil { + if err := m.VirtualCores.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualCores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualCores") + } + return err + } + } + + return nil +} + +// ContextValidate validate this p VM instance reference v2 based on the context it is used +func (m *PVMInstanceReferenceV2) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConfiguration(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCores(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDeployment(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateHealth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateHost(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMemory(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNetworkPorts(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOperatingSystem(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePlacementGroup(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVirtualCores(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateConfiguration(ctx context.Context, formats strfmt.Registry) error { + + if m.Configuration != nil { + + if swag.IsZero(m.Configuration) { // not required + return nil + } + + if err := m.Configuration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configuration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configuration") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateCores(ctx context.Context, formats strfmt.Registry) error { + + if m.Cores != nil { + + if err := m.Cores.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cores") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateDeployment(ctx context.Context, formats strfmt.Registry) error { + + if m.Deployment != nil { + + if err := m.Deployment.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deployment") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deployment") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { + + if m.Health != nil { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if err := m.Health.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("health") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateHost(ctx context.Context, formats strfmt.Registry) error { + + if m.Host != nil { + + if swag.IsZero(m.Host) { // not required + return nil + } + + if err := m.Host.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("host") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("host") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateMemory(ctx context.Context, formats strfmt.Registry) error { + + if m.Memory != nil { + + if err := m.Memory.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("memory") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateNetworkPorts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.NetworkPorts); i++ { + + if m.NetworkPorts[i] != nil { + + if swag.IsZero(m.NetworkPorts[i]) { // not required + return nil + } + + if err := m.NetworkPorts[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networkPorts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("networkPorts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateOperatingSystem(ctx context.Context, formats strfmt.Registry) error { + + if m.OperatingSystem != nil { + + if err := m.OperatingSystem.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operatingSystem") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("operatingSystem") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidatePlacementGroup(ctx context.Context, formats strfmt.Registry) error { + + if m.PlacementGroup != nil { + + if swag.IsZero(m.PlacementGroup) { // not required + return nil + } + + if err := m.PlacementGroup.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placementGroup") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placementGroup") + } + return err + } + } + + return nil +} + +func (m *PVMInstanceReferenceV2) contextValidateVirtualCores(ctx context.Context, formats strfmt.Registry) error { + + if m.VirtualCores != nil { + + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + + if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualCores") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("virtualCores") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstanceReferenceV2) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstanceReferenceV2) UnmarshalBinary(b []byte) error { + var res PVMInstanceReferenceV2 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go index fc46d11516c..4fb843f6a26 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update.go @@ -20,6 +20,9 @@ import ( // swagger:model PVMInstanceUpdate type PVMInstanceUpdate struct { + // Cloud Initialization Volume operations + CloudInitialization *CloudInitialization `json:"cloudInitialization,omitempty"` + // The VTL license repository capacity TB value LicenseRepositoryCapacity int64 `json:"licenseRepositoryCapacity,omitempty"` @@ -59,6 +62,10 @@ type PVMInstanceUpdate struct { func (m *PVMInstanceUpdate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateCloudInitialization(formats); err != nil { + res = append(res, err) + } + if err := m.validatePinPolicy(formats); err != nil { res = append(res, err) } @@ -81,6 +88,25 @@ func (m *PVMInstanceUpdate) Validate(formats strfmt.Registry) error { return nil } +func (m *PVMInstanceUpdate) validateCloudInitialization(formats strfmt.Registry) error { + if swag.IsZero(m.CloudInitialization) { // not required + return nil + } + + if m.CloudInitialization != nil { + if err := m.CloudInitialization.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudInitialization") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cloudInitialization") + } + return err + } + } + + return nil +} + func (m *PVMInstanceUpdate) validatePinPolicy(formats strfmt.Registry) error { if swag.IsZero(m.PinPolicy) { // not required return nil @@ -185,6 +211,10 @@ func (m *PVMInstanceUpdate) validateVirtualCores(formats strfmt.Registry) error func (m *PVMInstanceUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateCloudInitialization(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidatePinPolicy(ctx, formats); err != nil { res = append(res, err) } @@ -203,8 +233,33 @@ func (m *PVMInstanceUpdate) ContextValidate(ctx context.Context, formats strfmt. return nil } +func (m *PVMInstanceUpdate) contextValidateCloudInitialization(ctx context.Context, formats strfmt.Registry) error { + + if m.CloudInitialization != nil { + + if swag.IsZero(m.CloudInitialization) { // not required + return nil + } + + if err := m.CloudInitialization.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudInitialization") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cloudInitialization") + } + return err + } + } + + return nil +} + func (m *PVMInstanceUpdate) contextValidatePinPolicy(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.PinPolicy) { // not required + return nil + } + if err := m.PinPolicy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pinPolicy") @@ -220,6 +275,11 @@ func (m *PVMInstanceUpdate) contextValidatePinPolicy(ctx context.Context, format func (m *PVMInstanceUpdate) contextValidateSoftwareLicenses(ctx context.Context, formats strfmt.Registry) error { if m.SoftwareLicenses != nil { + + if swag.IsZero(m.SoftwareLicenses) { // not required + return nil + } + if err := m.SoftwareLicenses.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("softwareLicenses") @@ -236,6 +296,11 @@ func (m *PVMInstanceUpdate) contextValidateSoftwareLicenses(ctx context.Context, func (m *PVMInstanceUpdate) contextValidateVirtualCores(ctx context.Context, formats strfmt.Registry) error { if m.VirtualCores != nil { + + if swag.IsZero(m.VirtualCores) { // not required + return nil + } + if err := m.VirtualCores.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("virtualCores") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go index 5f19935c501..1c8e9a7642f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_update_response.go @@ -139,6 +139,10 @@ func (m *PVMInstanceUpdateResponse) ContextValidate(ctx context.Context, formats func (m *PVMInstanceUpdateResponse) contextValidatePinPolicy(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.PinPolicy) { // not required + return nil + } + if err := m.PinPolicy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pinPolicy") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_health.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_health.go new file mode 100644 index 00000000000..99ee65be1b0 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_health.go @@ -0,0 +1,71 @@ +// 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" +) + +// PVMInstanceV2Health PVM's health status details +// +// swagger:model PVMInstanceV2Health +type PVMInstanceV2Health struct { + + // The PVM's health status value + // Required: true + Status *string `json:"status"` +} + +// Validate validates this p VM instance v2 health +func (m *PVMInstanceV2Health) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceV2Health) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p VM instance v2 health based on context it is used +func (m *PVMInstanceV2Health) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstanceV2Health) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstanceV2Health) UnmarshalBinary(b []byte) error { + var res PVMInstanceV2Health + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_network_port.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_network_port.go new file mode 100644 index 00000000000..dc5bacb434d --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_v2_network_port.go @@ -0,0 +1,164 @@ +// 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" +) + +// PVMInstanceV2NetworkPort PVM's Port information +// +// swagger:model PVMInstanceV2NetworkPort +type PVMInstanceV2NetworkPort struct { + + // Unique Port ID + ID string `json:"id,omitempty"` + + // Dynamic Host Configuration Protocol {IPv4, IPv6} + // Enum: [IPv4 IPv6] + IPProtocol string `json:"ipProtocol,omitempty"` + + // The mac address of the network interface + MacAddress string `json:"macAddress,omitempty"` + + // The private ip address + PrivateIP string `json:"privateIP,omitempty"` + + // The type of ip allocation {dhcp, static} + // Enum: [dhcp static] + Type string `json:"type,omitempty"` +} + +// Validate validates this p VM instance v2 network port +func (m *PVMInstanceV2NetworkPort) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIPProtocol(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 +} + +var pVmInstanceV2NetworkPortTypeIPProtocolPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["IPv4","IPv6"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + pVmInstanceV2NetworkPortTypeIPProtocolPropEnum = append(pVmInstanceV2NetworkPortTypeIPProtocolPropEnum, v) + } +} + +const ( + + // PVMInstanceV2NetworkPortIPProtocolIPV4 captures enum value "IPv4" + PVMInstanceV2NetworkPortIPProtocolIPV4 string = "IPv4" + + // PVMInstanceV2NetworkPortIPProtocolIPV6 captures enum value "IPv6" + PVMInstanceV2NetworkPortIPProtocolIPV6 string = "IPv6" +) + +// prop value enum +func (m *PVMInstanceV2NetworkPort) validateIPProtocolEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, pVmInstanceV2NetworkPortTypeIPProtocolPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *PVMInstanceV2NetworkPort) validateIPProtocol(formats strfmt.Registry) error { + if swag.IsZero(m.IPProtocol) { // not required + return nil + } + + // value enum + if err := m.validateIPProtocolEnum("ipProtocol", "body", m.IPProtocol); err != nil { + return err + } + + return nil +} + +var pVmInstanceV2NetworkPortTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["dhcp","static"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + pVmInstanceV2NetworkPortTypeTypePropEnum = append(pVmInstanceV2NetworkPortTypeTypePropEnum, v) + } +} + +const ( + + // PVMInstanceV2NetworkPortTypeDhcp captures enum value "dhcp" + PVMInstanceV2NetworkPortTypeDhcp string = "dhcp" + + // PVMInstanceV2NetworkPortTypeStatic captures enum value "static" + PVMInstanceV2NetworkPortTypeStatic string = "static" +) + +// prop value enum +func (m *PVMInstanceV2NetworkPort) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, pVmInstanceV2NetworkPortTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *PVMInstanceV2NetworkPort) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p VM instance v2 network port based on context it is used +func (m *PVMInstanceV2NetworkPort) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstanceV2NetworkPort) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstanceV2NetworkPort) UnmarshalBinary(b []byte) error { + var res PVMInstanceV2NetworkPort + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_virtual_cores.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_virtual_cores.go new file mode 100644 index 00000000000..fd587581e9c --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instance_virtual_cores.go @@ -0,0 +1,82 @@ +// 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" +) + +// PVMInstanceVirtualCores p VM instance virtual cores +// +// swagger:model PVMInstanceVirtualCores +type PVMInstanceVirtualCores struct { + + // The active virtual Cores + // Required: true + // Minimum: 1 + Assigned *int64 `json:"assigned"` + + // The maximum DLPAR range for virtual Cores (Display only support) + Maximum int64 `json:"maximum,omitempty"` + + // The minimum DLPAR range for virtual Cores (Display only support) + Minimum int64 `json:"minimum,omitempty"` +} + +// Validate validates this p VM instance virtual cores +func (m *PVMInstanceVirtualCores) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssigned(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstanceVirtualCores) validateAssigned(formats strfmt.Registry) error { + + if err := validate.Required("assigned", "body", m.Assigned); err != nil { + return err + } + + if err := validate.MinimumInt("assigned", "body", *m.Assigned, 1, false); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p VM instance virtual cores based on context it is used +func (m *PVMInstanceVirtualCores) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstanceVirtualCores) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstanceVirtualCores) UnmarshalBinary(b []byte) error { + var res PVMInstanceVirtualCores + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances.go index c535bc5fb0d..1d0f5513a73 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances.go @@ -85,6 +85,11 @@ func (m *PVMInstances) contextValidatePvmInstances(ctx context.Context, formats for i := 0; i < len(m.PvmInstances); i++ { if m.PvmInstances[i] != nil { + + if swag.IsZero(m.PvmInstances[i]) { // not required + return nil + } + if err := m.PvmInstances[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances_v2.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances_v2.go new file mode 100644 index 00000000000..84e3e299583 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/p_vm_instances_v2.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" +) + +// PVMInstancesV2 p VM instances v2 +// +// swagger:model PVMInstancesV2 +type PVMInstancesV2 struct { + + // PVM Instance References + // Required: true + PvmInstances []*PVMInstanceReferenceV2 `json:"pvmInstances"` +} + +// Validate validates this p VM instances v2 +func (m *PVMInstancesV2) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePvmInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstancesV2) validatePvmInstances(formats strfmt.Registry) error { + + if err := validate.Required("pvmInstances", "body", m.PvmInstances); err != nil { + return err + } + + for i := 0; i < len(m.PvmInstances); i++ { + if swag.IsZero(m.PvmInstances[i]) { // not required + continue + } + + if m.PvmInstances[i] != nil { + if err := m.PvmInstances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this p VM instances v2 based on the context it is used +func (m *PVMInstancesV2) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePvmInstances(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PVMInstancesV2) contextValidatePvmInstances(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PvmInstances); i++ { + + if m.PvmInstances[i] != nil { + + if swag.IsZero(m.PvmInstances[i]) { // not required + return nil + } + + if err := m.PvmInstances[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pvmInstances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PVMInstancesV2) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PVMInstancesV2) UnmarshalBinary(b []byte) error { + var res PVMInstancesV2 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go index 9c033b6937a..f0912c9b2e0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/placement_groups.go @@ -85,6 +85,11 @@ func (m *PlacementGroups) contextValidatePlacementGroups(ctx context.Context, fo for i := 0; i < len(m.PlacementGroups); i++ { if m.PlacementGroups[i] != nil { + + if swag.IsZero(m.PlacementGroups[i]) { // not required + return nil + } + if err := m.PlacementGroups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("placementGroups" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/plan.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/plan.go index 8a3eb9c4613..c74c46fb941 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/plan.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/plan.go @@ -133,6 +133,11 @@ func (m *Plan) ContextValidate(ctx context.Context, formats strfmt.Registry) err func (m *Plan) contextValidateSchemas(ctx context.Context, formats strfmt.Registry) error { if m.Schemas != nil { + + if swag.IsZero(m.Schemas) { // not required + return nil + } + if err := m.Schemas.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("schemas") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_capacity.go new file mode 100644 index 00000000000..c0a4e2a32a1 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_capacity.go @@ -0,0 +1,205 @@ +// 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" +) + +// PodCapacity List of available resources within a Pod +// +// swagger:model PodCapacity +type PodCapacity struct { + + // pod data + PodData *PodData `json:"PodData,omitempty"` + + // storage controllers + StorageControllers StorageControllers `json:"StorageControllers,omitempty"` + + // system pools + SystemPools SystemPoolsCapacity `json:"SystemPools,omitempty"` +} + +// Validate validates this pod capacity +func (m *PodCapacity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePodData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorageControllers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSystemPools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PodCapacity) validatePodData(formats strfmt.Registry) error { + if swag.IsZero(m.PodData) { // not required + return nil + } + + if m.PodData != nil { + if err := m.PodData.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("PodData") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("PodData") + } + return err + } + } + + return nil +} + +func (m *PodCapacity) validateStorageControllers(formats strfmt.Registry) error { + if swag.IsZero(m.StorageControllers) { // not required + return nil + } + + if m.StorageControllers != nil { + if err := m.StorageControllers.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StorageControllers") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("StorageControllers") + } + return err + } + } + + return nil +} + +func (m *PodCapacity) validateSystemPools(formats strfmt.Registry) error { + if swag.IsZero(m.SystemPools) { // not required + return nil + } + + if m.SystemPools != nil { + if err := m.SystemPools.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SystemPools") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("SystemPools") + } + return err + } + } + + return nil +} + +// ContextValidate validate this pod capacity based on the context it is used +func (m *PodCapacity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePodData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStorageControllers(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSystemPools(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PodCapacity) contextValidatePodData(ctx context.Context, formats strfmt.Registry) error { + + if m.PodData != nil { + + if swag.IsZero(m.PodData) { // not required + return nil + } + + if err := m.PodData.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("PodData") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("PodData") + } + return err + } + } + + return nil +} + +func (m *PodCapacity) contextValidateStorageControllers(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.StorageControllers) { // not required + return nil + } + + if err := m.StorageControllers.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StorageControllers") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("StorageControllers") + } + return err + } + + return nil +} + +func (m *PodCapacity) contextValidateSystemPools(ctx context.Context, formats strfmt.Registry) error { + + if swag.IsZero(m.SystemPools) { // not required + return nil + } + + if err := m.SystemPools.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SystemPools") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("SystemPools") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PodCapacity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PodCapacity) UnmarshalBinary(b []byte) error { + var res PodCapacity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_data.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_data.go new file mode 100644 index 00000000000..85dfbc24c04 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pod_data.go @@ -0,0 +1,173 @@ +// 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" +) + +// PodData Description of a PPCaaS Pod +// +// swagger:model PodData +type PodData struct { + + // Number of available cores in the Pod + // Required: true + Cores *float64 `json:"cores"` + + // Amount of available memory in the Pod (GB) + // Required: true + Memory *int64 `json:"memory"` + + // ID of the Satellite Location + // Required: true + SatLocationID *string `json:"satLocationID"` + + // Amount of available storage in the Pod (GB) + // Required: true + Storage *int64 `json:"storage"` + + // Total number of cores in the Pod + // Required: true + TotalCores *float64 `json:"totalCores"` + + // Total amount of memory in the Pod (GB) + // Required: true + TotalMemory *int64 `json:"totalMemory"` + + // Total amount of storage in the Pod (GB) + // Required: true + TotalStorage *int64 `json:"totalStorage"` +} + +// Validate validates this pod data +func (m *PodData) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSatLocationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotalCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotalMemory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotalStorage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PodData) validateCores(formats strfmt.Registry) error { + + if err := validate.Required("cores", "body", m.Cores); err != nil { + return err + } + + return nil +} + +func (m *PodData) validateMemory(formats strfmt.Registry) error { + + if err := validate.Required("memory", "body", m.Memory); err != nil { + return err + } + + return nil +} + +func (m *PodData) validateSatLocationID(formats strfmt.Registry) error { + + if err := validate.Required("satLocationID", "body", m.SatLocationID); err != nil { + return err + } + + return nil +} + +func (m *PodData) validateStorage(formats strfmt.Registry) error { + + if err := validate.Required("storage", "body", m.Storage); err != nil { + return err + } + + return nil +} + +func (m *PodData) validateTotalCores(formats strfmt.Registry) error { + + if err := validate.Required("totalCores", "body", m.TotalCores); err != nil { + return err + } + + return nil +} + +func (m *PodData) validateTotalMemory(formats strfmt.Registry) error { + + if err := validate.Required("totalMemory", "body", m.TotalMemory); err != nil { + return err + } + + return nil +} + +func (m *PodData) validateTotalStorage(formats strfmt.Registry) error { + + if err := validate.Required("totalStorage", "body", m.TotalStorage); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this pod data based on context it is used +func (m *PodData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PodData) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PodData) UnmarshalBinary(b []byte) error { + var res PodData + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instances.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instances.go index 4ccd656d337..e881a1cfc48 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instances.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/power_v_s_instances.go @@ -85,6 +85,11 @@ func (m *PowerVSInstances) contextValidatePowerVsInstances(ctx context.Context, for i := 0; i < len(m.PowerVsInstances); i++ { if m.PowerVsInstances[i] != nil { + + if swag.IsZero(m.PowerVsInstances[i]) { // not required + return nil + } + if err := m.PowerVsInstances[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_deployment.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_deployment.go new file mode 100644 index 00000000000..e3be7beadab --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_deployment.go @@ -0,0 +1,119 @@ +// 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" +) + +// PvmInstanceDeployment pvm instance deployment +// +// swagger:model PvmInstanceDeployment +type PvmInstanceDeployment struct { + + // Machine type used to host the instance + MachineType string `json:"machineType,omitempty"` + + // VM pin policy to use [none, soft, hard] + PinPolicy string `json:"pinPolicy,omitempty"` + + // Processor mode (dedicated, shared, capped) + // Required: true + // Enum: [dedicated shared capped] + ProcessorMode *string `json:"processorMode"` + + // Type of Deployment [SAP-RISE, EPIC] + Type string `json:"type,omitempty"` +} + +// Validate validates this pvm instance deployment +func (m *PvmInstanceDeployment) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProcessorMode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var pvmInstanceDeploymentTypeProcessorModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["dedicated","shared","capped"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + pvmInstanceDeploymentTypeProcessorModePropEnum = append(pvmInstanceDeploymentTypeProcessorModePropEnum, v) + } +} + +const ( + + // PvmInstanceDeploymentProcessorModeDedicated captures enum value "dedicated" + PvmInstanceDeploymentProcessorModeDedicated string = "dedicated" + + // PvmInstanceDeploymentProcessorModeShared captures enum value "shared" + PvmInstanceDeploymentProcessorModeShared string = "shared" + + // PvmInstanceDeploymentProcessorModeCapped captures enum value "capped" + PvmInstanceDeploymentProcessorModeCapped string = "capped" +) + +// prop value enum +func (m *PvmInstanceDeployment) validateProcessorModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, pvmInstanceDeploymentTypeProcessorModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *PvmInstanceDeployment) validateProcessorMode(formats strfmt.Registry) error { + + if err := validate.Required("processorMode", "body", m.ProcessorMode); err != nil { + return err + } + + // value enum + if err := m.validateProcessorModeEnum("processorMode", "body", *m.ProcessorMode); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this pvm instance deployment based on context it is used +func (m *PvmInstanceDeployment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PvmInstanceDeployment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PvmInstanceDeployment) UnmarshalBinary(b []byte) error { + var res PvmInstanceDeployment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_host.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_host.go new file mode 100644 index 00000000000..9b5acb653f2 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_host.go @@ -0,0 +1,50 @@ +// 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/strfmt" + "github.com/go-openapi/swag" +) + +// PvmInstanceHost pvm instance host +// +// swagger:model PvmInstanceHost +type PvmInstanceHost struct { + + // The PVM Instance Host ID (Internal Use Only) + ID int64 `json:"id,omitempty"` +} + +// Validate validates this pvm instance host +func (m *PvmInstanceHost) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this pvm instance host based on context it is used +func (m *PvmInstanceHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PvmInstanceHost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PvmInstanceHost) UnmarshalBinary(b []byte) error { + var res PvmInstanceHost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_placement_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_placement_group.go new file mode 100644 index 00000000000..0cc57f44d87 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/pvm_instance_placement_group.go @@ -0,0 +1,71 @@ +// 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" +) + +// PvmInstancePlacementGroup pvm instance placement group +// +// swagger:model PvmInstancePlacementGroup +type PvmInstancePlacementGroup struct { + + // The placement group id of the server + // Required: true + ID *string `json:"id"` +} + +// Validate validates this pvm instance placement group +func (m *PvmInstancePlacementGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PvmInstancePlacementGroup) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this pvm instance placement group based on context it is used +func (m *PvmInstancePlacementGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PvmInstancePlacementGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PvmInstancePlacementGroup) UnmarshalBinary(b []byte) error { + var res PvmInstancePlacementGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_tiers.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_tiers.go new file mode 100644 index 00000000000..3635ac973a8 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_tiers.go @@ -0,0 +1,78 @@ +// 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" +) + +// RegionStorageTiers An array of of storage tiers supported in a region +// +// swagger:model RegionStorageTiers +type RegionStorageTiers []*StorageTier + +// Validate validates this region storage tiers +func (m RegionStorageTiers) Validate(formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this region storage tiers based on the context it is used +func (m RegionStorageTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + + if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + + if err := m[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_types.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_types.go index 768bc4b51fa..3498cc66c86 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_types.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/region_storage_types.go @@ -54,6 +54,11 @@ func (m RegionStorageTypes) ContextValidate(ctx context.Context, formats strfmt. for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_sites.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_sites.go index 04130f12e3e..c3b25fe875c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_sites.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/replication_sites.go @@ -54,6 +54,11 @@ func (m ReplicationSites) ContextValidate(ctx context.Context, formats strfmt.Re for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go index 989ba719900..bbff5802102 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_create.go @@ -48,9 +48,6 @@ type SAPCreate struct { // Required: true ProfileID *string `json:"profileID"` - // The shared processor pool for server deployment - SharedProcessorPool string `json:"sharedProcessorPool,omitempty"` - // The name of the SSH Key to provide to the server for authenticating SSHKeyName string `json:"sshKeyName,omitempty"` @@ -249,6 +246,11 @@ func (m *SAPCreate) ContextValidate(ctx context.Context, formats strfmt.Registry func (m *SAPCreate) contextValidateInstances(ctx context.Context, formats strfmt.Registry) error { if m.Instances != nil { + + if swag.IsZero(m.Instances) { // not required + return nil + } + if err := m.Instances.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("instances") @@ -267,6 +269,11 @@ func (m *SAPCreate) contextValidateNetworks(ctx context.Context, formats strfmt. for i := 0; i < len(m.Networks); i++ { if m.Networks[i] != nil { + + if swag.IsZero(m.Networks[i]) { // not required + return nil + } + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("networks" + "." + strconv.Itoa(i)) @@ -284,6 +291,10 @@ func (m *SAPCreate) contextValidateNetworks(ctx context.Context, formats strfmt. func (m *SAPCreate) contextValidatePinPolicy(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.PinPolicy) { // not required + return nil + } + if err := m.PinPolicy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pinPolicy") @@ -299,6 +310,11 @@ func (m *SAPCreate) contextValidatePinPolicy(ctx context.Context, formats strfmt func (m *SAPCreate) contextValidateStorageAffinity(ctx context.Context, formats strfmt.Registry) error { if m.StorageAffinity != nil { + + if swag.IsZero(m.StorageAffinity) { // not required + return nil + } + if err := m.StorageAffinity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("storageAffinity") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profiles.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profiles.go index 02c67b962ed..f094b2b213b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profiles.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_a_p_profiles.go @@ -85,6 +85,11 @@ func (m *SAPProfiles) contextValidateProfiles(ctx context.Context, formats strfm for i := 0; i < len(m.Profiles); i++ { if m.Profiles[i] != nil { + + if swag.IsZero(m.Profiles[i]) { // not required + return nil + } + if err := m.Profiles[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_groups.go index a67ba5c8822..82d9be42da3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/s_p_p_placement_groups.go @@ -82,6 +82,11 @@ func (m *SPPPlacementGroups) contextValidateSppPlacementGroups(ctx context.Conte for i := 0; i < len(m.SppPlacementGroups); i++ { if m.SppPlacementGroups[i] != nil { + + if swag.IsZero(m.SppPlacementGroups[i]) { // not required + return nil + } + if err := m.SppPlacementGroups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sppPlacementGroups" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/schemas_object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/schemas_object.go index 1f7ce4efe2d..f4ba396b35d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/schemas_object.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/schemas_object.go @@ -102,6 +102,11 @@ func (m *SchemasObject) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *SchemasObject) contextValidateServiceBinding(ctx context.Context, formats strfmt.Registry) error { if m.ServiceBinding != nil { + + if swag.IsZero(m.ServiceBinding) { // not required + return nil + } + if err := m.ServiceBinding.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("service_binding") @@ -118,6 +123,11 @@ func (m *SchemasObject) contextValidateServiceBinding(ctx context.Context, forma func (m *SchemasObject) contextValidateServiceInstance(ctx context.Context, formats strfmt.Registry) error { if m.ServiceInstance != nil { + + if swag.IsZero(m.ServiceInstance) { // not required + return nil + } + if err := m.ServiceInstance.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("service_instance") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service.go index 8df437e38b6..3e2344dff66 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service.go @@ -246,6 +246,11 @@ func (m *Service) ContextValidate(ctx context.Context, formats strfmt.Registry) func (m *Service) contextValidateDashboardClient(ctx context.Context, formats strfmt.Registry) error { if m.DashboardClient != nil { + + if swag.IsZero(m.DashboardClient) { // not required + return nil + } + if err := m.DashboardClient.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("dashboard_client") @@ -264,6 +269,11 @@ func (m *Service) contextValidatePlans(ctx context.Context, formats strfmt.Regis for i := 0; i < len(m.Plans); i++ { if m.Plans[i] != nil { + + if swag.IsZero(m.Plans[i]) { // not required + return nil + } + if err := m.Plans[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("plans" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_authentication_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_authentication_info.go index 3fe25525014..475324bc279 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_authentication_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_authentication_info.go @@ -138,6 +138,10 @@ func (m *ServiceAuthenticationInfo) ContextValidate(ctx context.Context, formats func (m *ServiceAuthenticationInfo) contextValidateCapabilities(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Capabilities) { // not required + return nil + } + if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("capabilities") @@ -153,6 +157,7 @@ func (m *ServiceAuthenticationInfo) contextValidateCapabilities(ctx context.Cont func (m *ServiceAuthenticationInfo) contextValidateToken(ctx context.Context, formats strfmt.Registry) error { if m.Token != nil { + if err := m.Token.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("token") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding.go index a20665cc8d4..fbbc7f645d5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding.go @@ -91,6 +91,11 @@ func (m *ServiceBinding) contextValidateVolumeMounts(ctx context.Context, format for i := 0; i < len(m.VolumeMounts); i++ { if m.VolumeMounts[i] != nil { + + if swag.IsZero(m.VolumeMounts[i]) { // not required + return nil + } + if err := m.VolumeMounts[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_request.go index dbadb948009..8c304bb1bac 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_request.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_request.go @@ -116,6 +116,11 @@ func (m *ServiceBindingRequest) ContextValidate(ctx context.Context, formats str func (m *ServiceBindingRequest) contextValidateBindResource(ctx context.Context, formats strfmt.Registry) error { if m.BindResource != nil { + + if swag.IsZero(m.BindResource) { // not required + return nil + } + if err := m.BindResource.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("bind_resource") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_resource.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_resource.go index 4fcb7ce71c0..dfe72c66509 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_resource.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_resource.go @@ -94,6 +94,11 @@ func (m *ServiceBindingResource) contextValidateVolumeMounts(ctx context.Context for i := 0; i < len(m.VolumeMounts); i++ { if m.VolumeMounts[i] != nil { + + if swag.IsZero(m.VolumeMounts[i]) { // not required + return nil + } + if err := m.VolumeMounts[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("volume_mounts" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_schema_object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_schema_object.go index bb3ba6acc09..92f2865c8d9 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_schema_object.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_schema_object.go @@ -72,6 +72,11 @@ func (m *ServiceBindingSchemaObject) ContextValidate(ctx context.Context, format func (m *ServiceBindingSchemaObject) contextValidateCreate(ctx context.Context, formats strfmt.Registry) error { if m.Create != nil { + + if swag.IsZero(m.Create) { // not required + return nil + } + if err := m.Create.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("create") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_volume_mount.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_volume_mount.go index c077d6c0c45..96b1ac78bb0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_volume_mount.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_binding_volume_mount.go @@ -211,6 +211,7 @@ func (m *ServiceBindingVolumeMount) ContextValidate(ctx context.Context, formats func (m *ServiceBindingVolumeMount) contextValidateDevice(ctx context.Context, formats strfmt.Registry) error { if m.Device != nil { + if err := m.Device.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("device") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_schema_object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_schema_object.go index fb085f5fbea..76b3fc13552 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_schema_object.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_schema_object.go @@ -102,6 +102,11 @@ func (m *ServiceInstanceSchemaObject) ContextValidate(ctx context.Context, forma func (m *ServiceInstanceSchemaObject) contextValidateCreate(ctx context.Context, formats strfmt.Registry) error { if m.Create != nil { + + if swag.IsZero(m.Create) { // not required + return nil + } + if err := m.Create.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("create") @@ -118,6 +123,11 @@ func (m *ServiceInstanceSchemaObject) contextValidateCreate(ctx context.Context, func (m *ServiceInstanceSchemaObject) contextValidateUpdate(ctx context.Context, formats strfmt.Registry) error { if m.Update != nil { + + if swag.IsZero(m.Update) { // not required + return nil + } + if err := m.Update.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("update") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update_request.go index b4a4079544e..506864ca69b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update_request.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/service_instance_update_request.go @@ -99,6 +99,11 @@ func (m *ServiceInstanceUpdateRequest) ContextValidate(ctx context.Context, form func (m *ServiceInstanceUpdateRequest) contextValidatePreviousValues(ctx context.Context, formats strfmt.Registry) error { if m.PreviousValues != nil { + + if swag.IsZero(m.PreviousValues) { // not required + return nil + } + if err := m.PreviousValues.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("previous_values") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool.go index 85f262bbc00..6cd9a57fe1c 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool.go @@ -180,6 +180,11 @@ func (m *SharedProcessorPool) contextValidateSharedProcessorPoolPlacementGroups( for i := 0; i < len(m.SharedProcessorPoolPlacementGroups); i++ { if m.SharedProcessorPoolPlacementGroups[i] != nil { + + if swag.IsZero(m.SharedProcessorPoolPlacementGroups[i]) { // not required + return nil + } + if err := m.SharedProcessorPoolPlacementGroups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sharedProcessorPoolPlacementGroups" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_detail.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_detail.go index 8fc45b1d319..b58e967dfba 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_detail.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pool_detail.go @@ -117,6 +117,11 @@ func (m *SharedProcessorPoolDetail) contextValidateServers(ctx context.Context, for i := 0; i < len(m.Servers); i++ { if m.Servers[i] != nil { + + if swag.IsZero(m.Servers[i]) { // not required + return nil + } + if err := m.Servers[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("servers" + "." + strconv.Itoa(i)) @@ -135,6 +140,7 @@ func (m *SharedProcessorPoolDetail) contextValidateServers(ctx context.Context, func (m *SharedProcessorPoolDetail) contextValidateSharedProcessorPool(ctx context.Context, formats strfmt.Registry) error { if m.SharedProcessorPool != nil { + if err := m.SharedProcessorPool.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sharedProcessorPool") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pools.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pools.go index 0c00e12b80e..b48639706e0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pools.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/shared_processor_pools.go @@ -82,6 +82,11 @@ func (m *SharedProcessorPools) contextValidateSharedProcessorPools(ctx context.C for i := 0; i < len(m.SharedProcessorPools); i++ { if m.SharedProcessorPools[i] != nil { + + if swag.IsZero(m.SharedProcessorPools[i]) { // not required + return nil + } + if err := m.SharedProcessorPools[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sharedProcessorPools" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshots.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshots.go index 276c6119a8e..46928ccef80 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshots.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/snapshots.go @@ -85,6 +85,11 @@ func (m *Snapshots) contextValidateSnapshots(ctx context.Context, formats strfmt for i := 0; i < len(m.Snapshots); i++ { if m.Snapshots[i] != nil { + + if swag.IsZero(m.Snapshots[i]) { // not required + return nil + } + if err := m.Snapshots[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("snapshots" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ssh_keys.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ssh_keys.go index ae4e4cd5f66..786d1ce5d85 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/ssh_keys.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/ssh_keys.go @@ -85,6 +85,11 @@ func (m *SSHKeys) contextValidateSSHKeys(ctx context.Context, formats strfmt.Reg for i := 0; i < len(m.SSHKeys); i++ { if m.SSHKeys[i] != nil { + + if swag.IsZero(m.SSHKeys[i]) { // not required + return nil + } + if err := m.SSHKeys[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sshKeys" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/status_description.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/status_description.go index ea2b580c9fd..5f913ccd206 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/status_description.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/status_description.go @@ -82,6 +82,11 @@ func (m *StatusDescription) contextValidateErrors(ctx context.Context, formats s for i := 0; i < len(m.Errors); i++ { if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("errors" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/stock_images.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/stock_images.go index 8ad0b319847..cf5ab313de6 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/stock_images.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/stock_images.go @@ -54,6 +54,11 @@ func (m StockImages) ContextValidate(ctx context.Context, formats strfmt.Registr for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controller.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controller.go new file mode 100644 index 00000000000..3c967f44265 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controller.go @@ -0,0 +1,185 @@ +// 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" +) + +// StorageController Description of a Storage Controller +// +// swagger:model StorageController +type StorageController struct { + + // Display Name of the Storage Controller + // Required: true + DisplayName *string `json:"displayName"` + + // Health status of this storage controller + // Required: true + Health *string `json:"health"` + + // Free storage in user pools on this storage controller (GB) + // Required: true + PoolStorage *float64 `json:"poolStorage"` + + // Total storage capacity of user pools in this storage controller (GB) + // Required: true + PoolTotalStorage *float64 `json:"poolTotalStorage"` + + // List of storage pools within this storage controller + // Required: true + Pools map[string]StoragePoolCombined `json:"pools"` +} + +// Validate validates this storage controller +func (m *StorageController) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDisplayName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolStorage(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolTotalStorage(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StorageController) validateDisplayName(formats strfmt.Registry) error { + + if err := validate.Required("displayName", "body", m.DisplayName); err != nil { + return err + } + + return nil +} + +func (m *StorageController) validateHealth(formats strfmt.Registry) error { + + if err := validate.Required("health", "body", m.Health); err != nil { + return err + } + + return nil +} + +func (m *StorageController) validatePoolStorage(formats strfmt.Registry) error { + + if err := validate.Required("poolStorage", "body", m.PoolStorage); err != nil { + return err + } + + return nil +} + +func (m *StorageController) validatePoolTotalStorage(formats strfmt.Registry) error { + + if err := validate.Required("poolTotalStorage", "body", m.PoolTotalStorage); err != nil { + return err + } + + return nil +} + +func (m *StorageController) validatePools(formats strfmt.Registry) error { + + if err := validate.Required("pools", "body", m.Pools); err != nil { + return err + } + + for k := range m.Pools { + + if err := validate.Required("pools"+"."+k, "body", m.Pools[k]); err != nil { + return err + } + if val, ok := m.Pools[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pools" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pools" + "." + k) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this storage controller based on the context it is used +func (m *StorageController) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePools(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StorageController) contextValidatePools(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.Required("pools", "body", m.Pools); err != nil { + return err + } + + for k := range m.Pools { + + if val, ok := m.Pools[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StorageController) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StorageController) UnmarshalBinary(b []byte) error { + var res StorageController + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controllers.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controllers.go new file mode 100644 index 00000000000..05d88631876 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_controllers.go @@ -0,0 +1,67 @@ +// 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/validate" +) + +// StorageControllers List of available storage controllers within a particular DataCenter +// +// swagger:model StorageControllers +type StorageControllers map[string]StorageController + +// Validate validates this storage controllers +func (m StorageControllers) Validate(formats strfmt.Registry) error { + var res []error + + for k := range m { + + if err := validate.Required(k, "body", m[k]); err != nil { + return err + } + if val, ok := m[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName(k) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this storage controllers based on the context it is used +func (m StorageControllers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + for k := range m { + + if val, ok := m[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool.go index ab18cac6d00..2689e7905dd 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool.go @@ -194,6 +194,11 @@ func (m *StoragePool) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *StoragePool) contextValidateOverrideThresholds(ctx context.Context, formats strfmt.Registry) error { if m.OverrideThresholds != nil { + + if swag.IsZero(m.OverrideThresholds) { // not required + return nil + } + if err := m.OverrideThresholds.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("overrideThresholds") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool_capacity.go index 6b233d6baf2..be3b86a814d 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool_capacity.go @@ -19,6 +19,9 @@ import ( // swagger:model StoragePoolCapacity type StoragePoolCapacity struct { + // Available/Unused pool capacity (GB) + AvailableCapacity int64 `json:"availableCapacity,omitempty"` + // Maximum allocation storage size (GB) // Required: true MaxAllocationSize *int64 `json:"maxAllocationSize"` @@ -26,6 +29,12 @@ type StoragePoolCapacity struct { // Pool name PoolName string `json:"poolName,omitempty"` + // true if storage-pool is replication enabled and can be used to manage replication enabled volumes + ReplicationEnabled *bool `json:"replicationEnabled,omitempty"` + + // Storage host/controller for this storage pool + StorageHost string `json:"storageHost,omitempty"` + // Storage type of the storage pool StorageType string `json:"storageType,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool_combined.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool_combined.go new file mode 100644 index 00000000000..5ed9f960453 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pool_combined.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" +) + +// StoragePoolCombined Combined Storage Pool Capacity +// +// swagger:model StoragePoolCombined +type StoragePoolCombined struct { + + // Pool name + // Required: true + PoolName *string `json:"poolName"` + + // Available/Unused pool capacity (GB) + // Required: true + Storage *int64 `json:"storage"` + + // Total pool capacity (GB) + // Required: true + TotalStorage *int64 `json:"totalStorage"` +} + +// Validate validates this storage pool combined +func (m *StoragePoolCombined) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePoolName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotalStorage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StoragePoolCombined) validatePoolName(formats strfmt.Registry) error { + + if err := validate.Required("poolName", "body", m.PoolName); err != nil { + return err + } + + return nil +} + +func (m *StoragePoolCombined) validateStorage(formats strfmt.Registry) error { + + if err := validate.Required("storage", "body", m.Storage); err != nil { + return err + } + + return nil +} + +func (m *StoragePoolCombined) validateTotalStorage(formats strfmt.Registry) error { + + if err := validate.Required("totalStorage", "body", m.TotalStorage); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this storage pool combined based on context it is used +func (m *StoragePoolCombined) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *StoragePoolCombined) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StoragePoolCombined) UnmarshalBinary(b []byte) error { + var res StoragePoolCombined + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools.go index 622e1e19fb5..fc5b533e410 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools.go @@ -54,6 +54,11 @@ func (m StoragePools) ContextValidate(ctx context.Context, formats strfmt.Regist for i := 0; i < len(m); i++ { if m[i] != nil { + + if swag.IsZero(m[i]) { // not required + return nil + } + if err := m[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName(strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools_capacity.go index ad6c04653b1..7f5e3aafbc0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_pools_capacity.go @@ -110,6 +110,11 @@ func (m *StoragePoolsCapacity) ContextValidate(ctx context.Context, formats strf func (m *StoragePoolsCapacity) contextValidateMaximumStorageAllocation(ctx context.Context, formats strfmt.Registry) error { if m.MaximumStorageAllocation != nil { + + if swag.IsZero(m.MaximumStorageAllocation) { // not required + return nil + } + if err := m.MaximumStorageAllocation.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("maximumStorageAllocation") @@ -128,6 +133,11 @@ func (m *StoragePoolsCapacity) contextValidateStoragePoolsCapacity(ctx context.C for i := 0; i < len(m.StoragePoolsCapacity); i++ { if m.StoragePoolsCapacity[i] != nil { + + if swag.IsZero(m.StoragePoolsCapacity[i]) { // not required + return nil + } + if err := m.StoragePoolsCapacity[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tier.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tier.go new file mode 100644 index 00000000000..ae6990bb9e4 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tier.go @@ -0,0 +1,111 @@ +// 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" +) + +// StorageTier Storage tier detail +// +// swagger:model StorageTier +type StorageTier struct { + + // Description, storage tier label + Description string `json:"description,omitempty"` + + // Name of the storage tier + Name string `json:"name,omitempty"` + + // State of the storage tier (active or inactive) + // Enum: [active inactive] + State *string `json:"state,omitempty"` +} + +// Validate validates this storage tier +func (m *StorageTier) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var storageTierTypeStatePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["active","inactive"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + storageTierTypeStatePropEnum = append(storageTierTypeStatePropEnum, v) + } +} + +const ( + + // StorageTierStateActive captures enum value "active" + StorageTierStateActive string = "active" + + // StorageTierStateInactive captures enum value "inactive" + StorageTierStateInactive string = "inactive" +) + +// prop value enum +func (m *StorageTier) validateStateEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, storageTierTypeStatePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *StorageTier) validateState(formats strfmt.Registry) error { + if swag.IsZero(m.State) { // not required + return nil + } + + // value enum + if err := m.validateStateEnum("state", "body", *m.State); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this storage tier based on context it is used +func (m *StorageTier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *StorageTier) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StorageTier) UnmarshalBinary(b []byte) error { + var res StorageTier + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tiers.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tiers.go new file mode 100644 index 00000000000..7a8a46ec536 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_tiers.go @@ -0,0 +1,69 @@ +// 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/validate" +) + +// StorageTiers A map of an array of storage tiers supported in a region +// +// swagger:model StorageTiers +type StorageTiers map[string]RegionStorageTiers + +// Validate validates this storage tiers +func (m StorageTiers) Validate(formats strfmt.Registry) error { + var res []error + + for k := range m { + + if err := validate.Required(k, "body", m[k]); err != nil { + return err + } + + if err := m[k].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName(k) + } + return err + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this storage tiers based on the context it is used +func (m StorageTiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + for k := range m { + + if err := m[k].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName(k) + } + return err + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type_capacity.go index 4ac3bf6dee4..30fd85e2c1b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_type_capacity.go @@ -113,6 +113,11 @@ func (m *StorageTypeCapacity) ContextValidate(ctx context.Context, formats strfm func (m *StorageTypeCapacity) contextValidateMaximumStorageAllocation(ctx context.Context, formats strfmt.Registry) error { if m.MaximumStorageAllocation != nil { + + if swag.IsZero(m.MaximumStorageAllocation) { // not required + return nil + } + if err := m.MaximumStorageAllocation.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("maximumStorageAllocation") @@ -131,6 +136,11 @@ func (m *StorageTypeCapacity) contextValidateStoragePoolsCapacity(ctx context.Co for i := 0; i < len(m.StoragePoolsCapacity); i++ { if m.StoragePoolsCapacity[i] != nil { + + if swag.IsZero(m.StoragePoolsCapacity[i]) { // not required + return nil + } + if err := m.StoragePoolsCapacity[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("storagePoolsCapacity" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types_capacity.go index de163af979e..a0fee64b520 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types_capacity.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/storage_types_capacity.go @@ -110,6 +110,11 @@ func (m *StorageTypesCapacity) ContextValidate(ctx context.Context, formats strf func (m *StorageTypesCapacity) contextValidateMaximumStorageAllocation(ctx context.Context, formats strfmt.Registry) error { if m.MaximumStorageAllocation != nil { + + if swag.IsZero(m.MaximumStorageAllocation) { // not required + return nil + } + if err := m.MaximumStorageAllocation.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("maximumStorageAllocation") @@ -128,6 +133,11 @@ func (m *StorageTypesCapacity) contextValidateStorageTypesCapacity(ctx context.C for i := 0; i < len(m.StorageTypesCapacity); i++ { if m.StorageTypesCapacity[i] != nil { + + if swag.IsZero(m.StorageTypesCapacity[i]) { // not required + return nil + } + if err := m.StorageTypesCapacity[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("storageTypesCapacity" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system.go index 7e09b8ba43f..d07d321590b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system.go @@ -19,6 +19,12 @@ import ( // swagger:model System type System struct { + // The host available Processor units + AvailableCores float64 `json:"availableCores,omitempty"` + + // The host available RAM memory in GiB + AvailableMemory int64 `json:"availableMemory,omitempty"` + // The host available Processor units // Required: true Cores *float64 `json:"cores"` @@ -26,9 +32,17 @@ type System struct { // The host identifier ID int64 `json:"id,omitempty"` - // The host available RAM memory in GiB + // The host total RAM memory in GiB // Required: true Memory *int64 `json:"memory"` + + // The host total Processor units + // Required: true + TotalCores *float64 `json:"totalCores"` + + // The host total RAM memory in GiB + // Required: true + TotalMemory *int64 `json:"totalMemory"` } // Validate validates this system @@ -43,6 +57,14 @@ func (m *System) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTotalCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotalMemory(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -67,6 +89,24 @@ func (m *System) validateMemory(formats strfmt.Registry) error { return nil } +func (m *System) validateTotalCores(formats strfmt.Registry) error { + + if err := validate.Required("totalCores", "body", m.TotalCores); err != nil { + return err + } + + return nil +} + +func (m *System) validateTotalMemory(formats strfmt.Registry) error { + + if err := validate.Required("totalMemory", "body", m.TotalMemory); err != nil { + return err + } + + return nil +} + // ContextValidate validates this system based on context it is used func (m *System) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool.go index 59da690a53e..fc5ed17556a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool.go @@ -236,6 +236,11 @@ func (m *SystemPool) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *SystemPool) contextValidateCapacity(ctx context.Context, formats strfmt.Registry) error { if m.Capacity != nil { + + if swag.IsZero(m.Capacity) { // not required + return nil + } + if err := m.Capacity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("capacity") @@ -252,6 +257,11 @@ func (m *SystemPool) contextValidateCapacity(ctx context.Context, formats strfmt func (m *SystemPool) contextValidateMaxAvailable(ctx context.Context, formats strfmt.Registry) error { if m.MaxAvailable != nil { + + if swag.IsZero(m.MaxAvailable) { // not required + return nil + } + if err := m.MaxAvailable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("maxAvailable") @@ -268,6 +278,11 @@ func (m *SystemPool) contextValidateMaxAvailable(ctx context.Context, formats st func (m *SystemPool) contextValidateMaxCoresAvailable(ctx context.Context, formats strfmt.Registry) error { if m.MaxCoresAvailable != nil { + + if swag.IsZero(m.MaxCoresAvailable) { // not required + return nil + } + if err := m.MaxCoresAvailable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("maxCoresAvailable") @@ -284,6 +299,11 @@ func (m *SystemPool) contextValidateMaxCoresAvailable(ctx context.Context, forma func (m *SystemPool) contextValidateMaxMemoryAvailable(ctx context.Context, formats strfmt.Registry) error { if m.MaxMemoryAvailable != nil { + + if swag.IsZero(m.MaxMemoryAvailable) { // not required + return nil + } + if err := m.MaxMemoryAvailable.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("maxMemoryAvailable") @@ -300,6 +320,11 @@ func (m *SystemPool) contextValidateMaxMemoryAvailable(ctx context.Context, form func (m *SystemPool) contextValidateSharedCoreRatio(ctx context.Context, formats strfmt.Registry) error { if m.SharedCoreRatio != nil { + + if swag.IsZero(m.SharedCoreRatio) { // not required + return nil + } + if err := m.SharedCoreRatio.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sharedCoreRatio") @@ -318,6 +343,11 @@ func (m *SystemPool) contextValidateSystems(ctx context.Context, formats strfmt. for i := 0; i < len(m.Systems); i++ { if m.Systems[i] != nil { + + if swag.IsZero(m.Systems[i]) { // not required + return nil + } + if err := m.Systems[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("systems" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool_capacity.go new file mode 100644 index 00000000000..d61a062b4b5 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pool_capacity.go @@ -0,0 +1,190 @@ +// 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" +) + +// SystemPoolCapacity Description of a System Pool's Capacity +// +// swagger:model SystemPoolCapacity +type SystemPoolCapacity struct { + + // Number of available cores in the System Pool + // Required: true + Cores *float64 `json:"cores"` + + // Amount of available memory in the System Pool (GB) + // Required: true + Memory *int64 `json:"memory"` + + // The DataCenter list of servers and their available resources + Systems []*System `json:"systems"` + + // Total number of cores in the System Pool + // Required: true + TotalCores *float64 `json:"totalCores"` + + // Total amount of memory in the System Pool (GB) + // Required: true + TotalMemory *int64 `json:"totalMemory"` +} + +// Validate validates this system pool capacity +func (m *SystemPoolCapacity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSystems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotalCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotalMemory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SystemPoolCapacity) validateCores(formats strfmt.Registry) error { + + if err := validate.Required("cores", "body", m.Cores); err != nil { + return err + } + + return nil +} + +func (m *SystemPoolCapacity) validateMemory(formats strfmt.Registry) error { + + if err := validate.Required("memory", "body", m.Memory); err != nil { + return err + } + + return nil +} + +func (m *SystemPoolCapacity) validateSystems(formats strfmt.Registry) error { + if swag.IsZero(m.Systems) { // not required + return nil + } + + for i := 0; i < len(m.Systems); i++ { + if swag.IsZero(m.Systems[i]) { // not required + continue + } + + if m.Systems[i] != nil { + if err := m.Systems[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("systems" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("systems" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SystemPoolCapacity) validateTotalCores(formats strfmt.Registry) error { + + if err := validate.Required("totalCores", "body", m.TotalCores); err != nil { + return err + } + + return nil +} + +func (m *SystemPoolCapacity) validateTotalMemory(formats strfmt.Registry) error { + + if err := validate.Required("totalMemory", "body", m.TotalMemory); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this system pool capacity based on the context it is used +func (m *SystemPoolCapacity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSystems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SystemPoolCapacity) contextValidateSystems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Systems); i++ { + + if m.Systems[i] != nil { + + if swag.IsZero(m.Systems[i]) { // not required + return nil + } + + if err := m.Systems[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("systems" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("systems" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SystemPoolCapacity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SystemPoolCapacity) UnmarshalBinary(b []byte) error { + var res SystemPoolCapacity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools_capacity.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools_capacity.go new file mode 100644 index 00000000000..b2c015c2dda --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/system_pools_capacity.go @@ -0,0 +1,67 @@ +// 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/validate" +) + +// SystemPoolsCapacity List of available system pools within a Pod +// +// swagger:model SystemPoolsCapacity +type SystemPoolsCapacity map[string]SystemPoolCapacity + +// Validate validates this system pools capacity +func (m SystemPoolsCapacity) Validate(formats strfmt.Registry) error { + var res []error + + for k := range m { + + if err := validate.Required(k, "body", m[k]); err != nil { + return err + } + if val, ok := m[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName(k) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this system pools capacity based on the context it is used +func (m SystemPoolsCapacity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + for k := range m { + + if val, ok := m[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/target_object.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/target_object.go new file mode 100644 index 00000000000..a5c1bc5160a --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/target_object.go @@ -0,0 +1,88 @@ +// 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" +) + +// TargetObject List of available capabilities for a specific service +// +// swagger:model TargetObject +type TargetObject struct { + + // The name of the target + // Required: true + Name *string `json:"name"` + + // The type of the target + // Required: true + Type *string `json:"type"` +} + +// Validate validates this target object +func (m *TargetObject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(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 *TargetObject) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *TargetObject) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this target object based on context it is used +func (m *TargetObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TargetObject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TargetObject) UnmarshalBinary(b []byte) error { + var res TargetObject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant.go index 60dcec1ba27..fc0c7ca6729 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant.go @@ -218,6 +218,11 @@ func (m *Tenant) contextValidateCloudInstances(ctx context.Context, formats strf for i := 0; i < len(m.CloudInstances); i++ { if m.CloudInstances[i] != nil { + + if swag.IsZero(m.CloudInstances[i]) { // not required + return nil + } + if err := m.CloudInstances[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cloudInstances" + "." + strconv.Itoa(i)) @@ -238,6 +243,11 @@ func (m *Tenant) contextValidatePeeringNetworks(ctx context.Context, formats str for i := 0; i < len(m.PeeringNetworks); i++ { if m.PeeringNetworks[i] != nil { + + if swag.IsZero(m.PeeringNetworks[i]) { // not required + return nil + } + if err := m.PeeringNetworks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) @@ -258,6 +268,11 @@ func (m *Tenant) contextValidateSSHKeys(ctx context.Context, formats strfmt.Regi for i := 0; i < len(m.SSHKeys); i++ { if m.SSHKeys[i] != nil { + + if swag.IsZero(m.SSHKeys[i]) { // not required + return nil + } + if err := m.SSHKeys[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("sshKeys" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant_update.go index a1a9e439a07..b45551007fa 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/tenant_update.go @@ -85,6 +85,11 @@ func (m *TenantUpdate) contextValidatePeeringNetworks(ctx context.Context, forma for i := 0; i < len(m.PeeringNetworks); i++ { if m.PeeringNetworks[i] != nil { + + if swag.IsZero(m.PeeringNetworks[i]) { // not required + return nil + } + if err := m.PeeringNetworks[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("peeringNetworks" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/thresholds.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/thresholds.go index 9d142d57feb..575e3830441 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/thresholds.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/thresholds.go @@ -192,6 +192,11 @@ func (m *Thresholds) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *Thresholds) contextValidateCapacity(ctx context.Context, formats strfmt.Registry) error { if m.Capacity != nil { + + if swag.IsZero(m.Capacity) { // not required + return nil + } + if err := m.Capacity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("capacity") @@ -208,6 +213,11 @@ func (m *Thresholds) contextValidateCapacity(ctx context.Context, formats strfmt func (m *Thresholds) contextValidateOvercommit(ctx context.Context, formats strfmt.Registry) error { if m.Overcommit != nil { + + if swag.IsZero(m.Overcommit) { // not required + return nil + } + if err := m.Overcommit.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("overcommit") @@ -224,6 +234,11 @@ func (m *Thresholds) contextValidateOvercommit(ctx context.Context, formats strf func (m *Thresholds) contextValidatePhysicalCapacity(ctx context.Context, formats strfmt.Registry) error { if m.PhysicalCapacity != nil { + + if swag.IsZero(m.PhysicalCapacity) { // not required + return nil + } + if err := m.PhysicalCapacity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("physicalCapacity") @@ -240,6 +255,11 @@ func (m *Thresholds) contextValidatePhysicalCapacity(ctx context.Context, format func (m *Thresholds) contextValidateVdiskCapacity(ctx context.Context, formats strfmt.Registry) error { if m.VdiskCapacity != nil { + + if swag.IsZero(m.VdiskCapacity) { // not required + return nil + } + if err := m.VdiskCapacity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vdiskCapacity") @@ -256,6 +276,11 @@ func (m *Thresholds) contextValidateVdiskCapacity(ctx context.Context, formats s func (m *Thresholds) contextValidateVdiskLimit(ctx context.Context, formats strfmt.Registry) error { if m.VdiskLimit != nil { + + if swag.IsZero(m.VdiskLimit) { // not required + return nil + } + if err := m.VdiskLimit.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vdiskLimit") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_extra.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_extra.go index a37a8bc217e..c3687773d2f 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_extra.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/token_extra.go @@ -131,6 +131,7 @@ func (m *TokenExtra) ContextValidate(ctx context.Context, formats strfmt.Registr func (m *TokenExtra) contextValidateToken(ctx context.Context, formats strfmt.Registry) error { if m.Token != nil { + if err := m.Token.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("token") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error.go deleted file mode 100644 index f48668b05d6..00000000000 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TransitConnectionError transit connection error -// -// swagger:model TransitConnectionError -type TransitConnectionError struct { - - // errors - Errors []string `json:"errors"` - - // The status code of the transit connection - // Required: true - StatusCode *int64 `json:"statusCode"` - - // The trace id for debugging purposes - TraceID string `json:"traceId,omitempty"` -} - -// Validate validates this transit connection error -func (m *TransitConnectionError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStatusCode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TransitConnectionError) validateStatusCode(formats strfmt.Registry) error { - - if err := validate.Required("statusCode", "body", m.StatusCode); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this transit connection error based on context it is used -func (m *TransitConnectionError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *TransitConnectionError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TransitConnectionError) UnmarshalBinary(b []byte) error { - var res TransitConnectionError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error_item.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error_item.go new file mode 100644 index 00000000000..4e9138eeff2 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_connection_error_item.go @@ -0,0 +1,144 @@ +// 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" +) + +// TransitConnectionErrorItem transit connection error item +// +// swagger:model TransitConnectionErrorItem +type TransitConnectionErrorItem struct { + + // The status code of the transit connection + // Required: true + Code *string `json:"code"` + + // The trace id for debugging purposes + // Required: true + Message *string `json:"message"` + + // target + Target *TargetObject `json:"target,omitempty"` +} + +// Validate validates this transit connection error item +func (m *TransitConnectionErrorItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMessage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TransitConnectionErrorItem) validateCode(formats strfmt.Registry) error { + + if err := validate.Required("code", "body", m.Code); err != nil { + return err + } + + return nil +} + +func (m *TransitConnectionErrorItem) validateMessage(formats strfmt.Registry) error { + + if err := validate.Required("message", "body", m.Message); err != nil { + return err + } + + return nil +} + +func (m *TransitConnectionErrorItem) validateTarget(formats strfmt.Registry) error { + if swag.IsZero(m.Target) { // not required + return nil + } + + if m.Target != nil { + if err := m.Target.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("target") + } + return err + } + } + + return nil +} + +// ContextValidate validate this transit connection error item based on the context it is used +func (m *TransitConnectionErrorItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTarget(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TransitConnectionErrorItem) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { + + if m.Target != nil { + + if swag.IsZero(m.Target) { // not required + return nil + } + + if err := m.Target.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("target") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TransitConnectionErrorItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TransitConnectionErrorItem) UnmarshalBinary(b []byte) error { + var res TransitConnectionErrorItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_instance.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_instance.go index 2f1b34f1bb9..9a4db4c8154 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_instance.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_instance.go @@ -7,11 +7,11 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // TransitGatewayInstance transit gateway instance @@ -19,6 +19,9 @@ import ( // swagger:model TransitGatewayInstance type TransitGatewayInstance struct { + // errors + Errors []*TransitConnectionErrorItem `json:"errors,omitempty"` + // IBM Resource Group ID associated with the PowerVS Service Instance // Example: 2bf1887bf5c947b1966de2bd88220489 ResourceGroupID string `json:"resourceGroupId,omitempty"` @@ -39,16 +42,15 @@ type TransitGatewayInstance struct { // Example: 3a5798f1-4d2b-4e0a-9311-9b0fd6b94698 ServiceID string `json:"serviceId,omitempty"` - // transit connection error - // Required: true - TransitConnectionError *TransitConnectionError `json:"transitConnectionError"` + // The trace id for debugging purposes + Trace string `json:"trace,omitempty"` } // Validate validates this transit gateway instance func (m *TransitGatewayInstance) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateTransitConnectionError(formats); err != nil { + if err := m.validateErrors(formats); err != nil { res = append(res, err) } @@ -58,21 +60,27 @@ func (m *TransitGatewayInstance) Validate(formats strfmt.Registry) error { return nil } -func (m *TransitGatewayInstance) validateTransitConnectionError(formats strfmt.Registry) error { - - if err := validate.Required("transitConnectionError", "body", m.TransitConnectionError); err != nil { - return err +func (m *TransitGatewayInstance) validateErrors(formats strfmt.Registry) error { + if swag.IsZero(m.Errors) { // not required + return nil } - if m.TransitConnectionError != nil { - if err := m.TransitConnectionError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transitConnectionError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transitConnectionError") + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err } - return err } + } return nil @@ -82,7 +90,7 @@ func (m *TransitGatewayInstance) validateTransitConnectionError(formats strfmt.R func (m *TransitGatewayInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateTransitConnectionError(ctx, formats); err != nil { + if err := m.contextValidateErrors(ctx, formats); err != nil { res = append(res, err) } @@ -92,17 +100,26 @@ func (m *TransitGatewayInstance) ContextValidate(ctx context.Context, formats st return nil } -func (m *TransitGatewayInstance) contextValidateTransitConnectionError(ctx context.Context, formats strfmt.Registry) error { +func (m *TransitGatewayInstance) contextValidateErrors(ctx context.Context, formats strfmt.Registry) error { - if m.TransitConnectionError != nil { - if err := m.TransitConnectionError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("transitConnectionError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("transitConnectionError") + for i := 0; i < len(m.Errors); i++ { + + if m.Errors[i] != nil { + + if swag.IsZero(m.Errors[i]) { // not required + return nil + } + + if err := m.Errors[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err } - return err } + } return nil diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_locations.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_locations.go index 9e734b0bc70..b1e4cccbbbe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_locations.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/transit_gateway_locations.go @@ -85,6 +85,11 @@ func (m *TransitGatewayLocations) contextValidateTransitGatewayLocations(ctx con for i := 0; i < len(m.TransitGatewayLocations); i++ { if m.TransitGatewayLocations[i] != nil { + + if swag.IsZero(m.TransitGatewayLocations[i]) { // not required + return nil + } + if err := m.TransitGatewayLocations[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_storage_pool.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_storage_pool.go index b186a57ba94..288e2d3c336 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_storage_pool.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/update_storage_pool.go @@ -130,6 +130,11 @@ func (m *UpdateStoragePool) ContextValidate(ctx context.Context, formats strfmt. func (m *UpdateStoragePool) contextValidateOverrideThresholds(ctx context.Context, formats strfmt.Registry) error { if m.OverrideThresholds != nil { + + if swag.IsZero(m.OverrideThresholds) { // not required + return nil + } + if err := m.OverrideThresholds.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("overrideThresholds") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/user_authentication_info.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/user_authentication_info.go index e1dd917f92b..83e1f944b24 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/user_authentication_info.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/user_authentication_info.go @@ -208,6 +208,10 @@ func (m *UserAuthenticationInfo) ContextValidate(ctx context.Context, formats st func (m *UserAuthenticationInfo) contextValidateCapabilities(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.Capabilities) { // not required + return nil + } + if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("capabilities") @@ -222,6 +226,10 @@ func (m *UserAuthenticationInfo) contextValidateCapabilities(ctx context.Context func (m *UserAuthenticationInfo) contextValidateCrnAccess(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.CrnAccess) { // not required + return nil + } + if err := m.CrnAccess.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("crnAccess") @@ -237,6 +245,7 @@ func (m *UserAuthenticationInfo) contextValidateCrnAccess(ctx context.Context, f func (m *UserAuthenticationInfo) contextValidateToken(ctx context.Context, formats strfmt.Registry) error { if m.Token != nil { + if err := m.Token.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("token") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection.go index 368b9814dd4..cdc7c00ef02 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection.go @@ -392,6 +392,7 @@ func (m *VPNConnection) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *VPNConnection) contextValidateDeadPeerDetection(ctx context.Context, formats strfmt.Registry) error { if m.DeadPeerDetection != nil { + if err := m.DeadPeerDetection.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("deadPeerDetection") @@ -408,6 +409,7 @@ func (m *VPNConnection) contextValidateDeadPeerDetection(ctx context.Context, fo func (m *VPNConnection) contextValidateIkePolicy(ctx context.Context, formats strfmt.Registry) error { if m.IkePolicy != nil { + if err := m.IkePolicy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ikePolicy") @@ -424,6 +426,7 @@ func (m *VPNConnection) contextValidateIkePolicy(ctx context.Context, formats st func (m *VPNConnection) contextValidateIPSecPolicy(ctx context.Context, formats strfmt.Registry) error { if m.IPSecPolicy != nil { + if err := m.IPSecPolicy.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipSecPolicy") @@ -440,6 +443,7 @@ func (m *VPNConnection) contextValidateIPSecPolicy(ctx context.Context, formats func (m *VPNConnection) contextValidatePeerGatewayAddress(ctx context.Context, formats strfmt.Registry) error { if m.PeerGatewayAddress != nil { + if err := m.PeerGatewayAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("peerGatewayAddress") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create.go index a98a8db474d..3e6fe175c12 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create.go @@ -224,6 +224,7 @@ func (m *VPNConnectionCreate) ContextValidate(ctx context.Context, formats strfm func (m *VPNConnectionCreate) contextValidatePeerGatewayAddress(ctx context.Context, formats strfmt.Registry) error { if m.PeerGatewayAddress != nil { + if err := m.PeerGatewayAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("peerGatewayAddress") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create_response.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create_response.go index fc9c60ef94e..d3eea567534 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create_response.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_create_response.go @@ -128,6 +128,11 @@ func (m *VPNConnectionCreateResponse) ContextValidate(ctx context.Context, forma func (m *VPNConnectionCreateResponse) contextValidateJobRef(ctx context.Context, formats strfmt.Registry) error { if m.JobRef != nil { + + if swag.IsZero(m.JobRef) { // not required + return nil + } + if err := m.JobRef.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("jobRef") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_update.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_update.go index a771e5c2678..455d705fe54 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_update.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connection_update.go @@ -218,6 +218,10 @@ func (m *VPNConnectionUpdate) ContextValidate(ctx context.Context, formats strfm func (m *VPNConnectionUpdate) contextValidatePeerGatewayAddress(ctx context.Context, formats strfmt.Registry) error { + if swag.IsZero(m.PeerGatewayAddress) { // not required + return nil + } + if err := m.PeerGatewayAddress.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("peerGatewayAddress") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connections.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connections.go index 789c36571bd..d86298c76a0 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connections.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_n_connections.go @@ -83,6 +83,11 @@ func (m *VPNConnections) contextValidateVpnConnections(ctx context.Context, form for i := 0; i < len(m.VpnConnections); i++ { if m.VpnConnections[i] != nil { + + if swag.IsZero(m.VpnConnections[i]) { // not required + return nil + } + if err := m.VpnConnections[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("vpnConnections" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_naa_s_options.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_naa_s_options.go index ca802f90275..220ee9c2e3b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_naa_s_options.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/v_p_naa_s_options.go @@ -203,6 +203,7 @@ func (m *VPNaaSOptions) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *VPNaaSOptions) contextValidateDeadPeerDetection(ctx context.Context, formats strfmt.Registry) error { if m.DeadPeerDetection != nil { + if err := m.DeadPeerDetection.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("deadPeerDetection") @@ -219,6 +220,7 @@ func (m *VPNaaSOptions) contextValidateDeadPeerDetection(ctx context.Context, fo func (m *VPNaaSOptions) contextValidateIkePolicyOptions(ctx context.Context, formats strfmt.Registry) error { if m.IkePolicyOptions != nil { + if err := m.IkePolicyOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ikePolicyOptions") @@ -235,6 +237,7 @@ func (m *VPNaaSOptions) contextValidateIkePolicyOptions(ctx context.Context, for func (m *VPNaaSOptions) contextValidateIkePolicyTemplate(ctx context.Context, formats strfmt.Registry) error { if m.IkePolicyTemplate != nil { + if err := m.IkePolicyTemplate.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ikePolicyTemplate") @@ -251,6 +254,7 @@ func (m *VPNaaSOptions) contextValidateIkePolicyTemplate(ctx context.Context, fo func (m *VPNaaSOptions) contextValidateIPSecPolicyOptions(ctx context.Context, formats strfmt.Registry) error { if m.IPSecPolicyOptions != nil { + if err := m.IPSecPolicyOptions.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipSecPolicyOptions") @@ -267,6 +271,7 @@ func (m *VPNaaSOptions) contextValidateIPSecPolicyOptions(ctx context.Context, f func (m *VPNaaSOptions) contextValidateIPSecPolicyTemplate(ctx context.Context, formats strfmt.Registry) error { if m.IPSecPolicyTemplate != nil { + if err := m.IPSecPolicyTemplate.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("ipSecPolicyTemplate") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go index 067ea451a9b..a547d52f510 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume.go @@ -49,6 +49,9 @@ type Volume struct { // Volume Group ID GroupID string `json:"groupID,omitempty"` + // Amount of iops assigned to the volume + IoThrottleRate string `json:"ioThrottleRate,omitempty"` + // Last Update Date // Required: true // Format: date-time @@ -64,6 +67,9 @@ type Volume struct { // Required: true Name *string `json:"name"` + // true if volume does not exist on storage controller, as volume has been deleted by deleting its paired volume from the mapped replication site. + OutOfBandDeleted bool `json:"outOfBandDeleted,omitempty"` + // indicates whether master/aux volume is playing the primary role // Enum: [master aux] PrimaryRole string `json:"primaryRole,omitempty"` @@ -72,7 +78,7 @@ type Volume struct { PvmInstanceIDs []string `json:"pvmInstanceIDs"` // True if volume is replication enabled otherwise false - ReplicationEnabled bool `json:"replicationEnabled,omitempty"` + ReplicationEnabled *bool `json:"replicationEnabled,omitempty"` // Replication status of a volume ReplicationStatus string `json:"replicationStatus,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_action.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_action.go index b0c8b5eb443..dbd1a9ecd7e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_action.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_action.go @@ -8,10 +8,8 @@ package models import ( "context" - "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // VolumeAction volume action @@ -20,30 +18,14 @@ import ( type VolumeAction struct { // Indicates if the volume should be replication enabled or not - // Required: true - ReplicationEnabled *bool `json:"replicationEnabled"` + ReplicationEnabled *bool `json:"replicationEnabled,omitempty"` + + // Target storage tier; used to change a volume's storage tier + TargetStorageTier *string `json:"targetStorageTier,omitempty"` } // Validate validates this volume action func (m *VolumeAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateReplicationEnabled(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumeAction) validateReplicationEnabled(formats strfmt.Registry) error { - - if err := validate.Required("replicationEnabled", "body", m.ReplicationEnabled); err != nil { - return err - } - return nil } diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group.go index 3eace5fbd0b..077a3dbdb9a 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group.go @@ -116,6 +116,11 @@ func (m *VolumeGroup) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *VolumeGroup) contextValidateStatusDescription(ctx context.Context, formats strfmt.Registry) error { if m.StatusDescription != nil { + + if swag.IsZero(m.StatusDescription) { // not required + return nil + } + if err := m.StatusDescription.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("statusDescription") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action.go index d6d7961d496..937960a054e 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_action.go @@ -257,6 +257,11 @@ func (m *VolumeGroupAction) ContextValidate(ctx context.Context, formats strfmt. func (m *VolumeGroupAction) contextValidateReset(ctx context.Context, formats strfmt.Registry) error { if m.Reset != nil { + + if swag.IsZero(m.Reset) { // not required + return nil + } + if err := m.Reset.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("reset") @@ -273,6 +278,11 @@ func (m *VolumeGroupAction) contextValidateReset(ctx context.Context, formats st func (m *VolumeGroupAction) contextValidateStart(ctx context.Context, formats strfmt.Registry) error { if m.Start != nil { + + if swag.IsZero(m.Start) { // not required + return nil + } + if err := m.Start.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("start") @@ -289,6 +299,11 @@ func (m *VolumeGroupAction) contextValidateStart(ctx context.Context, formats st func (m *VolumeGroupAction) contextValidateStop(ctx context.Context, formats strfmt.Registry) error { if m.Stop != nil { + + if swag.IsZero(m.Stop) { // not required + return nil + } + if err := m.Stop.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("stop") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_details.go index ec0ab3e5fd1..2642a06d860 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_details.go @@ -119,6 +119,11 @@ func (m *VolumeGroupDetails) ContextValidate(ctx context.Context, formats strfmt func (m *VolumeGroupDetails) contextValidateStatusDescription(ctx context.Context, formats strfmt.Registry) error { if m.StatusDescription != nil { + + if swag.IsZero(m.StatusDescription) { // not required + return nil + } + if err := m.StatusDescription.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("statusDescription") diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_remote_copy_relationships.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_remote_copy_relationships.go index db5c1dcc940..db283ffd882 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_remote_copy_relationships.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_group_remote_copy_relationships.go @@ -85,6 +85,11 @@ func (m *VolumeGroupRemoteCopyRelationships) contextValidateRemoteCopyRelationsh for i := 0; i < len(m.RemoteCopyRelationships); i++ { if m.RemoteCopyRelationships[i] != nil { + + if swag.IsZero(m.RemoteCopyRelationships[i]) { // not required + return nil + } + if err := m.RemoteCopyRelationships[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("remoteCopyRelationships" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups.go index 07e4b16e87e..0af75b13fd5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups.go @@ -85,6 +85,11 @@ func (m *VolumeGroups) contextValidateVolumeGroups(ctx context.Context, formats for i := 0; i < len(m.VolumeGroups); i++ { if m.VolumeGroups[i] != nil { + + if swag.IsZero(m.VolumeGroups[i]) { // not required + return nil + } + if err := m.VolumeGroups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups_details.go index d70057edc4e..254b14812b7 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups_details.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_groups_details.go @@ -85,6 +85,11 @@ func (m *VolumeGroupsDetails) contextValidateVolumeGroups(ctx context.Context, f for i := 0; i < len(m.VolumeGroups); i++ { if m.VolumeGroups[i] != nil { + + if swag.IsZero(m.VolumeGroups[i]) { // not required + return nil + } + if err := m.VolumeGroups[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("volumeGroups" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding.go index b18008fecd9..4bca382d7d5 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding.go @@ -169,6 +169,11 @@ func (m *VolumeOnboarding) ContextValidate(ctx context.Context, formats strfmt.R func (m *VolumeOnboarding) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { if m.Results != nil { + + if swag.IsZero(m.Results) { // not required + return nil + } + if err := m.Results.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("results") @@ -271,6 +276,11 @@ func (m *VolumeOnboardingResults) contextValidateVolumeOnboardingFailures(ctx co for i := 0; i < len(m.VolumeOnboardingFailures); i++ { if m.VolumeOnboardingFailures[i] != nil { + + if swag.IsZero(m.VolumeOnboardingFailures[i]) { // not required + return nil + } + if err := m.VolumeOnboardingFailures[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("results" + "." + "volumeOnboardingFailures" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding_create.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding_create.go index 420dc03b9a7..3e730cf0630 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding_create.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboarding_create.go @@ -88,6 +88,11 @@ func (m *VolumeOnboardingCreate) contextValidateVolumes(ctx context.Context, for for i := 0; i < len(m.Volumes); i++ { if m.Volumes[i] != nil { + + if swag.IsZero(m.Volumes[i]) { // not required + return nil + } + if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("Volumes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboardings.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboardings.go index e96a6485a91..8b2e760911b 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboardings.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_onboardings.go @@ -85,6 +85,11 @@ func (m *VolumeOnboardings) contextValidateOnboardings(ctx context.Context, form for i := 0; i < len(m.Onboardings); i++ { if m.Onboardings[i] != nil { + + if swag.IsZero(m.Onboardings[i]) { // not required + return nil + } + if err := m.Onboardings[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("onboardings" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go index 1eec3b793b0..fe2c483b9bc 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volume_reference.go @@ -55,6 +55,9 @@ type VolumeReference struct { // Required: true Href *string `json:"href"` + // Amount of iops assigned to the volume + IoThrottleRate string `json:"ioThrottleRate,omitempty"` + // Last Update Date // Required: true // Format: date-time @@ -70,6 +73,9 @@ type VolumeReference struct { // Required: true Name *string `json:"name"` + // true if volume does not exist on storage controller, as volume has been deleted by deleting its paired volume from the mapped replication site. + OutOfBandDeleted bool `json:"outOfBandDeleted,omitempty"` + // indicates whether master/aux volume is playing the primary role // Enum: [master aux] PrimaryRole string `json:"primaryRole,omitempty"` @@ -78,7 +84,7 @@ type VolumeReference struct { PvmInstanceIDs []string `json:"pvmInstanceIDs"` // True if volume is replication enabled otherwise false - ReplicationEnabled bool `json:"replicationEnabled,omitempty"` + ReplicationEnabled *bool `json:"replicationEnabled,omitempty"` // shows the replication status of a volume ReplicationStatus string `json:"replicationStatus,omitempty"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes.go index b701d4837ee..45225e3ca31 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes.go @@ -85,6 +85,11 @@ func (m *Volumes) contextValidateVolumes(ctx context.Context, formats strfmt.Reg for i := 0; i < len(m.Volumes); i++ { if m.Volumes[i] != nil { + + if swag.IsZero(m.Volumes[i]) { // not required + return nil + } + if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go index 4ec6f73cd32..7c4628c2efe 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_async_request.go @@ -30,6 +30,15 @@ type VolumesCloneAsyncRequest struct { // Required: true Name *string `json:"name"` + // Cloned volume will be non replication enabled if it is set to false. By default, the replication property of the source volume will be used to determine the replication property of the cloned target volume. + TargetReplicationEnabled *bool `json:"targetReplicationEnabled,omitempty"` + + // Target storage tier for the cloned volumes. Use to clone a set of volumes from one storage tier + // to a different storage tier. Cloned volumes must remain in the same storage pool as + // the source volumes. + // + TargetStorageTier string `json:"targetStorageTier,omitempty"` + // List of volumes to be cloned // Required: true VolumeIDs []string `json:"volumeIDs"` diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_detail.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_detail.go index 24a51c91d8c..5ce539cfc89 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_detail.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_detail.go @@ -155,6 +155,11 @@ func (m *VolumesCloneDetail) contextValidateClonedVolumes(ctx context.Context, f for i := 0; i < len(m.ClonedVolumes); i++ { if m.ClonedVolumes[i] != nil { + + if swag.IsZero(m.ClonedVolumes[i]) { // not required + return nil + } + if err := m.ClonedVolumes[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("clonedVolumes" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go index 1e10ae5d359..1d8800013e3 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clone_execute.go @@ -34,6 +34,15 @@ type VolumesCloneExecute struct { // True, Execute failure rolls back clone activity and removes the prepared snapshot // RollbackPrepare bool `json:"rollbackPrepare,omitempty"` + + // Cloned volume will be non replication enabled if it is set to false. By default, the replication property of the source volume will be used to determine the replication property of the cloned target volume. + TargetReplicationEnabled *bool `json:"targetReplicationEnabled,omitempty"` + + // Target storage tier for the cloned volumes. Use to clone a set of volumes from one storage tier + // to a different storage tier. Cloned volumes must remain in the same storage pool as + // the source volumes. + // + TargetStorageTier string `json:"targetStorageTier,omitempty"` } // Validate validates this volumes clone execute diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clones.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clones.go index 33bcab36fbf..e8abde5e348 100644 --- a/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clones.go +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/volumes_clones.go @@ -82,6 +82,11 @@ func (m *VolumesClones) contextValidateVolumesClone(ctx context.Context, formats for i := 0; i < len(m.VolumesClone); i++ { if m.VolumesClone[i] != nil { + + if swag.IsZero(m.VolumesClone[i]) { // not required + return nil + } + if err := m.VolumesClone[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("volumesClone" + "." + strconv.Itoa(i)) diff --git a/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace.go new file mode 100644 index 00000000000..62902f51bbf --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace.go @@ -0,0 +1,316 @@ +// 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 Provisioning] + 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","Provisioning"]`), &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" + + // WorkspaceStatusProvisioning captures enum value "Provisioning" + WorkspaceStatusProvisioning string = "Provisioning" +) + +// 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/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_details.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_details.go new file mode 100644 index 00000000000..f929347917b --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/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/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_location.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_location.go new file mode 100644 index 00000000000..f74be70b51b --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspace_location.go @@ -0,0 +1,77 @@ +// 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 + Type string `json:"type,omitempty"` + + // The Workspace location region url + URL string `json:"url,omitempty"` +} + +// 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 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 +} + +// 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/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspaces.go b/vendor/github.com/IBM-Cloud/power-go-client/power/models/workspaces.go new file mode 100644 index 00000000000..ef05e062111 --- /dev/null +++ b/vendor/github.com/IBM-Cloud/power-go-client/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 + Workspaces []*Workspace `json:"workspaces"` +} + +// Validate validates this workspaces +func (m *Workspaces) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateWorkspaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Workspaces) validateWorkspaces(formats strfmt.Registry) error { + + if err := validate.Required("workspaces", "body", m.Workspaces); err != nil { + return err + } + + for i := 0; i < len(m.Workspaces); i++ { + if swag.IsZero(m.Workspaces[i]) { // not required + continue + } + + if m.Workspaces[i] != nil { + if err := m.Workspaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaces" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("workspaces" + "." + 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.contextValidateWorkspaces(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Workspaces) contextValidateWorkspaces(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Workspaces); i++ { + + if m.Workspaces[i] != nil { + + if swag.IsZero(m.Workspaces[i]) { // not required + return nil + } + + if err := m.Workspaces[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaces" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("workspaces" + "." + 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 +} diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/constants.go b/vendor/github.com/IBM/go-sdk-core/v5/core/constants.go index 923d1ebcee2..ca4ba8a1335 100644 --- a/vendor/github.com/IBM/go-sdk-core/v5/core/constants.go +++ b/vendor/github.com/IBM/go-sdk-core/v5/core/constants.go @@ -71,7 +71,7 @@ const ( ERRORMSG_AUTHENTICATE_ERROR = "An error occurred while performing the 'authenticate' step: %s" ERRORMSG_READ_RESPONSE_BODY = "An error occurred while reading the response body: %s" ERRORMSG_UNEXPECTED_RESPONSE = "The response contained unexpected content, Content-Type=%s, operation resultType=%s" - ERRORMSG_UNMARSHAL_RESPONSE_BODY = "An error occurred while unmarshalling the response body: %s" + ERRORMSG_UNMARSHAL_RESPONSE_BODY = "An error occurred while processing the HTTP response: %s" ERRORMSG_NIL_SLICE = "The 'slice' parameter cannot be nil" ERRORMSG_PARAM_NOT_SLICE = "The 'slice' parameter must be a slice" ERRORMSG_MARSHAL_SLICE = "An error occurred while marshalling the slice: %s" diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/container_authenticator.go b/vendor/github.com/IBM/go-sdk-core/v5/core/container_authenticator.go index 932e79efee0..b289881fd22 100644 --- a/vendor/github.com/IBM/go-sdk-core/v5/core/container_authenticator.go +++ b/vendor/github.com/IBM/go-sdk-core/v5/core/container_authenticator.go @@ -1,6 +1,6 @@ package core -// (C) Copyright IBM Corp. 2021. +// (C) Copyright IBM Corp. 2021, 2023.. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -39,7 +39,8 @@ type ContainerAuthenticator struct { // [optional] The name of the file containing the injected CR token value (applies to // IKS-managed compute resources). - // Default value: "/var/run/secrets/tokens/vault-token" + // Default value: (1) "/var/run/secrets/tokens/vault-token" or (2) "/var/run/secrets/tokens/sa-token", + // whichever is found first. CRTokenFilename string // [optional] The name of the linked trusted IAM profile to be used when obtaining the IAM access token. @@ -94,8 +95,9 @@ type ContainerAuthenticator struct { } const ( - defaultCRTokenFilename = "/var/run/secrets/tokens/vault-token" // #nosec G101 - iamGrantTypeCRToken = "urn:ibm:params:oauth:grant-type:cr-token" // #nosec G101 + defaultCRTokenFilename1 = "/var/run/secrets/tokens/vault-token" // #nosec G101 + defaultCRTokenFilename2 = "/var/run/secrets/tokens/sa-token" // #nosec G101 + iamGrantTypeCRToken = "urn:ibm:params:oauth:grant-type:cr-token" // #nosec G101 ) var craRequestTokenMutex sync.Mutex @@ -479,25 +481,41 @@ func (authenticator *ContainerAuthenticator) RequestToken() (*IamTokenServerResp // retrieveCRToken tries to read the CR token value from the local file system. func (authenticator *ContainerAuthenticator) retrieveCRToken() (crToken string, err error) { - // Use the default filename if one wasn't supplied by the user. - crTokenFilename := authenticator.CRTokenFilename - if crTokenFilename == "" { - crTokenFilename = defaultCRTokenFilename + if authenticator.CRTokenFilename != "" { + // Use the file specified by the user. + crToken, err = authenticator.readFile(authenticator.CRTokenFilename) + } else { + // If the user didn't specify a filename, try our two defaults. + crToken, err = authenticator.readFile(defaultCRTokenFilename1) + if err != nil { + crToken, err = authenticator.readFile(defaultCRTokenFilename2) + } + } + + if err != nil { + err = fmt.Errorf(ERRORMSG_UNABLE_RETRIEVE_CRTOKEN, err.Error()) + GetLogger().Debug(err.Error()) + return } - GetLogger().Debug("Attempting to read CR token from file: %s\n", crTokenFilename) + return +} + +// readFile attempts to read the specified cr token file and return its contents as a string. +func (authenticator *ContainerAuthenticator) readFile(filename string) (crToken string, err error) { + GetLogger().Debug("Attempting to read CR token from file: %s\n", filename) // Read the entire file into a byte slice, then convert to string. var bytes []byte - bytes, err = os.ReadFile(crTokenFilename) // #nosec G304 + bytes, err = os.ReadFile(filename) // #nosec G304 if err != nil { - err = fmt.Errorf(ERRORMSG_UNABLE_RETRIEVE_CRTOKEN, err.Error()) GetLogger().Debug(err.Error()) return } + GetLogger().Debug("Successfully read CR token from file: %s\n", filename) + crToken = string(bytes) - GetLogger().Debug("Successfully read CR token from file: %s\n", crTokenFilename) return } diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/utils.go b/vendor/github.com/IBM/go-sdk-core/v5/core/utils.go index 311d24e465e..070cae669f5 100644 --- a/vendor/github.com/IBM/go-sdk-core/v5/core/utils.go +++ b/vendor/github.com/IBM/go-sdk-core/v5/core/utils.go @@ -316,10 +316,82 @@ func GetQueryParamAsInt(urlStr *string, param string) (value *int64, err error) return } +// keywords that are redacted +var redactedKeywords = []string{ + "apikey", + "api_key", + "passcode", + "password", + "token", + + "aadClientId", + "aadClientSecret", + "auth", + "auth_provider_x509_cert_url", + "auth_uri", + "client_email", + "client_id", + "client_x509_cert_url", + "key", + "project_id", + "secret", + "subscriptionId", + "tenantId", + "thumbprint", + "token_uri", + + // Information from issue: https://github.com/IBM/go-sdk-core/issues/190 + // // Redhat + // "ibm-cos-access-key", + // "ibm-cos-secret-key", + // "iam-api-key", + // "kms-root-key", + // "kms-api-key", + + // // AWS + // "aws-access-key", + // "aws-secret-access-key", + + // // Azure + // "tenantId", + // "subscriptionId", + // "aadClientId", + // "aadClientSecret", + + // // Google + // "project_id", + // "private_key_id", + // "private_key", + // "client_email", + // "client_id", + // "auth_uri", + // "token_uri", + // "auth_provider_x509_cert_url", + // "client_x509_cert_url", + + // // IBM + // "primary-gui-api-user", + // "primary-gui-api-password", + // "owning-gui-api-user", + // "owning-gui-api-password", + // "g2_api_key", + + // // NetApp + // "username", + // "password", + + // // VMware + // "vcenter-username", + // "vcenter-password", + // "thumbprint", +} + +var redactedTokens = strings.Join(redactedKeywords, "|") + // Pre-compiled regular expressions used by RedactSecrets(). var reAuthHeader = regexp.MustCompile(`(?m)^(Authorization|X-Auth\S*): .*`) -var rePassword1 = regexp.MustCompile(`(?i)(password|token|apikey|api_key|passcode)=[^&]*(&|$)`) -var rePassword2 = regexp.MustCompile(`(?i)"([^"]*(password|token|apikey|api_key)[^"_]*)":\s*"[^\,]*"`) +var rePropertySetting = regexp.MustCompile(`(?i)(` + redactedTokens + `)=[^&]*(&|$)`) +var reJsonField = regexp.MustCompile(`(?i)"([^"]*(` + redactedTokens + `)[^"_]*)":\s*"[^\,]*"`) // RedactSecrets() returns the input string with secrets redacted. func RedactSecrets(input string) string { @@ -327,8 +399,8 @@ func RedactSecrets(input string) string { redactedString := input redactedString = reAuthHeader.ReplaceAllString(redactedString, "$1: "+redacted) - redactedString = rePassword1.ReplaceAllString(redactedString, "$1="+redacted+"$2") - redactedString = rePassword2.ReplaceAllString(redactedString, fmt.Sprintf(`"$1":"%s"`, redacted)) + redactedString = rePropertySetting.ReplaceAllString(redactedString, "$1="+redacted+"$2") + redactedString = reJsonField.ReplaceAllString(redactedString, fmt.Sprintf(`"$1":"%s"`, redacted)) return redactedString } diff --git a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go index 59a6a96c295..5be9fefb709 100644 --- a/vendor/github.com/IBM/go-sdk-core/v5/core/version.go +++ b/vendor/github.com/IBM/go-sdk-core/v5/core/version.go @@ -15,4 +15,4 @@ package core // limitations under the License. // Version of the SDK -const __VERSION__ = "5.13.2" +const __VERSION__ = "5.14.1" diff --git a/vendor/github.com/go-openapi/analysis/.golangci.yml b/vendor/github.com/go-openapi/analysis/.golangci.yml index 8cad2987919..e24a6c14e6b 100644 --- a/vendor/github.com/go-openapi/analysis/.golangci.yml +++ b/vendor/github.com/go-openapi/analysis/.golangci.yml @@ -51,3 +51,6 @@ linters: - forbidigo - cyclop - varnamelen + - exhaustruct + - nonamedreturns + - nosnakecase diff --git a/vendor/github.com/go-openapi/errors/api.go b/vendor/github.com/go-openapi/errors/api.go index 77f1f92c5e3..c13f3435fa8 100644 --- a/vendor/github.com/go-openapi/errors/api.go +++ b/vendor/github.com/go-openapi/errors/api.go @@ -112,7 +112,7 @@ func flattenComposite(errs *CompositeError) *CompositeError { for _, er := range errs.Errors { switch e := er.(type) { case *CompositeError: - if len(e.Errors) > 0 { + if e != nil && len(e.Errors) > 0 { flat := flattenComposite(e) if len(flat.Errors) > 0 { res = append(res, flat.Errors...) diff --git a/vendor/github.com/go-openapi/runtime/client/auth_info.go b/vendor/github.com/go-openapi/runtime/client/auth_info.go index d37e8f6b73f..4f26e92347a 100644 --- a/vendor/github.com/go-openapi/runtime/client/auth_info.go +++ b/vendor/github.com/go-openapi/runtime/client/auth_info.go @@ -33,7 +33,7 @@ func init() { func BasicAuth(username, password string) runtime.ClientAuthInfoWriter { return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error { encoded := base64.StdEncoding.EncodeToString([]byte(username + ":" + password)) - return r.SetHeaderParam("Authorization", "Basic "+encoded) + return r.SetHeaderParam(runtime.HeaderAuthorization, "Basic "+encoded) }) } @@ -56,7 +56,7 @@ func APIKeyAuth(name, in, value string) runtime.ClientAuthInfoWriter { // BearerToken provides a header based oauth2 bearer access token auth info writer func BearerToken(token string) runtime.ClientAuthInfoWriter { return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error { - return r.SetHeaderParam("Authorization", "Bearer "+token) + return r.SetHeaderParam(runtime.HeaderAuthorization, "Bearer "+token) }) } diff --git a/vendor/github.com/go-openapi/runtime/client/keepalive.go b/vendor/github.com/go-openapi/runtime/client/keepalive.go index e9c250d6a8a..bc7b7fa418f 100644 --- a/vendor/github.com/go-openapi/runtime/client/keepalive.go +++ b/vendor/github.com/go-openapi/runtime/client/keepalive.go @@ -2,7 +2,6 @@ package client import ( "io" - "io/ioutil" "net/http" "sync/atomic" ) @@ -50,7 +49,7 @@ func (d *drainingReadCloser) Close() error { // some bytes, but the closer ignores them to keep the underling // connection open. //nolint:errcheck - io.Copy(ioutil.Discard, d.rdr) + io.Copy(io.Discard, d.rdr) } return d.rdr.Close() } diff --git a/vendor/github.com/go-openapi/runtime/client/opentelemetry.go b/vendor/github.com/go-openapi/runtime/client/opentelemetry.go new file mode 100644 index 00000000000..8a38ea3e94f --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client/opentelemetry.go @@ -0,0 +1,207 @@ +package client + +import ( + "fmt" + "net/http" + "strings" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/propagation" + semconv "go.opentelemetry.io/otel/semconv/v1.12.0" + "go.opentelemetry.io/otel/trace" +) + +const ( + instrumentationVersion = "1.0.0" + tracerName = "go-openapi" +) + +type config struct { + Tracer trace.Tracer + Propagator propagation.TextMapPropagator + SpanStartOptions []trace.SpanStartOption + SpanNameFormatter func(*runtime.ClientOperation) string + TracerProvider trace.TracerProvider +} + +type OpenTelemetryOpt interface { + apply(*config) +} + +type optionFunc func(*config) + +func (o optionFunc) apply(c *config) { + o(c) +} + +// WithTracerProvider specifies a tracer provider to use for creating a tracer. +// If none is specified, the global provider is used. +func WithTracerProvider(provider trace.TracerProvider) OpenTelemetryOpt { + return optionFunc(func(c *config) { + if provider != nil { + c.TracerProvider = provider + } + }) +} + +// WithPropagators configures specific propagators. If this +// option isn't specified, then the global TextMapPropagator is used. +func WithPropagators(ps propagation.TextMapPropagator) OpenTelemetryOpt { + return optionFunc(func(c *config) { + if ps != nil { + c.Propagator = ps + } + }) +} + +// WithSpanOptions configures an additional set of +// trace.SpanOptions, which are applied to each new span. +func WithSpanOptions(opts ...trace.SpanStartOption) OpenTelemetryOpt { + return optionFunc(func(c *config) { + c.SpanStartOptions = append(c.SpanStartOptions, opts...) + }) +} + +// WithSpanNameFormatter takes a function that will be called on every +// request and the returned string will become the Span Name. +func WithSpanNameFormatter(f func(op *runtime.ClientOperation) string) OpenTelemetryOpt { + return optionFunc(func(c *config) { + c.SpanNameFormatter = f + }) +} + +func defaultTransportFormatter(op *runtime.ClientOperation) string { + if op.ID != "" { + return op.ID + } + + return fmt.Sprintf("%s_%s", strings.ToLower(op.Method), op.PathPattern) +} + +type openTelemetryTransport struct { + transport runtime.ClientTransport + host string + tracer trace.Tracer + config *config +} + +func newOpenTelemetryTransport(transport runtime.ClientTransport, host string, opts []OpenTelemetryOpt) *openTelemetryTransport { + tr := &openTelemetryTransport{ + transport: transport, + host: host, + } + + defaultOpts := []OpenTelemetryOpt{ + WithSpanOptions(trace.WithSpanKind(trace.SpanKindClient)), + WithSpanNameFormatter(defaultTransportFormatter), + WithPropagators(otel.GetTextMapPropagator()), + WithTracerProvider(otel.GetTracerProvider()), + } + + c := newConfig(append(defaultOpts, opts...)...) + tr.config = c + + return tr +} + +func (t *openTelemetryTransport) Submit(op *runtime.ClientOperation) (interface{}, error) { + if op.Context == nil { + return t.transport.Submit(op) + } + + params := op.Params + reader := op.Reader + + var span trace.Span + defer func() { + if span != nil { + span.End() + } + }() + + op.Params = runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error { + span = t.newOpenTelemetrySpan(op, req.GetHeaderParams()) + return params.WriteToRequest(req, reg) + }) + + op.Reader = runtime.ClientResponseReaderFunc(func(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + if span != nil { + statusCode := response.Code() + span.SetAttributes(attribute.Int(string(semconv.HTTPStatusCodeKey), statusCode)) + span.SetStatus(semconv.SpanStatusFromHTTPStatusCodeAndSpanKind(statusCode, trace.SpanKindClient)) + } + + return reader.ReadResponse(response, consumer) + }) + + submit, err := t.transport.Submit(op) + if err != nil && span != nil { + span.RecordError(err) + span.SetStatus(codes.Error, err.Error()) + } + + return submit, err +} + +func (t *openTelemetryTransport) newOpenTelemetrySpan(op *runtime.ClientOperation, header http.Header) trace.Span { + ctx := op.Context + + tracer := t.tracer + if tracer == nil { + if span := trace.SpanFromContext(ctx); span.SpanContext().IsValid() { + tracer = newTracer(span.TracerProvider()) + } else { + tracer = newTracer(otel.GetTracerProvider()) + } + } + + ctx, span := tracer.Start(ctx, t.config.SpanNameFormatter(op), t.config.SpanStartOptions...) + + var scheme string + if len(op.Schemes) > 0 { + scheme = op.Schemes[0] + } + + span.SetAttributes( + attribute.String("net.peer.name", t.host), + attribute.String(string(semconv.HTTPRouteKey), op.PathPattern), + attribute.String(string(semconv.HTTPMethodKey), op.Method), + attribute.String("span.kind", trace.SpanKindClient.String()), + attribute.String("http.scheme", scheme), + ) + + carrier := propagation.HeaderCarrier(header) + t.config.Propagator.Inject(ctx, carrier) + + return span +} + +func newTracer(tp trace.TracerProvider) trace.Tracer { + return tp.Tracer(tracerName, trace.WithInstrumentationVersion(version())) +} + +func newConfig(opts ...OpenTelemetryOpt) *config { + c := &config{ + Propagator: otel.GetTextMapPropagator(), + } + + for _, opt := range opts { + opt.apply(c) + } + + // Tracer is only initialized if manually specified. Otherwise, can be passed with the tracing context. + if c.TracerProvider != nil { + c.Tracer = newTracer(c.TracerProvider) + } + + return c +} + +// Version is the current release version of the go-runtime instrumentation. +func version() string { + return instrumentationVersion +} diff --git a/vendor/github.com/go-openapi/runtime/client/request.go b/vendor/github.com/go-openapi/runtime/client/request.go index 7d622eee93b..4c00ed3a5a5 100644 --- a/vendor/github.com/go-openapi/runtime/client/request.go +++ b/vendor/github.com/go-openapi/runtime/client/request.go @@ -161,15 +161,22 @@ func (r *request) buildHTTP(mediaType, basePath string, producers map[string]run }() for fn, f := range r.fileFields { for _, fi := range f { - // Need to read the data so that we can detect the content type - buf := make([]byte, 512) - size, err := fi.Read(buf) - if err != nil { - logClose(err, pw) - return + var fileContentType string + if p, ok := fi.(interface { + ContentType() string + }); ok { + fileContentType = p.ContentType() + } else { + // Need to read the data so that we can detect the content type + buf := make([]byte, 512) + size, err := fi.Read(buf) + if err != nil { + logClose(err, pw) + return + } + fileContentType = http.DetectContentType(buf) + fi = runtime.NamedReader(fi.Name(), io.MultiReader(bytes.NewReader(buf[:size]), fi)) } - fileContentType := http.DetectContentType(buf) - newFi := runtime.NamedReader(fi.Name(), io.MultiReader(bytes.NewReader(buf[:size]), fi)) // Create the MIME headers for the new part h := make(textproto.MIMEHeader) @@ -183,7 +190,7 @@ func (r *request) buildHTTP(mediaType, basePath string, producers map[string]run logClose(err, pw) return } - if _, err := io.Copy(wrtr, newFi); err != nil { + if _, err := io.Copy(wrtr, fi); err != nil { logClose(err, pw) } } @@ -217,7 +224,7 @@ func (r *request) buildHTTP(mediaType, basePath string, producers map[string]run DoneChoosingBodySource: - if runtime.CanHaveBody(r.method) && body == nil && r.header.Get(runtime.HeaderContentType) == "" { + if runtime.CanHaveBody(r.method) && body != nil && r.header.Get(runtime.HeaderContentType) == "" { r.header.Set(runtime.HeaderContentType, mediaType) } diff --git a/vendor/github.com/go-openapi/runtime/client/response.go b/vendor/github.com/go-openapi/runtime/client/response.go index b297a12ff03..0bbd388bc8b 100644 --- a/vendor/github.com/go-openapi/runtime/client/response.go +++ b/vendor/github.com/go-openapi/runtime/client/response.go @@ -23,6 +23,8 @@ import ( var _ runtime.ClientResponse = response{} +func newResponse(resp *http.Response) runtime.ClientResponse { return response{resp: resp} } + type response struct { resp *http.Response } diff --git a/vendor/github.com/go-openapi/runtime/client/runtime.go b/vendor/github.com/go-openapi/runtime/client/runtime.go index f6ea0fad3c5..ccec04138b1 100644 --- a/vendor/github.com/go-openapi/runtime/client/runtime.go +++ b/vendor/github.com/go-openapi/runtime/client/runtime.go @@ -23,21 +23,21 @@ import ( "crypto/x509" "encoding/pem" "fmt" - "io/ioutil" "mime" "net/http" "net/http/httputil" + "os" "strings" "sync" "time" - "github.com/go-openapi/strfmt" "github.com/opentracing/opentracing-go" "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/logger" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/yamlpc" + "github.com/go-openapi/strfmt" ) // TLSClientOptions to configure client authentication with mutual TLS @@ -164,7 +164,7 @@ func TLSClientAuth(opts TLSClientOptions) (*tls.Config, error) { cfg.RootCAs = caCertPool } else if opts.CA != "" { // load ca cert - caCert, err := ioutil.ReadFile(opts.CA) + caCert, err := os.ReadFile(opts.CA) if err != nil { return nil, fmt.Errorf("tls client ca: %v", err) } @@ -181,8 +181,6 @@ func TLSClientAuth(opts TLSClientOptions) (*tls.Config, error) { cfg.ServerName = opts.ServerName } - cfg.BuildNameToCertificate() - return cfg, nil } @@ -225,7 +223,7 @@ type Runtime struct { Transport http.RoundTripper Jar http.CookieJar - //Spec *spec.Document + // Spec *spec.Document Host string BasePath string Formats strfmt.Registry @@ -237,6 +235,7 @@ type Runtime struct { clientOnce *sync.Once client *http.Client schemes []string + response ClientResponseFunc } // New creates a new default runtime for a swagger api runtime.Client @@ -275,6 +274,7 @@ func New(host, basePath string, schemes []string) *Runtime { rt.Debug = logger.DebugEnabled() rt.logger = logger.StandardLogger{} + rt.response = newResponse if len(schemes) > 0 { rt.schemes = schemes @@ -301,6 +301,14 @@ func (r *Runtime) WithOpenTracing(opts ...opentracing.StartSpanOption) runtime.C return newOpenTracingTransport(r, r.Host, opts) } +// WithOpenTelemetry adds opentelemetry support to the provided runtime. +// A new client span is created for each request. +// If the context of the client operation does not contain an active span, no span is created. +// The provided opts are applied to each spans - for example to add global tags. +func (r *Runtime) WithOpenTelemetry(opts ...OpenTelemetryOpt) runtime.ClientTransport { + return newOpenTelemetryTransport(r, r.Host, opts) +} + func (r *Runtime) pickScheme(schemes []string) string { if v := r.selectScheme(r.schemes); v != "" { return v @@ -329,6 +337,7 @@ func (r *Runtime) selectScheme(schemes []string) string { } return scheme } + func transportOrDefault(left, right http.RoundTripper) http.RoundTripper { if left == nil { return right @@ -358,26 +367,30 @@ func (r *Runtime) EnableConnectionReuse() { ) } -// Submit a request and when there is a body on success it will turn that into the result -// all other things are turned into an api error for swagger which retains the status code -func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error) { - params, readResponse, auth := operation.Params, operation.Reader, operation.AuthInfo +// takes a client operation and creates equivalent http.Request +func (r *Runtime) createHttpRequest(operation *runtime.ClientOperation) (*request, *http.Request, error) { + params, _, auth := operation.Params, operation.Reader, operation.AuthInfo request, err := newRequest(operation.Method, operation.PathPattern, params) if err != nil { - return nil, err + return nil, nil, err } var accept []string accept = append(accept, operation.ProducesMediaTypes...) if err = request.SetHeaderParam(runtime.HeaderAccept, accept...); err != nil { - return nil, err + return nil, nil, err } if auth == nil && r.DefaultAuthentication != nil { - auth = r.DefaultAuthentication + auth = runtime.ClientAuthInfoWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error { + if req.GetHeaderParams().Get(runtime.HeaderAuthorization) != "" { + return nil + } + return r.DefaultAuthentication.AuthenticateRequest(req, reg) + }) } - //if auth != nil { + // if auth != nil { // if err := auth.AuthenticateRequest(request, r.Formats); err != nil { // return nil, err // } @@ -394,16 +407,33 @@ func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error } if _, ok := r.Producers[cmt]; !ok && cmt != runtime.MultipartFormMime && cmt != runtime.URLencodedFormMime { - return nil, fmt.Errorf("none of producers: %v registered. try %s", r.Producers, cmt) + return nil, nil, fmt.Errorf("none of producers: %v registered. try %s", r.Producers, cmt) } req, err := request.buildHTTP(cmt, r.BasePath, r.Producers, r.Formats, auth) if err != nil { - return nil, err + return nil, nil, err } req.URL.Scheme = r.pickScheme(operation.Schemes) req.URL.Host = r.Host req.Host = r.Host + return request, req, nil +} + +func (r *Runtime) CreateHttpRequest(operation *runtime.ClientOperation) (req *http.Request, err error) { + _, req, err = r.createHttpRequest(operation) + return +} + +// Submit a request and when there is a body on success it will turn that into the result +// all other things are turned into an api error for swagger which retains the status code +func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error) { + _, readResponse, _ := operation.Params, operation.Reader, operation.AuthInfo + + request, req, err := r.createHttpRequest(operation) + if err != nil { + return nil, err + } r.clientOnce.Do(func() { r.client = &http.Client{ @@ -479,7 +509,7 @@ func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error return nil, fmt.Errorf("no consumer: %q", ct) } } - return readResponse.ReadResponse(response{res}, cons) + return readResponse.ReadResponse(r.response(res), cons) } // SetDebug changes the debug flag. @@ -495,3 +525,13 @@ func (r *Runtime) SetLogger(logger logger.Logger) { r.logger = logger middleware.Logger = logger } + +type ClientResponseFunc = func(*http.Response) runtime.ClientResponse + +// SetResponseReader changes the response reader implementation. +func (r *Runtime) SetResponseReader(f ClientResponseFunc) { + if f == nil { + return + } + r.response = f +} diff --git a/vendor/github.com/go-openapi/runtime/client_request.go b/vendor/github.com/go-openapi/runtime/client_request.go index 3efda348216..d4d2b58f2bb 100644 --- a/vendor/github.com/go-openapi/runtime/client_request.go +++ b/vendor/github.com/go-openapi/runtime/client_request.go @@ -16,7 +16,6 @@ package runtime import ( "io" - "io/ioutil" "net/http" "net/url" "time" @@ -79,7 +78,7 @@ type NamedReadCloser interface { func NamedReader(name string, rdr io.Reader) NamedReadCloser { rc, ok := rdr.(io.ReadCloser) if !ok { - rc = ioutil.NopCloser(rdr) + rc = io.NopCloser(rdr) } return &namedReadCloser{ name: name, diff --git a/vendor/github.com/go-openapi/runtime/client_response.go b/vendor/github.com/go-openapi/runtime/client_response.go index 0b7e3824657..0d1691149d4 100644 --- a/vendor/github.com/go-openapi/runtime/client_response.go +++ b/vendor/github.com/go-openapi/runtime/client_response.go @@ -15,10 +15,9 @@ package runtime import ( + "encoding/json" "fmt" "io" - - "encoding/json" ) // A ClientResponse represents a client response @@ -61,13 +60,18 @@ type APIError struct { Code int } -func (a *APIError) Error() string { - resp, _ := json.Marshal(a.Response) - return fmt.Sprintf("%s (status %d): %s", a.OperationName, a.Code, resp) +func (o *APIError) Error() string { + var resp []byte + if err, ok := o.Response.(error); ok { + resp = []byte("'" + err.Error() + "'") + } else { + resp, _ = json.Marshal(o.Response) + } + return fmt.Sprintf("%s (status %d): %s", o.OperationName, o.Code, resp) } -func (a *APIError) String() string { - return a.Error() +func (o *APIError) String() string { + return o.Error() } // IsSuccess returns true when this elapse o k response returns a 2xx status code diff --git a/vendor/github.com/go-openapi/runtime/constants.go b/vendor/github.com/go-openapi/runtime/constants.go index a4de897adcd..515969242ca 100644 --- a/vendor/github.com/go-openapi/runtime/constants.go +++ b/vendor/github.com/go-openapi/runtime/constants.go @@ -23,6 +23,8 @@ const ( // HeaderAccept the Accept header HeaderAccept = "Accept" + // HeaderAuthorization the Authorization header + HeaderAuthorization = "Authorization" charsetKey = "charset" diff --git a/vendor/github.com/go-openapi/runtime/file.go b/vendor/github.com/go-openapi/runtime/file.go index 85971c18c4b..397d8a45933 100644 --- a/vendor/github.com/go-openapi/runtime/file.go +++ b/vendor/github.com/go-openapi/runtime/file.go @@ -14,20 +14,6 @@ package runtime -import "mime/multipart" +import "github.com/go-openapi/swag" -// File represents an uploaded file. -type File struct { - Data multipart.File - Header *multipart.FileHeader -} - -// Read bytes from the file -func (f *File) Read(p []byte) (n int, err error) { - return f.Data.Read(p) -} - -// Close the file -func (f *File) Close() error { - return f.Data.Close() -} +type File = swag.File diff --git a/vendor/github.com/go-openapi/runtime/middleware/context.go b/vendor/github.com/go-openapi/runtime/middleware/context.go index 250e35fb0e1..d21ae4e870c 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/context.go +++ b/vendor/github.com/go-openapi/runtime/middleware/context.go @@ -195,6 +195,17 @@ func NewRoutableContext(spec *loads.Document, routableAPI RoutableAPI, routes Ro if spec != nil { an = analysis.New(spec.Spec()) } + + return NewRoutableContextWithAnalyzedSpec(spec, an, routableAPI, routes) +} + +// NewRoutableContextWithAnalyzedSpec is like NewRoutableContext but takes in input the analysed spec too +func NewRoutableContextWithAnalyzedSpec(spec *loads.Document, an *analysis.Spec, routableAPI RoutableAPI, routes Router) *Context { + // Either there are no spec doc and analysis, or both of them. + if !((spec == nil && an == nil) || (spec != nil && an != nil)) { + panic(errors.New(http.StatusInternalServerError, "routable context requires either both spec doc and analysis, or none of them")) + } + ctx := &Context{spec: spec, api: routableAPI, analyzer: an, router: routes} return ctx } @@ -498,7 +509,9 @@ func (c *Context) Respond(rw http.ResponseWriter, r *http.Request, produces []st if resp, ok := data.(Responder); ok { producers := route.Producers - prod, ok := producers[format] + // producers contains keys with normalized format, if a format has MIME type parameter such as `text/plain; charset=utf-8` + // then you must provide `text/plain` to get the correct producer. HOWEVER, format here is not normalized. + prod, ok := producers[normalizeOffer(format)] if !ok { prods := c.api.ProducersFor(normalizeOffers([]string{c.api.DefaultProduces()})) pr, ok := prods[c.api.DefaultProduces()] diff --git a/vendor/github.com/go-openapi/runtime/middleware/parameter.go b/vendor/github.com/go-openapi/runtime/middleware/parameter.go index 8fa0cf4e464..9aaf65958ad 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/parameter.go +++ b/vendor/github.com/go-openapi/runtime/middleware/parameter.go @@ -206,7 +206,11 @@ func (p *untypedParamBinder) Bind(request *http.Request, routeParams RouteParams if p.parameter.Type == "file" { file, header, ffErr := request.FormFile(p.parameter.Name) if ffErr != nil { - return errors.NewParseError(p.Name, p.parameter.In, "", ffErr) + if p.parameter.Required { + return errors.NewParseError(p.Name, p.parameter.In, "", ffErr) + } else { + return nil + } } target.Set(reflect.ValueOf(runtime.File{Data: file, Header: header})) return nil diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go index 2c92f5c91f3..b4dea29e4bc 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go +++ b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go @@ -16,6 +16,8 @@ type SwaggerUIOpts struct { Path string // SpecURL the url to find the spec for SpecURL string + // OAuthCallbackURL the url called after OAuth2 login + OAuthCallbackURL string // The three components needed to embed swagger-ui SwaggerURL string @@ -40,6 +42,9 @@ func (r *SwaggerUIOpts) EnsureDefaults() { if r.SpecURL == "" { r.SpecURL = "/swagger.json" } + if r.OAuthCallbackURL == "" { + r.OAuthCallbackURL = path.Join(r.BasePath, r.Path, "oauth2-callback") + } if r.SwaggerURL == "" { r.SwaggerURL = swaggerLatest } @@ -73,7 +78,7 @@ func SwaggerUI(opts SwaggerUIOpts, next http.Handler) http.Handler { b := buf.Bytes() return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - if r.URL.Path == pth { + if path.Join(r.URL.Path) == pth { rw.Header().Set("Content-Type", "text/html; charset=utf-8") rw.WriteHeader(http.StatusOK) @@ -149,7 +154,8 @@ const ( plugins: [ SwaggerUIBundle.plugins.DownloadUrl ], - layout: "StandaloneLayout" + layout: "StandaloneLayout", + oauth2RedirectUrl: '{{ .OAuthCallbackURL }}' }) // End Swagger UI call region diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go new file mode 100644 index 00000000000..576f6003f7b --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/swaggerui_oauth2.go @@ -0,0 +1,122 @@ +package middleware + +import ( + "bytes" + "fmt" + "net/http" + "path" + "text/template" +) + +func SwaggerUIOAuth2Callback(opts SwaggerUIOpts, next http.Handler) http.Handler { + opts.EnsureDefaults() + + pth := opts.OAuthCallbackURL + tmpl := template.Must(template.New("swaggeroauth").Parse(swaggerOAuthTemplate)) + + buf := bytes.NewBuffer(nil) + _ = tmpl.Execute(buf, &opts) + b := buf.Bytes() + + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + if path.Join(r.URL.Path) == pth { + rw.Header().Set("Content-Type", "text/html; charset=utf-8") + rw.WriteHeader(http.StatusOK) + + _, _ = rw.Write(b) + return + } + + if next == nil { + rw.Header().Set("Content-Type", "text/plain") + rw.WriteHeader(http.StatusNotFound) + _, _ = rw.Write([]byte(fmt.Sprintf("%q not found", pth))) + return + } + next.ServeHTTP(rw, r) + }) +} + +const ( + swaggerOAuthTemplate = ` + + + + {{ .Title }} + + + + + +` +) diff --git a/vendor/github.com/go-openapi/runtime/security/authenticator.go b/vendor/github.com/go-openapi/runtime/security/authenticator.go index 476d26c3e77..c3ffdac7e87 100644 --- a/vendor/github.com/go-openapi/runtime/security/authenticator.go +++ b/vendor/github.com/go-openapi/runtime/security/authenticator.go @@ -220,7 +220,7 @@ func BearerAuth(name string, authenticate ScopedTokenAuthentication) runtime.Aut const prefix = "Bearer " return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, interface{}, error) { var token string - hdr := r.Request.Header.Get("Authorization") + hdr := r.Request.Header.Get(runtime.HeaderAuthorization) if strings.HasPrefix(hdr, prefix) { token = strings.TrimPrefix(hdr, prefix) } @@ -250,7 +250,7 @@ func BearerAuthCtx(name string, authenticate ScopedTokenAuthenticationCtx) runti const prefix = "Bearer " return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, interface{}, error) { var token string - hdr := r.Request.Header.Get("Authorization") + hdr := r.Request.Header.Get(runtime.HeaderAuthorization) if strings.HasPrefix(hdr, prefix) { token = strings.TrimPrefix(hdr, prefix) } diff --git a/vendor/github.com/go-openapi/strfmt/bson.go b/vendor/github.com/go-openapi/strfmt/bson.go index 8740b150599..a8a3604a2c3 100644 --- a/vendor/github.com/go-openapi/strfmt/bson.go +++ b/vendor/github.com/go-openapi/strfmt/bson.go @@ -142,7 +142,7 @@ func (id ObjectId) MarshalBSONValue() (bsontype.Type, []byte, error) { // BSON value representation of themselves. The BSON bytes and type can be // assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it // wishes to retain the data after returning. -func (id *ObjectId) UnmarshalBSONValue(tpe bsontype.Type, data []byte) error { +func (id *ObjectId) UnmarshalBSONValue(_ bsontype.Type, data []byte) error { var oid bsonprim.ObjectID copy(oid[:], data) *id = ObjectId(oid) diff --git a/vendor/github.com/go-openapi/strfmt/time.go b/vendor/github.com/go-openapi/strfmt/time.go index 6f5a44bb7de..9bef4c3b335 100644 --- a/vendor/github.com/go-openapi/strfmt/time.go +++ b/vendor/github.com/go-openapi/strfmt/time.go @@ -133,13 +133,19 @@ func (t DateTime) String() string { } // IsZero returns whether the date time is a zero value -func (t DateTime) IsZero() bool { - return time.Time(t).IsZero() +func (t *DateTime) IsZero() bool { + if t == nil { + return true + } + return time.Time(*t).IsZero() } // IsUnixZerom returns whether the date time is equivalent to time.Unix(0, 0).UTC(). -func (t DateTime) IsUnixZero() bool { - return time.Time(t) == UnixZero +func (t *DateTime) IsUnixZero() bool { + if t == nil { + return true + } + return time.Time(*t).Equal(UnixZero) } // MarshalText implements the text marshaller interface diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go index f78ab684a0a..d971fbe34b4 100644 --- a/vendor/github.com/go-openapi/swag/util.go +++ b/vendor/github.com/go-openapi/swag/util.go @@ -341,12 +341,21 @@ type zeroable interface { // IsZero returns true when the value passed into the function is a zero value. // This allows for safer checking of interface values. func IsZero(data interface{}) bool { + v := reflect.ValueOf(data) + // check for nil data + switch v.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + if v.IsNil() { + return true + } + } + // check for things that have an IsZero method instead if vv, ok := data.(zeroable); ok { return vv.IsZero() } + // continue with slightly more complex reflection - v := reflect.ValueOf(data) switch v.Kind() { case reflect.String: return v.Len() == 0 @@ -358,14 +367,13 @@ func IsZero(data interface{}) bool { return v.Uint() == 0 case reflect.Float32, reflect.Float64: return v.Float() == 0 - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return v.IsNil() case reflect.Struct, reflect.Array: return reflect.DeepEqual(data, reflect.Zero(v.Type()).Interface()) case reflect.Invalid: return true + default: + return false } - return false } // AddInitialisms add additional initialisms diff --git a/vendor/github.com/go-openapi/validate/values.go b/vendor/github.com/go-openapi/validate/values.go index c88d35d7f23..e7ad8c10336 100644 --- a/vendor/github.com/go-openapi/validate/values.go +++ b/vendor/github.com/go-openapi/validate/values.go @@ -248,7 +248,7 @@ func MinimumUint(path, in string, data, min uint64, exclusive bool) *errors.Vali // MultipleOf validates if the provided number is a multiple of the factor func MultipleOf(path, in string, data, factor float64) *errors.Validation { // multipleOf factor must be positive - if factor < 0 { + if factor <= 0 { return errors.MultipleOfMustBePositive(path, in, factor) } var mult float64 @@ -266,7 +266,7 @@ func MultipleOf(path, in string, data, factor float64) *errors.Validation { // MultipleOfInt validates if the provided integer is a multiple of the factor func MultipleOfInt(path, in string, data int64, factor int64) *errors.Validation { // multipleOf factor must be positive - if factor < 0 { + if factor <= 0 { return errors.MultipleOfMustBePositive(path, in, factor) } mult := data / factor @@ -278,6 +278,10 @@ func MultipleOfInt(path, in string, data int64, factor int64) *errors.Validation // MultipleOfUint validates if the provided unsigned integer is a multiple of the factor func MultipleOfUint(path, in string, data, factor uint64) *errors.Validation { + // multipleOf factor must be positive + if factor == 0 { + return errors.MultipleOfMustBePositive(path, in, factor) + } mult := data / factor if mult*factor != data { return errors.NotMultipleOf(path, in, factor, data) diff --git a/vendor/go.opentelemetry.io/otel/semconv/internal/http.go b/vendor/go.opentelemetry.io/otel/semconv/internal/http.go new file mode 100644 index 00000000000..19c394c69b6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/internal/http.go @@ -0,0 +1,338 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal // import "go.opentelemetry.io/otel/semconv/internal" + +import ( + "fmt" + "net" + "net/http" + "strconv" + "strings" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" +) + +// SemanticConventions are the semantic convention values defined for a +// version of the OpenTelemetry specification. +type SemanticConventions struct { + EnduserIDKey attribute.Key + HTTPClientIPKey attribute.Key + HTTPFlavorKey attribute.Key + HTTPHostKey attribute.Key + HTTPMethodKey attribute.Key + HTTPRequestContentLengthKey attribute.Key + HTTPRouteKey attribute.Key + HTTPSchemeHTTP attribute.KeyValue + HTTPSchemeHTTPS attribute.KeyValue + HTTPServerNameKey attribute.Key + HTTPStatusCodeKey attribute.Key + HTTPTargetKey attribute.Key + HTTPURLKey attribute.Key + HTTPUserAgentKey attribute.Key + NetHostIPKey attribute.Key + NetHostNameKey attribute.Key + NetHostPortKey attribute.Key + NetPeerIPKey attribute.Key + NetPeerNameKey attribute.Key + NetPeerPortKey attribute.Key + NetTransportIP attribute.KeyValue + NetTransportOther attribute.KeyValue + NetTransportTCP attribute.KeyValue + NetTransportUDP attribute.KeyValue + NetTransportUnix attribute.KeyValue +} + +// NetAttributesFromHTTPRequest generates attributes of the net +// namespace as specified by the OpenTelemetry specification for a +// span. The network parameter is a string that net.Dial function +// from standard library can understand. +func (sc *SemanticConventions) NetAttributesFromHTTPRequest(network string, request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{} + + switch network { + case "tcp", "tcp4", "tcp6": + attrs = append(attrs, sc.NetTransportTCP) + case "udp", "udp4", "udp6": + attrs = append(attrs, sc.NetTransportUDP) + case "ip", "ip4", "ip6": + attrs = append(attrs, sc.NetTransportIP) + case "unix", "unixgram", "unixpacket": + attrs = append(attrs, sc.NetTransportUnix) + default: + attrs = append(attrs, sc.NetTransportOther) + } + + peerIP, peerName, peerPort := hostIPNamePort(request.RemoteAddr) + if peerIP != "" { + attrs = append(attrs, sc.NetPeerIPKey.String(peerIP)) + } + if peerName != "" { + attrs = append(attrs, sc.NetPeerNameKey.String(peerName)) + } + if peerPort != 0 { + attrs = append(attrs, sc.NetPeerPortKey.Int(peerPort)) + } + + hostIP, hostName, hostPort := "", "", 0 + for _, someHost := range []string{request.Host, request.Header.Get("Host"), request.URL.Host} { + hostIP, hostName, hostPort = hostIPNamePort(someHost) + if hostIP != "" || hostName != "" || hostPort != 0 { + break + } + } + if hostIP != "" { + attrs = append(attrs, sc.NetHostIPKey.String(hostIP)) + } + if hostName != "" { + attrs = append(attrs, sc.NetHostNameKey.String(hostName)) + } + if hostPort != 0 { + attrs = append(attrs, sc.NetHostPortKey.Int(hostPort)) + } + + return attrs +} + +// hostIPNamePort extracts the IP address, name and (optional) port from hostWithPort. +// It handles both IPv4 and IPv6 addresses. If the host portion is not recognized +// as a valid IPv4 or IPv6 address, the `ip` result will be empty and the +// host portion will instead be returned in `name`. +func hostIPNamePort(hostWithPort string) (ip string, name string, port int) { + var ( + hostPart, portPart string + parsedPort uint64 + err error + ) + if hostPart, portPart, err = net.SplitHostPort(hostWithPort); err != nil { + hostPart, portPart = hostWithPort, "" + } + if parsedIP := net.ParseIP(hostPart); parsedIP != nil { + ip = parsedIP.String() + } else { + name = hostPart + } + if parsedPort, err = strconv.ParseUint(portPart, 10, 16); err == nil { + port = int(parsedPort) + } + return +} + +// EndUserAttributesFromHTTPRequest generates attributes of the +// enduser namespace as specified by the OpenTelemetry specification +// for a span. +func (sc *SemanticConventions) EndUserAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + if username, _, ok := request.BasicAuth(); ok { + return []attribute.KeyValue{sc.EnduserIDKey.String(username)} + } + return nil +} + +// HTTPClientAttributesFromHTTPRequest generates attributes of the +// http namespace as specified by the OpenTelemetry specification for +// a span on the client side. +func (sc *SemanticConventions) HTTPClientAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{} + + // remove any username/password info that may be in the URL + // before adding it to the attributes + userinfo := request.URL.User + request.URL.User = nil + + attrs = append(attrs, sc.HTTPURLKey.String(request.URL.String())) + + // restore any username/password info that was removed + request.URL.User = userinfo + + return append(attrs, sc.httpCommonAttributesFromHTTPRequest(request)...) +} + +func (sc *SemanticConventions) httpCommonAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{} + if ua := request.UserAgent(); ua != "" { + attrs = append(attrs, sc.HTTPUserAgentKey.String(ua)) + } + if request.ContentLength > 0 { + attrs = append(attrs, sc.HTTPRequestContentLengthKey.Int64(request.ContentLength)) + } + + return append(attrs, sc.httpBasicAttributesFromHTTPRequest(request)...) +} + +func (sc *SemanticConventions) httpBasicAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + // as these attributes are used by HTTPServerMetricAttributesFromHTTPRequest, they should be low-cardinality + attrs := []attribute.KeyValue{} + + if request.TLS != nil { + attrs = append(attrs, sc.HTTPSchemeHTTPS) + } else { + attrs = append(attrs, sc.HTTPSchemeHTTP) + } + + if request.Host != "" { + attrs = append(attrs, sc.HTTPHostKey.String(request.Host)) + } else if request.URL != nil && request.URL.Host != "" { + attrs = append(attrs, sc.HTTPHostKey.String(request.URL.Host)) + } + + flavor := "" + if request.ProtoMajor == 1 { + flavor = fmt.Sprintf("1.%d", request.ProtoMinor) + } else if request.ProtoMajor == 2 { + flavor = "2" + } + if flavor != "" { + attrs = append(attrs, sc.HTTPFlavorKey.String(flavor)) + } + + if request.Method != "" { + attrs = append(attrs, sc.HTTPMethodKey.String(request.Method)) + } else { + attrs = append(attrs, sc.HTTPMethodKey.String(http.MethodGet)) + } + + return attrs +} + +// HTTPServerMetricAttributesFromHTTPRequest generates low-cardinality attributes +// to be used with server-side HTTP metrics. +func (sc *SemanticConventions) HTTPServerMetricAttributesFromHTTPRequest(serverName string, request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{} + if serverName != "" { + attrs = append(attrs, sc.HTTPServerNameKey.String(serverName)) + } + return append(attrs, sc.httpBasicAttributesFromHTTPRequest(request)...) +} + +// HTTPServerAttributesFromHTTPRequest generates attributes of the +// http namespace as specified by the OpenTelemetry specification for +// a span on the server side. Currently, only basic authentication is +// supported. +func (sc *SemanticConventions) HTTPServerAttributesFromHTTPRequest(serverName, route string, request *http.Request) []attribute.KeyValue { + attrs := []attribute.KeyValue{ + sc.HTTPTargetKey.String(request.RequestURI), + } + + if serverName != "" { + attrs = append(attrs, sc.HTTPServerNameKey.String(serverName)) + } + if route != "" { + attrs = append(attrs, sc.HTTPRouteKey.String(route)) + } + if values := request.Header["X-Forwarded-For"]; len(values) > 0 { + addr := values[0] + if i := strings.Index(addr, ","); i > 0 { + addr = addr[:i] + } + attrs = append(attrs, sc.HTTPClientIPKey.String(addr)) + } + + return append(attrs, sc.httpCommonAttributesFromHTTPRequest(request)...) +} + +// HTTPAttributesFromHTTPStatusCode generates attributes of the http +// namespace as specified by the OpenTelemetry specification for a +// span. +func (sc *SemanticConventions) HTTPAttributesFromHTTPStatusCode(code int) []attribute.KeyValue { + attrs := []attribute.KeyValue{ + sc.HTTPStatusCodeKey.Int(code), + } + return attrs +} + +type codeRange struct { + fromInclusive int + toInclusive int +} + +func (r codeRange) contains(code int) bool { + return r.fromInclusive <= code && code <= r.toInclusive +} + +var validRangesPerCategory = map[int][]codeRange{ + 1: { + {http.StatusContinue, http.StatusEarlyHints}, + }, + 2: { + {http.StatusOK, http.StatusAlreadyReported}, + {http.StatusIMUsed, http.StatusIMUsed}, + }, + 3: { + {http.StatusMultipleChoices, http.StatusUseProxy}, + {http.StatusTemporaryRedirect, http.StatusPermanentRedirect}, + }, + 4: { + {http.StatusBadRequest, http.StatusTeapot}, // yes, teapot is so useful… + {http.StatusMisdirectedRequest, http.StatusUpgradeRequired}, + {http.StatusPreconditionRequired, http.StatusTooManyRequests}, + {http.StatusRequestHeaderFieldsTooLarge, http.StatusRequestHeaderFieldsTooLarge}, + {http.StatusUnavailableForLegalReasons, http.StatusUnavailableForLegalReasons}, + }, + 5: { + {http.StatusInternalServerError, http.StatusLoopDetected}, + {http.StatusNotExtended, http.StatusNetworkAuthenticationRequired}, + }, +} + +// SpanStatusFromHTTPStatusCode generates a status code and a message +// as specified by the OpenTelemetry specification for a span. +func SpanStatusFromHTTPStatusCode(code int) (codes.Code, string) { + spanCode, valid := validateHTTPStatusCode(code) + if !valid { + return spanCode, fmt.Sprintf("Invalid HTTP status code %d", code) + } + return spanCode, "" +} + +// SpanStatusFromHTTPStatusCodeAndSpanKind generates a status code and a message +// as specified by the OpenTelemetry specification for a span. +// Exclude 4xx for SERVER to set the appropriate status. +func SpanStatusFromHTTPStatusCodeAndSpanKind(code int, spanKind trace.SpanKind) (codes.Code, string) { + spanCode, valid := validateHTTPStatusCode(code) + if !valid { + return spanCode, fmt.Sprintf("Invalid HTTP status code %d", code) + } + category := code / 100 + if spanKind == trace.SpanKindServer && category == 4 { + return codes.Unset, "" + } + return spanCode, "" +} + +// validateHTTPStatusCode validates the HTTP status code and returns +// corresponding span status code. If the `code` is not a valid HTTP status +// code, returns span status Error and false. +func validateHTTPStatusCode(code int) (codes.Code, bool) { + category := code / 100 + ranges, ok := validRangesPerCategory[category] + if !ok { + return codes.Error, false + } + ok = false + for _, crange := range ranges { + ok = crange.contains(code) + if ok { + break + } + } + if !ok { + return codes.Error, false + } + if category > 0 && category < 4 { + return codes.Unset, true + } + return codes.Error, true +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/doc.go new file mode 100644 index 00000000000..181fcc9c520 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/doc.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the conventions +// as of the v1.12.0 version of the OpenTelemetry specification. +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/exception.go new file mode 100644 index 00000000000..d6892709437 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/exception.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +const ( + // ExceptionEventName is the name of the Span event representing an exception. + ExceptionEventName = "exception" +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/http.go new file mode 100644 index 00000000000..4b4f3cbaf0b --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/http.go @@ -0,0 +1,114 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +import ( + "net/http" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/semconv/internal" + "go.opentelemetry.io/otel/trace" +) + +// HTTP scheme attributes. +var ( + HTTPSchemeHTTP = HTTPSchemeKey.String("http") + HTTPSchemeHTTPS = HTTPSchemeKey.String("https") +) + +var sc = &internal.SemanticConventions{ + EnduserIDKey: EnduserIDKey, + HTTPClientIPKey: HTTPClientIPKey, + HTTPFlavorKey: HTTPFlavorKey, + HTTPHostKey: HTTPHostKey, + HTTPMethodKey: HTTPMethodKey, + HTTPRequestContentLengthKey: HTTPRequestContentLengthKey, + HTTPRouteKey: HTTPRouteKey, + HTTPSchemeHTTP: HTTPSchemeHTTP, + HTTPSchemeHTTPS: HTTPSchemeHTTPS, + HTTPServerNameKey: HTTPServerNameKey, + HTTPStatusCodeKey: HTTPStatusCodeKey, + HTTPTargetKey: HTTPTargetKey, + HTTPURLKey: HTTPURLKey, + HTTPUserAgentKey: HTTPUserAgentKey, + NetHostIPKey: NetHostIPKey, + NetHostNameKey: NetHostNameKey, + NetHostPortKey: NetHostPortKey, + NetPeerIPKey: NetPeerIPKey, + NetPeerNameKey: NetPeerNameKey, + NetPeerPortKey: NetPeerPortKey, + NetTransportIP: NetTransportIP, + NetTransportOther: NetTransportOther, + NetTransportTCP: NetTransportTCP, + NetTransportUDP: NetTransportUDP, + NetTransportUnix: NetTransportUnix, +} + +// NetAttributesFromHTTPRequest generates attributes of the net +// namespace as specified by the OpenTelemetry specification for a +// span. The network parameter is a string that net.Dial function +// from standard library can understand. +func NetAttributesFromHTTPRequest(network string, request *http.Request) []attribute.KeyValue { + return sc.NetAttributesFromHTTPRequest(network, request) +} + +// EndUserAttributesFromHTTPRequest generates attributes of the +// enduser namespace as specified by the OpenTelemetry specification +// for a span. +func EndUserAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + return sc.EndUserAttributesFromHTTPRequest(request) +} + +// HTTPClientAttributesFromHTTPRequest generates attributes of the +// http namespace as specified by the OpenTelemetry specification for +// a span on the client side. +func HTTPClientAttributesFromHTTPRequest(request *http.Request) []attribute.KeyValue { + return sc.HTTPClientAttributesFromHTTPRequest(request) +} + +// HTTPServerMetricAttributesFromHTTPRequest generates low-cardinality attributes +// to be used with server-side HTTP metrics. +func HTTPServerMetricAttributesFromHTTPRequest(serverName string, request *http.Request) []attribute.KeyValue { + return sc.HTTPServerMetricAttributesFromHTTPRequest(serverName, request) +} + +// HTTPServerAttributesFromHTTPRequest generates attributes of the +// http namespace as specified by the OpenTelemetry specification for +// a span on the server side. Currently, only basic authentication is +// supported. +func HTTPServerAttributesFromHTTPRequest(serverName, route string, request *http.Request) []attribute.KeyValue { + return sc.HTTPServerAttributesFromHTTPRequest(serverName, route, request) +} + +// HTTPAttributesFromHTTPStatusCode generates attributes of the http +// namespace as specified by the OpenTelemetry specification for a +// span. +func HTTPAttributesFromHTTPStatusCode(code int) []attribute.KeyValue { + return sc.HTTPAttributesFromHTTPStatusCode(code) +} + +// SpanStatusFromHTTPStatusCode generates a status code and a message +// as specified by the OpenTelemetry specification for a span. +func SpanStatusFromHTTPStatusCode(code int) (codes.Code, string) { + return internal.SpanStatusFromHTTPStatusCode(code) +} + +// SpanStatusFromHTTPStatusCodeAndSpanKind generates a status code and a message +// as specified by the OpenTelemetry specification for a span. +// Exclude 4xx for SERVER to set the appropriate status. +func SpanStatusFromHTTPStatusCodeAndSpanKind(code int, spanKind trace.SpanKind) (codes.Code, string) { + return internal.SpanStatusFromHTTPStatusCodeAndSpanKind(code, spanKind) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/resource.go new file mode 100644 index 00000000000..b2155676f45 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/resource.go @@ -0,0 +1,1042 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +import "go.opentelemetry.io/otel/attribute" + +// The web browser in which the application represented by the resource is running. The `browser.*` attributes MUST be used only for resources that represent applications running in a web browser (regardless of whether running on a mobile or desktop device). +const ( + // Array of brand name and version separated by a space + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (navigator.userAgentData.brands). + BrowserBrandsKey = attribute.Key("browser.brands") + // The platform on which the browser is running + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (navigator.userAgentData.platform). If unavailable, the legacy + // `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD + // be left unset in order for the values to be consistent. + // The list of possible values is defined in the [W3C User-Agent Client Hints + // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). + // Note that some (but not all) of these values can overlap with values in the + // [os.type and os.name attributes](./os.md). However, for consistency, the values + // in the `browser.platform` attribute should capture the exact value that the + // user agent provides. + BrowserPlatformKey = attribute.Key("browser.platform") + // Full user-agent string provided by the browser + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 + // (KHTML, ' + // 'like Gecko) Chrome/95.0.4638.54 Safari/537.36' + // Note: The user-agent value SHOULD be provided only from browsers that do not + // have a mechanism to retrieve brands and platform individually from the User- + // Agent Client Hints API. To retrieve the value, the legacy `navigator.userAgent` + // API can be used. + BrowserUserAgentKey = attribute.Key("browser.user_agent") +) + +// A cloud environment (e.g. GCP, Azure, AWS) +const ( + // Name of the cloud provider. + // + // Type: Enum + // Required: No + // Stability: stable + CloudProviderKey = attribute.Key("cloud.provider") + // The cloud account ID the resource is assigned to. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '111111111111', 'opentelemetry' + CloudAccountIDKey = attribute.Key("cloud.account.id") + // The geographical region the resource is running. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for example + // [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc- + // detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global- + // infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en- + // us/global-infrastructure/geographies/), [Google Cloud + // regions](https://cloud.google.com/about/locations), or [Tencent Cloud + // regions](https://intl.cloud.tencent.com/document/product/213/6091). + CloudRegionKey = attribute.Key("cloud.region") + // Cloud regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the resource + // is running. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. + CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") + // The cloud platform in use. + // + // Type: Enum + // Required: No + // Stability: stable + // Note: The prefix of the service SHOULD match the one specified in + // `cloud.provider`. + CloudPlatformKey = attribute.Key("cloud.platform") +) + +var ( + // Alibaba Cloud + CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") + // Amazon Web Services + CloudProviderAWS = CloudProviderKey.String("aws") + // Microsoft Azure + CloudProviderAzure = CloudProviderKey.String("azure") + // Google Cloud Platform + CloudProviderGCP = CloudProviderKey.String("gcp") + // Tencent Cloud + CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") +) + +var ( + // Alibaba Cloud Elastic Compute Service + CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") + // Alibaba Cloud Function Compute + CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") + // AWS Elastic Compute Cloud + CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") + // AWS Elastic Container Service + CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") + // AWS Elastic Kubernetes Service + CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") + // AWS Lambda + CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") + // AWS Elastic Beanstalk + CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") + // AWS App Runner + CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") + // Azure Virtual Machines + CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") + // Azure Container Instances + CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") + // Azure Kubernetes Service + CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") + // Azure Functions + CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") + // Azure App Service + CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") + // Google Cloud Compute Engine (GCE) + CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") + // Google Cloud Run + CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") + // Google Cloud Kubernetes Engine (GKE) + CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") + // Google Cloud Functions (GCF) + CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") + // Google Cloud App Engine (GAE) + CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") + // Tencent Cloud Cloud Virtual Machine (CVM) + CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") + // Tencent Cloud Elastic Kubernetes Service (EKS) + CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") + // Tencent Cloud Serverless Cloud Function (SCF) + CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") +) + +// Resources used by AWS Elastic Container Service (ECS). +const ( + // The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws. + // amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") + // The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/develo + // perguide/clusters.html). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") + // The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/l + // aunch_types.html) for an ECS task. + // + // Type: Enum + // Required: No + // Stability: stable + AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") + // The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/lates + // t/developerguide/task_definitions.html). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:ecs:us- + // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") + // The task definition family this task definition is a member of. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-family' + AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") + // The revision for this task definition. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '8', '26' + AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") +) + +var ( + // ec2 + AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") + // fargate + AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") +) + +// Resources used by AWS Elastic Kubernetes Service (EKS). +const ( + // The ARN of an EKS cluster. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") +) + +// Resources specific to Amazon Web Services. +const ( + // The name(s) of the AWS log group(s) an application is writing to. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like multi-container + // applications, where a single application has sidecar containers, and each write + // to their own log group. + AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") + // The Amazon Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the [log group ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam- + // access-control-overview-cwl.html#CWL_ARN_Format). + AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") + // The name(s) of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") + // The ARN(s) of the AWS log stream(s). + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- + // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the [log stream ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam- + // access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain + // several log streams, so these ARNs necessarily identify both a log group and a + // log stream. + AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") +) + +// A container instance. +const ( + // Container name used by container runtime. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-autoconf' + ContainerNameKey = attribute.Key("container.name") + // Container ID. Usually a UUID, as for example used to [identify Docker + // containers](https://docs.docker.com/engine/reference/run/#container- + // identification). The UUID might be abbreviated. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'a3bf90e006b2' + ContainerIDKey = attribute.Key("container.id") + // The container runtime managing this container. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'docker', 'containerd', 'rkt' + ContainerRuntimeKey = attribute.Key("container.runtime") + // Name of the image the container was built on. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'gcr.io/opentelemetry/operator' + ContainerImageNameKey = attribute.Key("container.image.name") + // Container image tag. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '0.1' + ContainerImageTagKey = attribute.Key("container.image.tag") +) + +// The software deployment. +const ( + // Name of the [deployment + // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka + // deployment tier). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'staging', 'production' + DeploymentEnvironmentKey = attribute.Key("deployment.environment") +) + +// The device on which the process represented by this resource is running. +const ( + // A unique identifier representing the device + // + // Type: string + // Required: No + // Stability: stable + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values outlined + // below. This value is not an advertising identifier and MUST NOT be used as + // such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor id + // entifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-iden + // tifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the + // Firebase Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found + // [here](https://developer.android.com/training/articles/user-data-ids) on best + // practices and exact implementation details. Caution should be taken when + // storing personal data or anything which can identify a user. GDPR and data + // protection laws may apply, ensure you do your own due diligence. + DeviceIDKey = attribute.Key("device.id") + // The model identifier for the device + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine readable version of the + // model identifier rather than the market or consumer-friendly name of the + // device. + DeviceModelIdentifierKey = attribute.Key("device.model.identifier") + // The marketing name for the device model + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human readable version of the + // device model rather than a machine readable alternative. + DeviceModelNameKey = attribute.Key("device.model.name") + // The name of the device manufacturer + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via + // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). + // iOS apps SHOULD hardcode the value `Apple`. + DeviceManufacturerKey = attribute.Key("device.manufacturer") +) + +// A serverless instance. +const ( + // The name of the single function that this runtime instance executes. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // [`code.namespace`/`code.function`](../../trace/semantic_conventions/span- + // general.md#source-code-attributes) + // span attributes). + + // For some cloud providers, the above definition is ambiguous. The following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud providers/products: + + // * **Azure:** The full name `/`, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the `faas.id` attribute). + FaaSNameKey = attribute.Key("faas.name") + // The unique ID of the single function that this runtime instance executes. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:lambda:us-west-2:123456789012:function:my-function' + // Note: On some cloud providers, it may not be possible to determine the full ID + // at startup, + // so consider setting `faas.id` as a span attribute instead. + + // The exact value to use for `faas.id` depends on the cloud provider: + + // * **AWS Lambda:** The function + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and- + // namespaces.html). + // Take care not to use the "invoked ARN" directly but replace any + // [alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration- + // aliases.html) + // with the resolved function version, as the same runtime instance may be + // invokable with + // multiple different aliases. + // * **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full- + // resource-names) + // * **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en- + // us/rest/api/resources/resources/get-by-id) of the invoked function, + // *not* the function app, having the form + // `/subscriptions//resourceGroups//providers/Microsoft.We + // b/sites//functions/`. + // This means that a span attribute MUST be used, as an Azure function app can + // host multiple functions that would usually share + // a TracerProvider. + FaaSIDKey = attribute.Key("faas.id") + // The immutable version of the function being executed. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use: + + // * **AWS Lambda:** The [function + // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration- + // versions.html) + // (an integer represented as a decimal string). + // * **Google Cloud Run:** The + // [revision](https://cloud.google.com/run/docs/managing/revisions) + // (i.e., the function name plus the revision suffix). + // * **Google Cloud Functions:** The value of the + // [`K_REVISION` environment + // variable](https://cloud.google.com/functions/docs/env- + // var#runtime_environment_variables_set_automatically). + // * **Azure Functions:** Not applicable. Do not set this attribute. + FaaSVersionKey = attribute.Key("faas.version") + // The execution environment ID as a string, that will be potentially reused for + // other invocations to the same function/function version. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note: * **AWS Lambda:** Use the (full) log stream name. + FaaSInstanceKey = attribute.Key("faas.instance") + // The amount of memory available to the serverless function in MiB. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 128 + // Note: It's recommended to set this attribute since e.g. too little memory can + // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, + // the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this + // information. + FaaSMaxMemoryKey = attribute.Key("faas.max_memory") +) + +// A host is defined as a general computing instance. +const ( + // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud + // provider. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-test' + HostIDKey = attribute.Key("host.id") + // Name of the host. On Unix systems, it may contain what the hostname command + // returns, or the fully qualified hostname, or another name specified by the + // user. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-test' + HostNameKey = attribute.Key("host.name") + // Type of host. For Cloud, this must be the machine type. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'n1-standard-1' + HostTypeKey = attribute.Key("host.type") + // The CPU architecture the host system is running on. + // + // Type: Enum + // Required: No + // Stability: stable + HostArchKey = attribute.Key("host.arch") + // Name of the VM image or OS install the host was instantiated from. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + HostImageNameKey = attribute.Key("host.image.name") + // VM image ID. For Cloud, this value is from the provider. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'ami-07b06b442921831e5' + HostImageIDKey = attribute.Key("host.image.id") + // The version string of the VM image as defined in [Version + // Attributes](README.md#version-attributes). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '0.1' + HostImageVersionKey = attribute.Key("host.image.version") +) + +var ( + // AMD64 + HostArchAMD64 = HostArchKey.String("amd64") + // ARM32 + HostArchARM32 = HostArchKey.String("arm32") + // ARM64 + HostArchARM64 = HostArchKey.String("arm64") + // Itanium + HostArchIA64 = HostArchKey.String("ia64") + // 32-bit PowerPC + HostArchPPC32 = HostArchKey.String("ppc32") + // 64-bit PowerPC + HostArchPPC64 = HostArchKey.String("ppc64") + // IBM z/Architecture + HostArchS390x = HostArchKey.String("s390x") + // 32-bit x86 + HostArchX86 = HostArchKey.String("x86") +) + +// A Kubernetes Cluster. +const ( + // The name of the cluster. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-cluster' + K8SClusterNameKey = attribute.Key("k8s.cluster.name") +) + +// A Kubernetes Node object. +const ( + // The name of the Node. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'node-1' + K8SNodeNameKey = attribute.Key("k8s.node.name") + // The UID of the Node. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + K8SNodeUIDKey = attribute.Key("k8s.node.uid") +) + +// A Kubernetes Namespace. +const ( + // The name of the namespace that the pod is running in. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'default' + K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") +) + +// A Kubernetes Pod object. +const ( + // The UID of the Pod. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SPodUIDKey = attribute.Key("k8s.pod.uid") + // The name of the Pod. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry-pod-autoconf' + K8SPodNameKey = attribute.Key("k8s.pod.name") +) + +// A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). +const ( + // The name of the Container from Pod specification, must be unique within a Pod. + // Container runtime usually uses different globally unique name + // (`container.name`). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'redis' + K8SContainerNameKey = attribute.Key("k8s.container.name") + // Number of times the container was restarted. This attribute can be used to + // identify a particular container (running or stopped) within a container spec. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 0, 2 + K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") +) + +// A Kubernetes ReplicaSet object. +const ( + // The UID of the ReplicaSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") + // The name of the ReplicaSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") +) + +// A Kubernetes Deployment object. +const ( + // The UID of the Deployment. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") + // The name of the Deployment. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") +) + +// A Kubernetes StatefulSet object. +const ( + // The UID of the StatefulSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") + // The name of the StatefulSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") +) + +// A Kubernetes DaemonSet object. +const ( + // The UID of the DaemonSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") + // The name of the DaemonSet. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") +) + +// A Kubernetes Job object. +const ( + // The UID of the Job. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SJobUIDKey = attribute.Key("k8s.job.uid") + // The name of the Job. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SJobNameKey = attribute.Key("k8s.job.name") +) + +// A Kubernetes CronJob object. +const ( + // The UID of the CronJob. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") + // The name of the CronJob. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") +) + +// The operating system (OS) on which the process represented by this resource is running. +const ( + // The operating system type. + // + // Type: Enum + // Required: Always + // Stability: stable + OSTypeKey = attribute.Key("os.type") + // Human readable (not intended to be parsed) OS version information, like e.g. + // reported by `ver` or `lsb_release -a` commands. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' + OSDescriptionKey = attribute.Key("os.description") + // Human readable operating system name. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'iOS', 'Android', 'Ubuntu' + OSNameKey = attribute.Key("os.name") + // The version string of the operating system as defined in [Version + // Attributes](../../resource/semantic_conventions/README.md#version-attributes). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '14.2.1', '18.04.1' + OSVersionKey = attribute.Key("os.version") +) + +var ( + // Microsoft Windows + OSTypeWindows = OSTypeKey.String("windows") + // Linux + OSTypeLinux = OSTypeKey.String("linux") + // Apple Darwin + OSTypeDarwin = OSTypeKey.String("darwin") + // FreeBSD + OSTypeFreeBSD = OSTypeKey.String("freebsd") + // NetBSD + OSTypeNetBSD = OSTypeKey.String("netbsd") + // OpenBSD + OSTypeOpenBSD = OSTypeKey.String("openbsd") + // DragonFly BSD + OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") + // HP-UX (Hewlett Packard Unix) + OSTypeHPUX = OSTypeKey.String("hpux") + // AIX (Advanced Interactive eXecutive) + OSTypeAIX = OSTypeKey.String("aix") + // SunOS, Oracle Solaris + OSTypeSolaris = OSTypeKey.String("solaris") + // IBM z/OS + OSTypeZOS = OSTypeKey.String("z_os") +) + +// An operating system process. +const ( + // Process identifier (PID). + // + // Type: int + // Required: No + // Stability: stable + // Examples: 1234 + ProcessPIDKey = attribute.Key("process.pid") + // The name of the process executable. On Linux based systems, can be set to the + // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of + // `GetProcessImageFileNameW`. + // + // Type: string + // Required: See below + // Stability: stable + // Examples: 'otelcol' + ProcessExecutableNameKey = attribute.Key("process.executable.name") + // The full path to the process executable. On Linux based systems, can be set to + // the target of `proc/[pid]/exe`. On Windows, can be set to the result of + // `GetProcessImageFileNameW`. + // + // Type: string + // Required: See below + // Stability: stable + // Examples: '/usr/bin/cmd/otelcol' + ProcessExecutablePathKey = attribute.Key("process.executable.path") + // The command used to launch the process (i.e. the command name). On Linux based + // systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, + // can be set to the first parameter extracted from `GetCommandLineW`. + // + // Type: string + // Required: See below + // Stability: stable + // Examples: 'cmd/otelcol' + ProcessCommandKey = attribute.Key("process.command") + // The full command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of `GetCommandLineW`. Do not + // set this if you have to assemble it just for monitoring; use + // `process.command_args` instead. + // + // Type: string + // Required: See below + // Stability: stable + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + ProcessCommandLineKey = attribute.Key("process.command_line") + // All the command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited strings + // extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be + // the full argv vector passed to `main`. + // + // Type: string[] + // Required: See below + // Stability: stable + // Examples: 'cmd/otecol', '--config=config.yaml' + ProcessCommandArgsKey = attribute.Key("process.command_args") + // The username of the user that owns the process. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'root' + ProcessOwnerKey = attribute.Key("process.owner") +) + +// The single (language) runtime instance which is monitored. +const ( + // The name of the runtime of this process. For compiled native binaries, this + // SHOULD be the name of the compiler. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'OpenJDK Runtime Environment' + ProcessRuntimeNameKey = attribute.Key("process.runtime.name") + // The version of the runtime of this process, as returned by the runtime without + // modification. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '14.0.2' + ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") + // An additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") +) + +// A service instance. +const ( + // Logical name of the service. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled services. If + // the value was not specified, SDKs MUST fallback to `unknown_service:` + // concatenated with [`process.executable.name`](process.md#process), e.g. + // `unknown_service:bash`. If `process.executable.name` is not available, the + // value MUST be set to `unknown_service`. + ServiceNameKey = attribute.Key("service.name") + // A namespace for `service.name`. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group of + // services, for example the team name that owns a group of services. + // `service.name` is expected to be unique within the same namespace. If + // `service.namespace` is not specified in the Resource then `service.name` is + // expected to be unique for all services that have no explicit namespace defined + // (so the empty/unspecified namespace is simply one more valid namespace). Zero- + // length namespace string is assumed equal to unspecified namespace. + ServiceNamespaceKey = attribute.Key("service.namespace") + // The string ID of the service instance. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // `service.namespace,service.name` pair (in other words + // `service.namespace,service.name,service.instance.id` triplet MUST be globally + // unique). The ID helps to distinguish instances of the same service that exist + // at the same time (e.g. instances of a horizontally scaled service). It is + // preferable for the ID to be persistent and stay the same for the lifetime of + // the service instance, however it is acceptable that the ID is ephemeral and + // changes during important lifetime events for the service (e.g. service + // restarts). If the service has no inherent unique ID that can be used as the + // value of this attribute it is recommended to generate a random Version 1 or + // Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use + // Version 5, see RFC 4122 for more recommendations). + ServiceInstanceIDKey = attribute.Key("service.instance.id") + // The version string of the service API or implementation. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '2.0.0' + ServiceVersionKey = attribute.Key("service.version") +) + +// The telemetry SDK used to capture data recorded by the instrumentation libraries. +const ( + // The name of the telemetry SDK as defined above. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'opentelemetry' + TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") + // The language of the telemetry SDK. + // + // Type: Enum + // Required: No + // Stability: stable + TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") + // The version string of the telemetry SDK. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '1.2.3' + TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") + // The version string of the auto instrumentation agent, if used. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '1.2.3' + TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version") +) + +var ( + // cpp + TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") + // dotnet + TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") + // erlang + TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") + // go + TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") + // java + TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") + // nodejs + TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") + // php + TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") + // python + TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") + // ruby + TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") + // webjs + TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") + // swift + TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") +) + +// Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime. +const ( + // The name of the web engine. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'WildFly' + WebEngineNameKey = attribute.Key("webengine.name") + // The version of the web engine. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '21.0.0' + WebEngineVersionKey = attribute.Key("webengine.version") + // Additional description of the web engine (e.g. detailed version and edition + // information). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' + WebEngineDescriptionKey = attribute.Key("webengine.description") +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/schema.go new file mode 100644 index 00000000000..2f2a019e43d --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/schema.go @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.12.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/trace.go new file mode 100644 index 00000000000..047d8e95cce --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.12.0/trace.go @@ -0,0 +1,1704 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.12.0" + +import "go.opentelemetry.io/otel/attribute" + +// Span attributes used by AWS Lambda (in addition to general `faas` attributes). +const ( + // The full invoked ARN as provided on the `Context` passed to the function + // (`Lambda-Runtime-Invoked-Function-ARN` header on the `/runtime/invocation/next` + // applicable). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from `faas.id` if an alias is involved. + AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") +) + +// This document defines attributes for CloudEvents. CloudEvents is a specification on how to define event data in a standard way. These attributes can be attached to spans when performing operations with CloudEvents, regardless of the protocol being used. +const ( + // The [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec + // .md#id) uniquely identifies the event. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") + // The [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.m + // d#source-1) identifies the context in which an event happened. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my- + // service' + CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") + // The [version of the CloudEvents specification](https://github.com/cloudevents/s + // pec/blob/v1.0.2/cloudevents/spec.md#specversion) which the event uses. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: '1.0' + CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") + // The [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/sp + // ec.md#type) contains a value describing the type of event related to the + // originating occurrence. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'com.github.pull_request.opened', 'com.example.object.deleted.v2' + CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") + // The [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec. + // md#subject) of the event in the context of the event producer (identified by + // source). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'mynewfile.jpg' + CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") +) + +// This document defines semantic conventions for the OpenTracing Shim +const ( + // Parent-child Reference type + // + // Type: Enum + // Required: No + // Stability: stable + // Note: The causal relationship between a child Span and a parent Span. + OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") +) + +var ( + // The parent Span depends on the child Span in some capacity + OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") + // The parent Span does not depend in any way on the result of the child Span + OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") +) + +// This document defines the attributes used to perform database client calls. +const ( + // An identifier for the database management system (DBMS) product being used. See + // below for a list of well-known identifiers. + // + // Type: Enum + // Required: Always + // Stability: stable + DBSystemKey = attribute.Key("db.system") + // The connection string used to connect to the database. It is recommended to + // remove embedded credentials. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' + DBConnectionStringKey = attribute.Key("db.connection_string") + // Username for accessing the database. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'readonly_user', 'reporting_user' + DBUserKey = attribute.Key("db.user") + // The fully-qualified class name of the [Java Database Connectivity + // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver + // used to connect. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'org.postgresql.Driver', + // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' + DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") + // This attribute is used to report the name of the database being accessed. For + // commands that switch the database, this should be set to the target database + // (even if the command fails). + // + // Type: string + // Required: Required, if applicable. + // Stability: stable + // Examples: 'customers', 'main' + // Note: In some SQL databases, the database name to be used is called "schema + // name". In case there are multiple layers that could be considered for database + // name (e.g. Oracle instance name and schema name), the database name to be used + // is the more specific layer (e.g. Oracle schema name). + DBNameKey = attribute.Key("db.name") + // The database statement being executed. + // + // Type: string + // Required: Required if applicable and not explicitly disabled via + // instrumentation configuration. + // Stability: stable + // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' + // Note: The value may be sanitized to exclude sensitive information. + DBStatementKey = attribute.Key("db.statement") + // The name of the operation being executed, e.g. the [MongoDB command + // name](https://docs.mongodb.com/manual/reference/command/#database-operations) + // such as `findAndModify`, or the SQL keyword. + // + // Type: string + // Required: Required, if `db.statement` is not applicable. + // Stability: stable + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: When setting this to an SQL keyword, it is not recommended to attempt any + // client-side parsing of `db.statement` just to get this property, but it should + // be set if the operation name is provided by the library being instrumented. If + // the SQL statement has an ambiguous operation, or performs more than one + // operation, this value may be omitted. + DBOperationKey = attribute.Key("db.operation") +) + +var ( + // Some other SQL database. Fallback only. See notes + DBSystemOtherSQL = DBSystemKey.String("other_sql") + // Microsoft SQL Server + DBSystemMSSQL = DBSystemKey.String("mssql") + // MySQL + DBSystemMySQL = DBSystemKey.String("mysql") + // Oracle Database + DBSystemOracle = DBSystemKey.String("oracle") + // IBM DB2 + DBSystemDB2 = DBSystemKey.String("db2") + // PostgreSQL + DBSystemPostgreSQL = DBSystemKey.String("postgresql") + // Amazon Redshift + DBSystemRedshift = DBSystemKey.String("redshift") + // Apache Hive + DBSystemHive = DBSystemKey.String("hive") + // Cloudscape + DBSystemCloudscape = DBSystemKey.String("cloudscape") + // HyperSQL DataBase + DBSystemHSQLDB = DBSystemKey.String("hsqldb") + // Progress Database + DBSystemProgress = DBSystemKey.String("progress") + // SAP MaxDB + DBSystemMaxDB = DBSystemKey.String("maxdb") + // SAP HANA + DBSystemHanaDB = DBSystemKey.String("hanadb") + // Ingres + DBSystemIngres = DBSystemKey.String("ingres") + // FirstSQL + DBSystemFirstSQL = DBSystemKey.String("firstsql") + // EnterpriseDB + DBSystemEDB = DBSystemKey.String("edb") + // InterSystems Caché + DBSystemCache = DBSystemKey.String("cache") + // Adabas (Adaptable Database System) + DBSystemAdabas = DBSystemKey.String("adabas") + // Firebird + DBSystemFirebird = DBSystemKey.String("firebird") + // Apache Derby + DBSystemDerby = DBSystemKey.String("derby") + // FileMaker + DBSystemFilemaker = DBSystemKey.String("filemaker") + // Informix + DBSystemInformix = DBSystemKey.String("informix") + // InstantDB + DBSystemInstantDB = DBSystemKey.String("instantdb") + // InterBase + DBSystemInterbase = DBSystemKey.String("interbase") + // MariaDB + DBSystemMariaDB = DBSystemKey.String("mariadb") + // Netezza + DBSystemNetezza = DBSystemKey.String("netezza") + // Pervasive PSQL + DBSystemPervasive = DBSystemKey.String("pervasive") + // PointBase + DBSystemPointbase = DBSystemKey.String("pointbase") + // SQLite + DBSystemSqlite = DBSystemKey.String("sqlite") + // Sybase + DBSystemSybase = DBSystemKey.String("sybase") + // Teradata + DBSystemTeradata = DBSystemKey.String("teradata") + // Vertica + DBSystemVertica = DBSystemKey.String("vertica") + // H2 + DBSystemH2 = DBSystemKey.String("h2") + // ColdFusion IMQ + DBSystemColdfusion = DBSystemKey.String("coldfusion") + // Apache Cassandra + DBSystemCassandra = DBSystemKey.String("cassandra") + // Apache HBase + DBSystemHBase = DBSystemKey.String("hbase") + // MongoDB + DBSystemMongoDB = DBSystemKey.String("mongodb") + // Redis + DBSystemRedis = DBSystemKey.String("redis") + // Couchbase + DBSystemCouchbase = DBSystemKey.String("couchbase") + // CouchDB + DBSystemCouchDB = DBSystemKey.String("couchdb") + // Microsoft Azure Cosmos DB + DBSystemCosmosDB = DBSystemKey.String("cosmosdb") + // Amazon DynamoDB + DBSystemDynamoDB = DBSystemKey.String("dynamodb") + // Neo4j + DBSystemNeo4j = DBSystemKey.String("neo4j") + // Apache Geode + DBSystemGeode = DBSystemKey.String("geode") + // Elasticsearch + DBSystemElasticsearch = DBSystemKey.String("elasticsearch") + // Memcached + DBSystemMemcached = DBSystemKey.String("memcached") + // CockroachDB + DBSystemCockroachdb = DBSystemKey.String("cockroachdb") +) + +// Connection-level attributes for Microsoft SQL Server +const ( + // The Microsoft SQL Server [instance name](https://docs.microsoft.com/en- + // us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) + // connecting to. This name is used to determine the port of a named instance. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'MSSQLSERVER' + // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer + // required (but still recommended if non-standard). + DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") +) + +// Call-level attributes for Cassandra +const ( + // The fetch size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 5000 + DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") + // The consistency level of the query. Based on consistency values from + // [CQL](https://docs.datastax.com/en/cassandra- + // oss/3.0/cassandra/dml/dmlConfigConsistency.html). + // + // Type: Enum + // Required: No + // Stability: stable + DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") + // The name of the primary table that the operation is acting upon, including the + // keyspace name (if applicable). + // + // Type: string + // Required: Recommended if available. + // Stability: stable + // Examples: 'mytable' + // Note: This mirrors the db.sql.table attribute but references cassandra rather + // than sql. It is not recommended to attempt any client-side parsing of + // `db.statement` just to get this property, but it should be set if it is + // provided by the library being instrumented. If the operation is acting upon an + // anonymous table, or more than one table, this value MUST NOT be set. + DBCassandraTableKey = attribute.Key("db.cassandra.table") + // Whether or not the query is idempotent. + // + // Type: boolean + // Required: No + // Stability: stable + DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") + // The number of times a query was speculatively executed. Not set or `0` if the + // query was not executed speculatively. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 0, 2 + DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") + // The ID of the coordinating node for a query. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") + // The data center of the coordinating node for a query. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'us-west-2' + DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") +) + +var ( + // all + DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") + // each_quorum + DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") + // quorum + DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") + // local_quorum + DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") + // one + DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") + // two + DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") + // three + DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") + // local_one + DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") + // any + DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") + // serial + DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") + // local_serial + DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") +) + +// Call-level attributes for Redis +const ( + // The index of the database being accessed as used in the [`SELECT` + // command](https://redis.io/commands/select), provided as an integer. To be used + // instead of the generic `db.name` attribute. + // + // Type: int + // Required: Required, if other than the default database (`0`). + // Stability: stable + // Examples: 0, 1, 15 + DBRedisDBIndexKey = attribute.Key("db.redis.database_index") +) + +// Call-level attributes for MongoDB +const ( + // The collection being accessed within the database stated in `db.name`. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'customers', 'products' + DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") +) + +// Call-level attributes for SQL databases +const ( + // The name of the primary table that the operation is acting upon, including the + // database name (if applicable). + // + // Type: string + // Required: Recommended if available. + // Stability: stable + // Examples: 'public.users', 'customers' + // Note: It is not recommended to attempt any client-side parsing of + // `db.statement` just to get this property, but it should be set if it is + // provided by the library being instrumented. If the operation is acting upon an + // anonymous table, or more than one table, this value MUST NOT be set. + DBSQLTableKey = attribute.Key("db.sql.table") +) + +// This document defines the attributes used to report a single exception associated with a span. +const ( + // The type of the exception (its fully-qualified class name, if applicable). The + // dynamic type of the exception should be preferred over the static type in + // languages that support it. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'java.net.ConnectException', 'OSError' + ExceptionTypeKey = attribute.Key("exception.type") + // The exception message. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" + ExceptionMessageKey = attribute.Key("exception.message") + // A stacktrace as a string in the natural representation for the language + // runtime. The representation is to be determined and documented by each language + // SIG. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + ExceptionStacktraceKey = attribute.Key("exception.stacktrace") + // SHOULD be set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // Required: No + // Stability: stable + // Note: An exception is considered to have escaped (or left) the scope of a span, + // if that span is ended while the exception is still logically "in flight". + // This may be actually "in flight" in some languages (e.g. if the exception + // is passed to a Context manager's `__exit__` method in Python) but will + // usually be caught at the point of recording the exception in most languages. + + // It is usually not possible to determine at the point where an exception is + // thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending the span, + // as done in the [example above](#recording-an-exception). + + // It follows that an exception may still escape the scope of the span + // even if the `exception.escaped` attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + ExceptionEscapedKey = attribute.Key("exception.escaped") +) + +// This semantic convention describes an instance of a function that runs without provisioning or managing of servers (also known as serverless functions or Function as a Service (FaaS)) with spans. +const ( + // Type of the trigger which caused this function execution. + // + // Type: Enum + // Required: No + // Stability: stable + // Note: For the server/consumer span on the incoming side, + // `faas.trigger` MUST be set. + + // Clients invoking FaaS instances usually cannot set `faas.trigger`, + // since they would typically need to look in the payload to determine + // the event type. If clients set it, it should be the same as the + // trigger that corresponding incoming would have (i.e., this has + // nothing to do with the underlying transport used to make the API + // call to invoke the lambda, which is often HTTP). + FaaSTriggerKey = attribute.Key("faas.trigger") + // The execution ID of the current function execution. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + FaaSExecutionKey = attribute.Key("faas.execution") +) + +var ( + // A response to some data source operation such as a database or filesystem read/write + FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") + // To provide an answer to an inbound HTTP request + FaaSTriggerHTTP = FaaSTriggerKey.String("http") + // A function is set to be executed when messages are sent to a messaging system + FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") + // A function is scheduled to be executed regularly + FaaSTriggerTimer = FaaSTriggerKey.String("timer") + // If none of the others apply + FaaSTriggerOther = FaaSTriggerKey.String("other") +) + +// Semantic Convention for FaaS triggered as a response to some data source operation such as a database or filesystem read/write. +const ( + // The name of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos + // DB to the database name. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'myBucketName', 'myDBName' + FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") + // Describes the type of the operation that was performed on the data. + // + // Type: Enum + // Required: Always + // Stability: stable + FaaSDocumentOperationKey = attribute.Key("faas.document.operation") + // A string containing the time when the data was accessed in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed + // in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // Required: Always + // Stability: stable + // Examples: '2020-01-23T13:47:06Z' + FaaSDocumentTimeKey = attribute.Key("faas.document.time") + // The document name/table subjected to the operation. For example, in Cloud + // Storage or S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'myFile.txt', 'myTableName' + FaaSDocumentNameKey = attribute.Key("faas.document.name") +) + +var ( + // When a new object is created + FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") + // When an object is modified + FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") + // When an object is deleted + FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") +) + +// Semantic Convention for FaaS scheduled to be executed regularly. +const ( + // A string containing the function invocation time in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed + // in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // Required: Always + // Stability: stable + // Examples: '2020-01-23T13:47:06Z' + FaaSTimeKey = attribute.Key("faas.time") + // A string containing the schedule period as [Cron Expression](https://docs.oracl + // e.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '0/5 * * * ? *' + FaaSCronKey = attribute.Key("faas.cron") +) + +// Contains additional attributes for incoming FaaS spans. +const ( + // A boolean that is true if the serverless function is executed for the first + // time (aka cold-start). + // + // Type: boolean + // Required: No + // Stability: stable + FaaSColdstartKey = attribute.Key("faas.coldstart") +) + +// Contains additional attributes for outgoing FaaS spans. +const ( + // The name of the invoked function. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'my-function' + // Note: SHOULD be equal to the `faas.name` resource attribute of the invoked + // function. + FaaSInvokedNameKey = attribute.Key("faas.invoked_name") + // The cloud provider of the invoked function. + // + // Type: Enum + // Required: Always + // Stability: stable + // Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked + // function. + FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") + // The cloud region of the invoked function. + // + // Type: string + // Required: For some cloud providers, like AWS or GCP, the region in which a + // function is hosted is essential to uniquely identify the function and also part + // of its endpoint. Since it's part of the endpoint being called, the region is + // always known to clients. In these cases, `faas.invoked_region` MUST be set + // accordingly. If the region is unknown to the client or not required for + // identifying the invoked function, setting `faas.invoked_region` is optional. + // Stability: stable + // Examples: 'eu-central-1' + // Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked + // function. + FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") +) + +var ( + // Alibaba Cloud + FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") + // Amazon Web Services + FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") + // Microsoft Azure + FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") + // Google Cloud Platform + FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") + // Tencent Cloud + FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") +) + +// These attributes may be used for any network related operation. +const ( + // Transport protocol used. See note below. + // + // Type: Enum + // Required: No + // Stability: stable + NetTransportKey = attribute.Key("net.transport") + // Remote address of the peer (dotted decimal for IPv4 or + // [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) + // + // Type: string + // Required: No + // Stability: stable + // Examples: '127.0.0.1' + NetPeerIPKey = attribute.Key("net.peer.ip") + // Remote port number. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 80, 8080, 443 + NetPeerPortKey = attribute.Key("net.peer.port") + // Remote hostname or similar, see note below. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'example.com' + // Note: `net.peer.name` SHOULD NOT be set if capturing it would require an extra + // DNS lookup. + NetPeerNameKey = attribute.Key("net.peer.name") + // Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '192.168.0.1' + NetHostIPKey = attribute.Key("net.host.ip") + // Like `net.peer.port` but for the host port. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 35555 + NetHostPortKey = attribute.Key("net.host.port") + // Local hostname or similar, see note below. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'localhost' + NetHostNameKey = attribute.Key("net.host.name") + // The internet connection type currently being used by the host. + // + // Type: Enum + // Required: No + // Stability: stable + // Examples: 'wifi' + NetHostConnectionTypeKey = attribute.Key("net.host.connection.type") + // This describes more details regarding the connection.type. It may be the type + // of cell technology connection, but it could be used for describing details + // about a wifi connection. + // + // Type: Enum + // Required: No + // Stability: stable + // Examples: 'LTE' + NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype") + // The name of the mobile carrier. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'sprint' + NetHostCarrierNameKey = attribute.Key("net.host.carrier.name") + // The mobile carrier country code. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '310' + NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc") + // The mobile carrier network code. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '001' + NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc") + // The ISO 3166-1 alpha-2 2-character country code associated with the mobile + // carrier network. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'DE' + NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc") +) + +var ( + // ip_tcp + NetTransportTCP = NetTransportKey.String("ip_tcp") + // ip_udp + NetTransportUDP = NetTransportKey.String("ip_udp") + // Another IP-based protocol + NetTransportIP = NetTransportKey.String("ip") + // Unix Domain socket. See below + NetTransportUnix = NetTransportKey.String("unix") + // Named or anonymous pipe. See note below + NetTransportPipe = NetTransportKey.String("pipe") + // In-process communication + NetTransportInProc = NetTransportKey.String("inproc") + // Something else (non IP-based) + NetTransportOther = NetTransportKey.String("other") +) + +var ( + // wifi + NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi") + // wired + NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired") + // cell + NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell") + // unavailable + NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable") + // unknown + NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown") +) + +var ( + // GPRS + NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs") + // EDGE + NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge") + // UMTS + NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts") + // CDMA + NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma") + // EVDO Rel. 0 + NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0") + // EVDO Rev. A + NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a") + // CDMA2000 1XRTT + NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt") + // HSDPA + NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa") + // HSUPA + NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa") + // HSPA + NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa") + // IDEN + NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden") + // EVDO Rev. B + NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b") + // LTE + NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte") + // EHRPD + NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd") + // HSPAP + NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap") + // GSM + NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm") + // TD-SCDMA + NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma") + // IWLAN + NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan") + // 5G NR (New Radio) + NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr") + // 5G NRNSA (New Radio Non-Standalone) + NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa") + // LTE CA + NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca") +) + +// Operations that access some remote service. +const ( + // The [`service.name`](../../resource/semantic_conventions/README.md#service) of + // the remote service. SHOULD be equal to the actual `service.name` resource + // attribute of the remote service if any. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'AuthTokenCache' + PeerServiceKey = attribute.Key("peer.service") +) + +// These attributes may be used for any operation with an authenticated and/or authorized enduser. +const ( + // Username or client_id extracted from the access token or + // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the + // inbound request from outside the system. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'username' + EnduserIDKey = attribute.Key("enduser.id") + // Actual/assumed role the client is making the request under extracted from token + // or application security context. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'admin' + EnduserRoleKey = attribute.Key("enduser.role") + // Scopes or granted authorities the client currently possesses extracted from + // token or application security context. The value would come from the scope + // associated with an [OAuth 2.0 Access + // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value + // in a [SAML 2.0 Assertion](http://docs.oasis- + // open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'read:message, write:files' + EnduserScopeKey = attribute.Key("enduser.scope") +) + +// These attributes may be used for any operation to store information about a thread that started a span. +const ( + // Current "managed" thread ID (as opposed to OS thread ID). + // + // Type: int + // Required: No + // Stability: stable + // Examples: 42 + ThreadIDKey = attribute.Key("thread.id") + // Current thread name. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'main' + ThreadNameKey = attribute.Key("thread.name") +) + +// These attributes allow to report this unit of code and therefore to provide more context about the span. +const ( + // The method or function name, or equivalent (usually rightmost part of the code + // unit's name). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'serveRequest' + CodeFunctionKey = attribute.Key("code.function") + // The "namespace" within which `code.function` is defined. Usually the qualified + // class or module name, such that `code.namespace` + some separator + + // `code.function` form a unique identifier for the code unit. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'com.example.MyHTTPService' + CodeNamespaceKey = attribute.Key("code.namespace") + // The source code file name that identifies the code unit as uniquely as possible + // (preferably an absolute file path). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + CodeFilepathKey = attribute.Key("code.filepath") + // The line number in `code.filepath` best representing the operation. It SHOULD + // point within the code unit named in `code.function`. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 42 + CodeLineNumberKey = attribute.Key("code.lineno") +) + +// This document defines semantic conventions for HTTP client and server Spans. +const ( + // HTTP request method. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'GET', 'POST', 'HEAD' + HTTPMethodKey = attribute.Key("http.method") + // Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. + // Usually the fragment is not transmitted over HTTP, but if it is known, it + // should be included nevertheless. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' + // Note: `http.url` MUST NOT contain credentials passed via URL in form of + // `https://username:password@www.example.com/`. In such case the attribute's + // value should be `https://www.example.com/`. + HTTPURLKey = attribute.Key("http.url") + // The full request target as passed in a HTTP request line or equivalent. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '/path/12314/?q=ddds#123' + HTTPTargetKey = attribute.Key("http.target") + // The value of the [HTTP host + // header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header + // should also be reported, see note. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'www.example.org' + // Note: When the header is present but empty the attribute SHOULD be set to the + // empty string. Note that this is a valid situation that is expected in certain + // cases, according the aforementioned [section of RFC + // 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not + // set the attribute MUST NOT be set. + HTTPHostKey = attribute.Key("http.host") + // The URI scheme identifying the used protocol. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'http', 'https' + HTTPSchemeKey = attribute.Key("http.scheme") + // [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). + // + // Type: int + // Required: If and only if one was received/sent. + // Stability: stable + // Examples: 200 + HTTPStatusCodeKey = attribute.Key("http.status_code") + // Kind of HTTP protocol used. + // + // Type: Enum + // Required: No + // Stability: stable + // Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` + // except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. + HTTPFlavorKey = attribute.Key("http.flavor") + // Value of the [HTTP User- + // Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the + // client. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' + HTTPUserAgentKey = attribute.Key("http.user_agent") + // The size of the request payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as the + // [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For + // requests using transport encoding, this should be the compressed size. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 3495 + HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") + // The size of the uncompressed request payload body after transport decoding. Not + // set if transport encoding not used. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 5493 + HTTPRequestContentLengthUncompressedKey = attribute.Key("http.request_content_length_uncompressed") + // The size of the response payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as the + // [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For + // requests using transport encoding, this should be the compressed size. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 3495 + HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") + // The size of the uncompressed response payload body after transport decoding. + // Not set if transport encoding not used. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 5493 + HTTPResponseContentLengthUncompressedKey = attribute.Key("http.response_content_length_uncompressed") + // The ordinal number of request re-sending attempt. + // + // Type: int + // Required: If and only if a request was retried. + // Stability: stable + // Examples: 3 + HTTPRetryCountKey = attribute.Key("http.retry_count") +) + +var ( + // HTTP/1.0 + HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0") + // HTTP/1.1 + HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1") + // HTTP/2 + HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0") + // HTTP/3 + HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0") + // SPDY protocol + HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY") + // QUIC protocol + HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC") +) + +// Semantic Convention for HTTP Server +const ( + // The primary server name of the matched virtual host. This should be obtained + // via configuration. If no such configuration can be obtained, this attribute + // MUST NOT be set ( `net.host.name` should be used instead). + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'example.com' + // Note: `http.url` is usually not readily available on the server side but would + // have to be assembled in a cumbersome and sometimes lossy process from other + // information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus + // preferred to supply the raw data that is available. + HTTPServerNameKey = attribute.Key("http.server_name") + // The matched route (path template). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '/users/:userID?' + HTTPRouteKey = attribute.Key("http.route") + // The IP address of the original client behind all proxies, if known (e.g. from + // [X-Forwarded-For](https://developer.mozilla.org/en- + // US/docs/Web/HTTP/Headers/X-Forwarded-For)). + // + // Type: string + // Required: No + // Stability: stable + // Examples: '83.164.160.102' + // Note: This is not necessarily the same as `net.peer.ip`, which would + // identify the network-level peer, which may be a proxy. + + // This attribute should be set when a source of information different + // from the one used for `net.peer.ip`, is available even if that other + // source just confirms the same value as `net.peer.ip`. + // Rationale: For `net.peer.ip`, one typically does not know if it + // comes from a proxy, reverse proxy, or the actual client. Setting + // `http.client_ip` when it's the same as `net.peer.ip` means that + // one is at least somewhat confident that the address is not that of + // the closest proxy. + HTTPClientIPKey = attribute.Key("http.client_ip") +) + +// Attributes that exist for multiple DynamoDB request types. +const ( + // The keys in the `RequestItems` object field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'Users', 'Cats' + AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") + // The JSON-serialized value of each item in the `ConsumedCapacity` response + // field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { + // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, + // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, + // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": + // "string", "WriteCapacityUnits": number }' + AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") + // The JSON-serialized value of the `ItemCollectionMetrics` response field. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, + // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : + // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": + // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' + AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") + // The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. + // + // Type: double + // Required: No + // Stability: stable + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") + // The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. + // + // Type: double + // Required: No + // Stability: stable + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") + // The value of the `ConsistentRead` request parameter. + // + // Type: boolean + // Required: No + // Stability: stable + AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") + // The value of the `ProjectionExpression` request parameter. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, + // ProductReviews' + AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") + // The value of the `Limit` request parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 10 + AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") + // The value of the `AttributesToGet` request parameter. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'lives', 'id' + AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") + // The value of the `IndexName` request parameter. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'name_to_group' + AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") + // The value of the `Select` request parameter. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") +) + +// DynamoDB.CreateTable +const ( + // The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request + // field + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": + // number, "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") + // The JSON-serialized value of each item of the `LocalSecondaryIndexes` request + // field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": + // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", + // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], + // "ProjectionType": "string" } }' + AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") +) + +// DynamoDB.ListTables +const ( + // The value of the `ExclusiveStartTableName` request parameter. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Users', 'CatsTable' + AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") + // The the number of items in the `TableNames` response parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 20 + AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") +) + +// DynamoDB.Query +const ( + // The value of the `ScanIndexForward` request parameter. + // + // Type: boolean + // Required: No + // Stability: stable + AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") +) + +// DynamoDB.Scan +const ( + // The value of the `Segment` request parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 10 + AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") + // The value of the `TotalSegments` request parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 100 + AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") + // The value of the `Count` response parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 10 + AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") + // The value of the `ScannedCount` response parameter. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 50 + AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") +) + +// DynamoDB.UpdateTable +const ( + // The JSON-serialized value of each item in the `AttributeDefinitions` request + // field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") + // The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` + // request field. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": + // number } }' + AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") +) + +// This document defines the attributes used in messaging systems. +const ( + // A string identifying the messaging system. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' + MessagingSystemKey = attribute.Key("messaging.system") + // The message destination name. This might be equal to the span name but is + // required nevertheless. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'MyQueue', 'MyTopic' + MessagingDestinationKey = attribute.Key("messaging.destination") + // The kind of message destination + // + // Type: Enum + // Required: Required only if the message destination is either a `queue` or + // `topic`. + // Stability: stable + MessagingDestinationKindKey = attribute.Key("messaging.destination_kind") + // A boolean that is true if the message destination is temporary. + // + // Type: boolean + // Required: If missing, it is assumed to be false. + // Stability: stable + MessagingTempDestinationKey = attribute.Key("messaging.temp_destination") + // The name of the transport protocol. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'AMQP', 'MQTT' + MessagingProtocolKey = attribute.Key("messaging.protocol") + // The version of the transport protocol. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '0.9.1' + MessagingProtocolVersionKey = attribute.Key("messaging.protocol_version") + // Connection string. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'tibjmsnaming://localhost:7222', + // 'https://queue.amazonaws.com/80398EXAMPLE/MyQueue' + MessagingURLKey = attribute.Key("messaging.url") + // A value used by the messaging system as an identifier for the message, + // represented as a string. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '452a7c7c7c7048c2f887f61572b18fc2' + MessagingMessageIDKey = attribute.Key("messaging.message_id") + // The [conversation ID](#conversations) identifying the conversation to which the + // message belongs, represented as a string. Sometimes called "Correlation ID". + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'MyConversationID' + MessagingConversationIDKey = attribute.Key("messaging.conversation_id") + // The (uncompressed) size of the message payload in bytes. Also use this + // attribute if it is unknown whether the compressed or uncompressed payload size + // is reported. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 2738 + MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message_payload_size_bytes") + // The compressed size of the message payload in bytes. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 2048 + MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message_payload_compressed_size_bytes") +) + +var ( + // A message sent to a queue + MessagingDestinationKindQueue = MessagingDestinationKindKey.String("queue") + // A message sent to a topic + MessagingDestinationKindTopic = MessagingDestinationKindKey.String("topic") +) + +// Semantic convention for a consumer of messages received from a messaging system +const ( + // A string identifying the kind of message consumption as defined in the + // [Operation names](#operation-names) section above. If the operation is "send", + // this attribute MUST NOT be set, since the operation can be inferred from the + // span kind in that case. + // + // Type: Enum + // Required: No + // Stability: stable + MessagingOperationKey = attribute.Key("messaging.operation") + // The identifier for the consumer receiving a message. For Kafka, set it to + // `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are + // present, or only `messaging.kafka.consumer_group`. For brokers, such as + // RabbitMQ and Artemis, set it to the `client_id` of the client consuming the + // message. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'mygroup - client-6' + MessagingConsumerIDKey = attribute.Key("messaging.consumer_id") +) + +var ( + // receive + MessagingOperationReceive = MessagingOperationKey.String("receive") + // process + MessagingOperationProcess = MessagingOperationKey.String("process") +) + +// Attributes for RabbitMQ +const ( + // RabbitMQ message routing key. + // + // Type: string + // Required: Unless it is empty. + // Stability: stable + // Examples: 'myKey' + MessagingRabbitmqRoutingKeyKey = attribute.Key("messaging.rabbitmq.routing_key") +) + +// Attributes for Apache Kafka +const ( + // Message keys in Kafka are used for grouping alike messages to ensure they're + // processed on the same partition. They differ from `messaging.message_id` in + // that they're not unique. If the key is `null`, the attribute MUST NOT be set. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'myKey' + // Note: If the key type is not string, it's string representation has to be + // supplied for the attribute. If the key has no unambiguous, canonical string + // form, don't include its value. + MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message_key") + // Name of the Kafka Consumer Group that is handling the message. Only applies to + // consumers, not producers. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'my-group' + MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer_group") + // Client ID for the Consumer or Producer that is handling the message. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'client-5' + MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id") + // Partition the message is sent to. + // + // Type: int + // Required: No + // Stability: stable + // Examples: 2 + MessagingKafkaPartitionKey = attribute.Key("messaging.kafka.partition") + // A boolean that is true if the message is a tombstone. + // + // Type: boolean + // Required: If missing, it is assumed to be false. + // Stability: stable + MessagingKafkaTombstoneKey = attribute.Key("messaging.kafka.tombstone") +) + +// Attributes for Apache RocketMQ +const ( + // Namespace of RocketMQ resources, resources in different namespaces are + // individual. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'myNamespace' + MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") + // Name of the RocketMQ producer/consumer group that is handling the message. The + // client type is identified by the SpanKind. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'myConsumerGroup' + MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") + // The unique identifier for each client. + // + // Type: string + // Required: Always + // Stability: stable + // Examples: 'myhost@8742@s8083jm' + MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id") + // Type of message. + // + // Type: Enum + // Required: No + // Stability: stable + MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message_type") + // The secondary classifier of message besides topic. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'tagA' + MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message_tag") + // Key(s) of message, another way to mark message besides message id. + // + // Type: string[] + // Required: No + // Stability: stable + // Examples: 'keyA', 'keyB' + MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message_keys") + // Model of message consumption. This only applies to consumer spans. + // + // Type: Enum + // Required: No + // Stability: stable + MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") +) + +var ( + // Normal message + MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") + // FIFO message + MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") + // Delay message + MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") + // Transaction message + MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") +) + +var ( + // Clustering consumption model + MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") + // Broadcasting consumption model + MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") +) + +// This document defines semantic conventions for remote procedure calls. +const ( + // A string identifying the remoting system. See below for a list of well-known + // identifiers. + // + // Type: Enum + // Required: Always + // Stability: stable + RPCSystemKey = attribute.Key("rpc.system") + // The full (logical) name of the service being called, including its package + // name, if applicable. + // + // Type: string + // Required: No, but recommended + // Stability: stable + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing class. + // The `code.namespace` attribute may be used to store the latter (despite the + // attribute name, it may include a class name; e.g., class with method actually + // executing the call on the server side, RPC client stub class on the client + // side). + RPCServiceKey = attribute.Key("rpc.service") + // The name of the (logical) method being called, must be equal to the $method + // part in the span name. + // + // Type: string + // Required: No, but recommended + // Stability: stable + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The `code.function` attribute may be used to store the latter + // (e.g., method actually executing the call on the server side, RPC client stub + // method on the client side). + RPCMethodKey = attribute.Key("rpc.method") +) + +var ( + // gRPC + RPCSystemGRPC = RPCSystemKey.String("grpc") + // Java RMI + RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") + // .NET WCF + RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") + // Apache Dubbo + RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") +) + +// Tech-specific attributes for gRPC. +const ( + // The [numeric status + // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC + // request. + // + // Type: Enum + // Required: Always + // Stability: stable + RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") +) + +var ( + // OK + RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) + // CANCELLED + RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) + // UNKNOWN + RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) + // INVALID_ARGUMENT + RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) + // DEADLINE_EXCEEDED + RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) + // NOT_FOUND + RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) + // ALREADY_EXISTS + RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) + // PERMISSION_DENIED + RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) + // RESOURCE_EXHAUSTED + RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) + // FAILED_PRECONDITION + RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) + // ABORTED + RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) + // OUT_OF_RANGE + RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) + // UNIMPLEMENTED + RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) + // INTERNAL + RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) + // UNAVAILABLE + RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) + // DATA_LOSS + RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) + // UNAUTHENTICATED + RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) +) + +// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). +const ( + // Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC + // 1.0 does not specify this, the value can be omitted. + // + // Type: string + // Required: If missing, it is assumed to be "1.0". + // Stability: stable + // Examples: '2.0', '1.0' + RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") + // `id` property of request or response. Since protocol allows id to be int, + // string, `null` or missing (for notifications), value is expected to be cast to + // string for simplicity. Use empty string in case of `null` value. Omit entirely + // if this is a notification. + // + // Type: string + // Required: No + // Stability: stable + // Examples: '10', 'request-7', '' + RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") + // `error.code` property of response if it is an error response. + // + // Type: int + // Required: If missing, response is assumed to be successful. + // Stability: stable + // Examples: -32700, 100 + RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") + // `error.message` property of response if it is an error response. + // + // Type: string + // Required: No + // Stability: stable + // Examples: 'Parse error', 'User already exists' + RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") +) + +// RPC received/sent message. +const ( + // Whether this is a received or sent message. + // + // Type: Enum + // Required: No + // Stability: stable + MessageTypeKey = attribute.Key("message.type") + // MUST be calculated as two different counters starting from `1` one for sent + // messages and one for received message. + // + // Type: int + // Required: No + // Stability: stable + // Note: This way we guarantee that the values will be consistent between + // different implementations. + MessageIDKey = attribute.Key("message.id") + // Compressed size of the message in bytes. + // + // Type: int + // Required: No + // Stability: stable + MessageCompressedSizeKey = attribute.Key("message.compressed_size") + // Uncompressed size of the message in bytes. + // + // Type: int + // Required: No + // Stability: stable + MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") +) + +var ( + // sent + MessageTypeSent = MessageTypeKey.String("SENT") + // received + MessageTypeReceived = MessageTypeKey.String("RECEIVED") +) diff --git a/vendor/modules.txt b/vendor/modules.txt index 182078d1825..0aa814a26eb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -170,8 +170,8 @@ github.com/IBM-Cloud/bluemix-go/models github.com/IBM-Cloud/bluemix-go/rest github.com/IBM-Cloud/bluemix-go/session github.com/IBM-Cloud/bluemix-go/trace -# github.com/IBM-Cloud/power-go-client v1.2.0 -## explicit; go 1.17 +# github.com/IBM-Cloud/power-go-client v1.5.3 +## explicit; go 1.20 github.com/IBM-Cloud/power-go-client/clients/instance github.com/IBM-Cloud/power-go-client/errors github.com/IBM-Cloud/power-go-client/helpers @@ -180,6 +180,7 @@ github.com/IBM-Cloud/power-go-client/power/client github.com/IBM-Cloud/power-go-client/power/client/authentication github.com/IBM-Cloud/power-go-client/power/client/bluemix_service_instances github.com/IBM-Cloud/power-go-client/power/client/catalog +github.com/IBM-Cloud/power-go-client/power/client/datacenters github.com/IBM-Cloud/power-go-client/power/client/hardware_platforms github.com/IBM-Cloud/power-go-client/power/client/iaas_service_broker github.com/IBM-Cloud/power-go-client/power/client/internal_power_v_s_instances @@ -196,12 +197,14 @@ github.com/IBM-Cloud/power-go-client/power/client/p_cloud_jobs github.com/IBM-Cloud/power-go-client/power/client/p_cloud_networks github.com/IBM-Cloud/power-go-client/power/client/p_cloud_p_vm_instances github.com/IBM-Cloud/power-go-client/power/client/p_cloud_placement_groups +github.com/IBM-Cloud/power-go-client/power/client/p_cloud_pod_capacity github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_a_p github.com/IBM-Cloud/power-go-client/power/client/p_cloud_s_p_p_placement_groups github.com/IBM-Cloud/power-go-client/power/client/p_cloud_service_d_h_c_p github.com/IBM-Cloud/power-go-client/power/client/p_cloud_shared_processor_pools github.com/IBM-Cloud/power-go-client/power/client/p_cloud_snapshots github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_capacity +github.com/IBM-Cloud/power-go-client/power/client/p_cloud_storage_tiers github.com/IBM-Cloud/power-go-client/power/client/p_cloud_system_pools github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tasks github.com/IBM-Cloud/power-go-client/power/client/p_cloud_tenants @@ -215,9 +218,10 @@ github.com/IBM-Cloud/power-go-client/power/client/service_bindings 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 github.com/IBM-Cloud/power-go-client/power/models -# github.com/IBM/go-sdk-core/v5 v5.13.2 -## explicit; go 1.18 +# github.com/IBM/go-sdk-core/v5 v5.14.1 +## explicit; go 1.19 github.com/IBM/go-sdk-core/v5/core # github.com/IBM/networking-go-sdk v0.42.2 ## explicit; go 1.19 @@ -459,7 +463,7 @@ github.com/go-logr/stdr # github.com/go-logr/zapr v1.2.4 ## explicit; go 1.16 github.com/go-logr/zapr -# github.com/go-openapi/analysis v0.21.2 +# github.com/go-openapi/analysis v0.21.4 ## explicit; go 1.13 github.com/go-openapi/analysis github.com/go-openapi/analysis/internal/debug @@ -468,7 +472,7 @@ github.com/go-openapi/analysis/internal/flatten/operations github.com/go-openapi/analysis/internal/flatten/replace github.com/go-openapi/analysis/internal/flatten/schutils github.com/go-openapi/analysis/internal/flatten/sortref -# github.com/go-openapi/errors v0.20.3 +# github.com/go-openapi/errors v0.20.4 ## explicit; go 1.14 github.com/go-openapi/errors # github.com/go-openapi/jsonpointer v0.19.6 @@ -478,11 +482,11 @@ github.com/go-openapi/jsonpointer ## explicit; go 1.13 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal -# github.com/go-openapi/loads v0.21.1 +# github.com/go-openapi/loads v0.21.2 ## explicit; go 1.13 github.com/go-openapi/loads -# github.com/go-openapi/runtime v0.23.0 -## explicit; go 1.15 +# github.com/go-openapi/runtime v0.26.0 +## explicit; go 1.18 github.com/go-openapi/runtime github.com/go-openapi/runtime/client github.com/go-openapi/runtime/logger @@ -492,16 +496,16 @@ github.com/go-openapi/runtime/middleware/header github.com/go-openapi/runtime/middleware/untyped github.com/go-openapi/runtime/security github.com/go-openapi/runtime/yamlpc -# github.com/go-openapi/spec v0.20.7 +# github.com/go-openapi/spec v0.20.8 ## explicit; go 1.13 github.com/go-openapi/spec -# github.com/go-openapi/strfmt v0.21.5 -## explicit; go 1.13 +# github.com/go-openapi/strfmt v0.21.7 +## explicit; go 1.19 github.com/go-openapi/strfmt -# github.com/go-openapi/swag v0.22.3 +# github.com/go-openapi/swag v0.22.4 ## explicit; go 1.18 github.com/go-openapi/swag -# github.com/go-openapi/validate v0.22.0 +# github.com/go-openapi/validate v0.22.1 ## explicit; go 1.14 github.com/go-openapi/validate # github.com/go-playground/locales v0.14.1 @@ -9046,6 +9050,8 @@ go.opentelemetry.io/otel/internal/attribute go.opentelemetry.io/otel/internal/baggage go.opentelemetry.io/otel/internal/global go.opentelemetry.io/otel/propagation +go.opentelemetry.io/otel/semconv/internal +go.opentelemetry.io/otel/semconv/v1.12.0 # go.opentelemetry.io/otel/metric v1.19.0 ## explicit; go 1.20 go.opentelemetry.io/otel/metric From 196d7d25b6ef61497908efad591b01264b8f950c Mon Sep 17 00:00:00 2001 From: Hiro Miyamoto Date: Wed, 8 Nov 2023 14:09:32 -0500 Subject: [PATCH 2/2] Add ValidatePERAvailability & support logic/test Signed-off-by: Hiro Miyamoto --- .../installconfig/platformprovisioncheck.go | 5 ++ pkg/asset/installconfig/powervs/client.go | 19 +++++ .../powervs/mock/powervsclient_generated.go | 15 ++++ pkg/asset/installconfig/powervs/validation.go | 18 ++++ .../installconfig/powervs/validation_test.go | 85 +++++++++++++++++++ 5 files changed, 142 insertions(+) diff --git a/pkg/asset/installconfig/platformprovisioncheck.go b/pkg/asset/installconfig/platformprovisioncheck.go index acb7808cb67..e348f83cb5a 100644 --- a/pkg/asset/installconfig/platformprovisioncheck.go +++ b/pkg/asset/installconfig/platformprovisioncheck.go @@ -160,6 +160,11 @@ func (a *PlatformProvisionCheck) Generate(dependencies asset.Parents) error { return err } + err = powervsconfig.ValidatePERAvailability(client, ic.Config) + if err != nil { + return err + } + err = powervsconfig.ValidatePreExistingDNS(client, ic.Config, ic.PowerVS) if err != nil { return err diff --git a/pkg/asset/installconfig/powervs/client.go b/pkg/asset/installconfig/powervs/client.go index 6009113ba33..39620f1e9d0 100644 --- a/pkg/asset/installconfig/powervs/client.go +++ b/pkg/asset/installconfig/powervs/client.go @@ -8,6 +8,7 @@ import ( "time" "github.com/IBM-Cloud/bluemix-go/crn" + "github.com/IBM-Cloud/power-go-client/power/client/datacenters" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/networking-go-sdk/dnsrecordsv1" "github.com/IBM/networking-go-sdk/dnssvcsv1" @@ -40,6 +41,7 @@ type API interface { ListResourceGroups(ctx context.Context) (*resourcemanagerv2.ResourceGroupList, error) ListServiceInstances(ctx context.Context) ([]string, error) ServiceInstanceIDToCRN(ctx context.Context, id string) (string, error) + GetDatacenterCapabilities(ctx context.Context, region string) (map[string]bool, error) } // Client makes calls to the PowerVS API. @@ -746,3 +748,20 @@ func (c *Client) ServiceInstanceIDToCRN(ctx context.Context, id string) (string, return "", nil } + +// GetDatacenterCapabilities retrieves the capabilities of the specified datacenter. +func (c *Client) GetDatacenterCapabilities(ctx context.Context, region string) (map[string]bool, error) { + var err error + if c.BXCli.PISession == nil { + err = c.BXCli.NewPISession() + if err != nil { + return nil, fmt.Errorf("failed to initialize PISession in GetDatacenterCapabilities: %w", err) + } + } + params := datacenters.NewV1DatacentersGetParamsWithContext(ctx).WithDatacenterRegion(region) + getOk, err := c.BXCli.PISession.Power.Datacenters.V1DatacentersGet(params) + if err != nil { + return nil, fmt.Errorf("failed to get datacenter capabilities: %w", err) + } + return getOk.Payload.Capabilities, nil +} diff --git a/pkg/asset/installconfig/powervs/mock/powervsclient_generated.go b/pkg/asset/installconfig/powervs/mock/powervsclient_generated.go index c5aafdaa0ad..58291cbbbbf 100644 --- a/pkg/asset/installconfig/powervs/mock/powervsclient_generated.go +++ b/pkg/asset/installconfig/powervs/mock/powervsclient_generated.go @@ -128,6 +128,21 @@ func (mr *MockAPIMockRecorder) GetDNSZones(ctx, publish interface{}) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDNSZones", reflect.TypeOf((*MockAPI)(nil).GetDNSZones), ctx, publish) } +// GetDatacenterCapabilities mocks base method. +func (m *MockAPI) GetDatacenterCapabilities(ctx context.Context, region string) (map[string]bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDatacenterCapabilities", ctx, region) + ret0, _ := ret[0].(map[string]bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetDatacenterCapabilities indicates an expected call of GetDatacenterCapabilities. +func (mr *MockAPIMockRecorder) GetDatacenterCapabilities(ctx, region interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDatacenterCapabilities", reflect.TypeOf((*MockAPI)(nil).GetDatacenterCapabilities), ctx, region) +} + // GetPublicGatewayByVPC mocks base method. func (m *MockAPI) GetPublicGatewayByVPC(ctx context.Context, vpcName string) (*vpcv1.PublicGateway, error) { m.ctrl.T.Helper() diff --git a/pkg/asset/installconfig/powervs/validation.go b/pkg/asset/installconfig/powervs/validation.go index f01c3c479cd..949409299b7 100644 --- a/pkg/asset/installconfig/powervs/validation.go +++ b/pkg/asset/installconfig/powervs/validation.go @@ -48,6 +48,24 @@ func validateMachinePool(fldPath *field.Path, machinePool *types.MachinePool) fi return allErrs } +// ValidatePERAvailability ensures the target datacenter has PER enabled. +func ValidatePERAvailability(client API, ic *types.InstallConfig) error { + capabilities, err := client.GetDatacenterCapabilities(context.TODO(), ic.PowerVS.Zone) + if err != nil { + return err + } + const per = "power-edge-router" + perAvail, ok := capabilities[per] + if !ok { + return fmt.Errorf("%s capability unknown at: %s", per, ic.PowerVS.Zone) + } + if !perAvail { + return fmt.Errorf("%s is not available at: %s", per, ic.PowerVS.Zone) + } + + return nil +} + // ValidatePreExistingDNS ensures no pre-existing DNS record exists in the CIS // DNS zone or IBM DNS zone for cluster's Kubernetes API. func ValidatePreExistingDNS(client API, ic *types.InstallConfig, metadata MetadataAPI) error { diff --git a/pkg/asset/installconfig/powervs/validation_test.go b/pkg/asset/installconfig/powervs/validation_test.go index 9997ace0b3f..5285835b806 100644 --- a/pkg/asset/installconfig/powervs/validation_test.go +++ b/pkg/asset/installconfig/powervs/validation_test.go @@ -113,6 +113,23 @@ var ( ID: &validRG, }, } + regionWithPER = "dal10" + regionWithoutPER = "foo99" + regionPERUnknown = "bah77" + mapWithPERFalse = map[string]bool{ + "disaster-recover-site": true, + "power-edge-router": false, + "vpn-connections": true, + } + mapWithPERTrue = map[string]bool{ + "disaster-recover-site": true, + "power-edge-router": true, + "vpn-connections": true, + } + mapPERUnknown = map[string]bool{ + "disaster-recover-site": true, + "power-vpn-connections": false, + } ) func validInstallConfig() *types.InstallConfig { @@ -471,6 +488,74 @@ func createComputes(numComputes int32, compute *machinev1.PowerVSMachineProvider return computes } +func TestValidatePERAvailability(t *testing.T) { + cases := []struct { + name string + edits editFunctions + errorMsg string + }{ + { + name: "Region without PER", + edits: editFunctions{ + func(ic *types.InstallConfig) { + ic.Platform.PowerVS.Zone = regionWithoutPER + }, + }, + errorMsg: fmt.Sprintf("power-edge-router is not available at: %s", regionWithoutPER), + }, + { + name: "Region with PER", + edits: editFunctions{ + func(ic *types.InstallConfig) { + ic.Platform.PowerVS.Zone = regionWithPER + }, + }, + errorMsg: "", + }, + { + name: "Region with no PER availability info", + edits: editFunctions{ + func(ic *types.InstallConfig) { + ic.Platform.PowerVS.Zone = regionPERUnknown + }, + }, + errorMsg: fmt.Sprintf("power-edge-router capability unknown at: %s", regionPERUnknown), + }, + } + setMockEnvVars() + + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + + powervsClient := mock.NewMockAPI(mockCtrl) + + // Mocks: PER-absent region results in false + powervsClient.EXPECT().GetDatacenterCapabilities(gomock.Any(), regionWithoutPER).Return(mapWithPERFalse, nil) + + // Mocks: PER-enabled region results in true + powervsClient.EXPECT().GetDatacenterCapabilities(gomock.Any(), regionWithPER).Return(mapWithPERTrue, nil) + + // Mocks: PER-unknown region results in false + powervsClient.EXPECT().GetDatacenterCapabilities(gomock.Any(), regionPERUnknown).Return(mapPERUnknown, nil) + + // Run tests + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + editedInstallConfig := validInstallConfig() + for _, edit := range tc.edits { + edit(editedInstallConfig) + } + + aggregatedErrors := powervs.ValidatePERAvailability(powervsClient, editedInstallConfig) + if tc.errorMsg != "" { + assert.Regexp(t, tc.errorMsg, aggregatedErrors) + } else { + assert.NoError(t, aggregatedErrors) + } + }) + } +} + func setMockEnvVars() { os.Setenv("POWERVS_AUTH_FILEPATH", "./tmp/powervs/config.json") os.Setenv("IBMID", "foo")