From 29029a039d85866d7151d20e2ddb921d83ccc5f0 Mon Sep 17 00:00:00 2001 From: rmorales Date: Fri, 16 Dec 2022 00:40:18 -0600 Subject: [PATCH] Update swagger client and models Update swagger client and models --- .../authentication/authentication_client.go | 20 +- ...service_broker_auth_callback_parameters.go | 8 +- .../service_broker_auth_callback_responses.go | 99 ++++- ...broker_auth_device_code_post_parameters.go | 8 +- ..._broker_auth_device_code_post_responses.go | 99 ++++- ...roker_auth_device_token_post_parameters.go | 8 +- ...broker_auth_device_token_post_responses.go | 168 +++++++- ...rvice_broker_auth_info_token_parameters.go | 8 +- ...ervice_broker_auth_info_token_responses.go | 66 +++- ...ervice_broker_auth_info_user_parameters.go | 8 +- ...service_broker_auth_info_user_responses.go | 66 +++- .../service_broker_auth_login_parameters.go | 8 +- .../service_broker_auth_login_responses.go | 99 ++++- .../service_broker_auth_logout_parameters.go | 8 +- .../service_broker_auth_logout_responses.go | 66 +++- ...r_auth_registration_callback_parameters.go | 8 +- ...er_auth_registration_callback_responses.go | 99 ++++- ...ice_broker_auth_registration_parameters.go | 8 +- ...vice_broker_auth_registration_responses.go | 99 ++++- ...rvice_broker_auth_token_post_parameters.go | 8 +- ...ervice_broker_auth_token_post_responses.go | 165 +++++++- ...bluemix_service_instance_get_parameters.go | 8 +- .../bluemix_service_instance_get_responses.go | 66 +++- ...bluemix_service_instance_put_parameters.go | 8 +- .../bluemix_service_instance_put_responses.go | 66 +++- .../bluemix_service_instances_client.go | 4 +- power/client/catalog/catalog_client.go | 2 +- .../client/catalog/catalog_get_parameters.go | 8 +- power/client/catalog/catalog_get_responses.go | 33 +- .../hardware_platforms_client.go | 2 +- ...broker_hardwareplatforms_get_parameters.go | 8 +- ..._broker_hardwareplatforms_get_responses.go | 66 +++- .../iaas_service_broker_client.go | 8 +- .../service_broker_health_head_parameters.go | 8 +- .../service_broker_health_head_responses.go | 66 +++- .../service_broker_health_parameters.go | 8 +- .../service_broker_health_responses.go | 66 +++- .../service_broker_test_timeout_parameters.go | 8 +- .../service_broker_test_timeout_responses.go | 33 +- .../service_broker_version_parameters.go | 8 +- .../service_broker_version_responses.go | 66 +++- .../internal_powervs_instances_client.go | 2 +- ...nal_v1_powervs_instances_get_parameters.go | 8 +- ...rnal_v1_powervs_instances_get_responses.go | 99 ++++- .../internal_powervs_locations_client.go | 2 +- ...locations_transitgateway_get_parameters.go | 8 +- ..._locations_transitgateway_get_responses.go | 99 ++++- .../internal_storage_regions_client.go | 10 +- ...ge_regions_storage_pools_get_parameters.go | 8 +- ...age_regions_storage_pools_get_responses.go | 201 +++++++++- ...regions_storage_pools_getall_parameters.go | 8 +- ..._regions_storage_pools_getall_responses.go | 201 +++++++++- ...ge_regions_storage_pools_put_parameters.go | 8 +- ...age_regions_storage_pools_put_responses.go | 234 ++++++++++- ...orage_regions_thresholds_get_parameters.go | 8 +- ...torage_regions_thresholds_get_responses.go | 201 +++++++++- ...orage_regions_thresholds_put_parameters.go | 8 +- ...torage_regions_thresholds_put_responses.go | 231 ++++++++++- .../internal_transit_gateway_client.go | 2 +- ...ternal_v1_transitgateway_get_parameters.go | 8 +- ...nternal_v1_transitgateway_get_responses.go | 66 +++- .../client/open_stacks/open_stacks_client.go | 10 +- ...ervice_broker_openstacks_get_parameters.go | 8 +- ...service_broker_openstacks_get_responses.go | 132 ++++++- ..._broker_openstacks_hosts_get_parameters.go | 8 +- ...e_broker_openstacks_hosts_get_responses.go | 132 ++++++- ...ker_openstacks_openstack_get_parameters.go | 8 +- ...oker_openstacks_openstack_get_responses.go | 132 ++++++- ...rvice_broker_openstacks_post_parameters.go | 8 +- ...ervice_broker_openstacks_post_responses.go | 198 +++++++++- ...roker_openstacks_servers_get_parameters.go | 8 +- ...broker_openstacks_servers_get_responses.go | 132 ++++++- .../p_cloud_cloud_connections_client.go | 16 +- ...loud_cloudconnections_delete_parameters.go | 8 +- ...cloud_cloudconnections_delete_responses.go | 264 ++++++++++++- .../pcloud_cloudconnections_get_parameters.go | 8 +- .../pcloud_cloudconnections_get_responses.go | 198 +++++++++- ...loud_cloudconnections_getall_parameters.go | 8 +- ...cloud_cloudconnections_getall_responses.go | 234 ++++++++++- ...dconnections_networks_delete_parameters.go | 8 +- ...udconnections_networks_delete_responses.go | 264 ++++++++++++- ...loudconnections_networks_put_parameters.go | 8 +- ...cloudconnections_networks_put_responses.go | 264 ++++++++++++- ...pcloud_cloudconnections_post_parameters.go | 8 +- .../pcloud_cloudconnections_post_responses.go | 363 +++++++++++++++++- .../pcloud_cloudconnections_put_parameters.go | 8 +- .../pcloud_cloudconnections_put_responses.go | 330 +++++++++++++++- ..._virtualprivateclouds_getall_parameters.go | 8 +- ...s_virtualprivateclouds_getall_responses.go | 267 ++++++++++++- .../p_cloud_disaster_recovery_client.go | 4 +- ...cations_disasterrecovery_get_parameters.go | 8 +- ...ocations_disasterrecovery_get_responses.go | 201 +++++++++- ...ions_disasterrecovery_getall_parameters.go | 8 +- ...tions_disasterrecovery_getall_responses.go | 201 +++++++++- .../p_cloud_events/p_cloud_events_client.go | 4 +- .../pcloud_events_get_parameters.go | 8 +- .../pcloud_events_get_responses.go | 187 ++++++++- .../pcloud_events_getquery_parameters.go | 8 +- .../pcloud_events_getquery_responses.go | 201 +++++++++- .../p_cloud_images/p_cloud_images_client.go | 26 +- ...cloudinstances_images_delete_parameters.go | 8 +- ..._cloudinstances_images_delete_responses.go | 303 ++++++++++++++- ...instances_images_export_post_parameters.go | 8 +- ...dinstances_images_export_post_responses.go | 267 ++++++++++++- ...ud_cloudinstances_images_get_parameters.go | 8 +- ...oud_cloudinstances_images_get_responses.go | 234 ++++++++++- ...cloudinstances_images_getall_parameters.go | 8 +- ..._cloudinstances_images_getall_responses.go | 234 ++++++++++- ...d_cloudinstances_images_post_parameters.go | 8 +- ...ud_cloudinstances_images_post_responses.go | 300 ++++++++++++++- ...oudinstances_stockimages_get_parameters.go | 8 +- ...loudinstances_stockimages_get_responses.go | 165 +++++++- ...instances_stockimages_getall_parameters.go | 8 +- ...dinstances_stockimages_getall_responses.go | 165 +++++++- .../pcloud_images_get_parameters.go | 8 +- .../pcloud_images_get_responses.go | 234 ++++++++++- .../pcloud_images_getall_parameters.go | 8 +- .../pcloud_images_getall_responses.go | 234 ++++++++++- ...cloudinstances_cosimages_get_parameters.go | 8 +- ..._cloudinstances_cosimages_get_responses.go | 201 +++++++++- ...loudinstances_cosimages_post_parameters.go | 8 +- ...cloudinstances_cosimages_post_responses.go | 231 ++++++++++- .../pcloud_v2_images_export_get_parameters.go | 8 +- .../pcloud_v2_images_export_get_responses.go | 132 ++++++- ...pcloud_v2_images_export_post_parameters.go | 8 +- .../pcloud_v2_images_export_post_responses.go | 231 ++++++++++- .../p_cloud_instances_client.go | 6 +- ...pcloud_cloudinstances_delete_parameters.go | 8 +- .../pcloud_cloudinstances_delete_responses.go | 165 +++++++- .../pcloud_cloudinstances_get_parameters.go | 8 +- .../pcloud_cloudinstances_get_responses.go | 165 +++++++- .../pcloud_cloudinstances_put_parameters.go | 8 +- .../pcloud_cloudinstances_put_responses.go | 165 +++++++- .../p_cloud_jobs/p_cloud_jobs_client.go | 6 +- ...d_cloudinstances_jobs_delete_parameters.go | 8 +- ...ud_cloudinstances_jobs_delete_responses.go | 267 ++++++++++++- ...loud_cloudinstances_jobs_get_parameters.go | 8 +- ...cloud_cloudinstances_jobs_get_responses.go | 234 ++++++++++- ...d_cloudinstances_jobs_getall_parameters.go | 8 +- ...ud_cloudinstances_jobs_getall_responses.go | 234 ++++++++++- .../p_cloud_networks_client.go | 20 +- .../pcloud_networks_delete_parameters.go | 8 +- .../pcloud_networks_delete_responses.go | 267 ++++++++++++- .../pcloud_networks_get_parameters.go | 8 +- .../pcloud_networks_get_responses.go | 234 ++++++++++- .../pcloud_networks_getall_parameters.go | 8 +- .../pcloud_networks_getall_responses.go | 201 +++++++++- ...pcloud_networks_ports_delete_parameters.go | 8 +- .../pcloud_networks_ports_delete_responses.go | 303 ++++++++++++++- .../pcloud_networks_ports_get_parameters.go | 8 +- .../pcloud_networks_ports_get_responses.go | 201 +++++++++- ...pcloud_networks_ports_getall_parameters.go | 8 +- .../pcloud_networks_ports_getall_responses.go | 270 ++++++++++++- .../pcloud_networks_ports_post_parameters.go | 8 +- .../pcloud_networks_ports_post_responses.go | 336 +++++++++++++++- .../pcloud_networks_ports_put_parameters.go | 8 +- .../pcloud_networks_ports_put_responses.go | 303 ++++++++++++++- .../pcloud_networks_post_parameters.go | 8 +- .../pcloud_networks_post_responses.go | 300 ++++++++++++++- .../pcloud_networks_put_parameters.go | 8 +- .../pcloud_networks_put_responses.go | 267 ++++++++++++- .../p_cloudp_vm_instances_client.go | 42 +- ...oud_pvminstances_action_post_parameters.go | 8 +- ...loud_pvminstances_action_post_responses.go | 267 ++++++++++++- ...ud_pvminstances_capture_post_parameters.go | 8 +- ...oud_pvminstances_capture_post_responses.go | 336 +++++++++++++++- ...loud_pvminstances_clone_post_parameters.go | 8 +- ...cloud_pvminstances_clone_post_responses.go | 198 +++++++++- ...oud_pvminstances_console_get_parameters.go | 8 +- ...loud_pvminstances_console_get_responses.go | 270 ++++++++++++- ...ud_pvminstances_console_post_parameters.go | 8 +- ...oud_pvminstances_console_post_responses.go | 270 ++++++++++++- ...oud_pvminstances_console_put_parameters.go | 8 +- ...loud_pvminstances_console_put_responses.go | 270 ++++++++++++- .../pcloud_pvminstances_delete_parameters.go | 8 +- .../pcloud_pvminstances_delete_responses.go | 267 ++++++++++++- .../pcloud_pvminstances_get_parameters.go | 8 +- .../pcloud_pvminstances_get_responses.go | 234 ++++++++++- .../pcloud_pvminstances_getall_parameters.go | 8 +- .../pcloud_pvminstances_getall_responses.go | 201 +++++++++- ...pvminstances_networks_delete_parameters.go | 8 +- ..._pvminstances_networks_delete_responses.go | 198 +++++++++- ...ud_pvminstances_networks_get_parameters.go | 8 +- ...oud_pvminstances_networks_get_responses.go | 132 ++++++- ...pvminstances_networks_getall_parameters.go | 8 +- ..._pvminstances_networks_getall_responses.go | 132 ++++++- ...d_pvminstances_networks_post_parameters.go | 8 +- ...ud_pvminstances_networks_post_responses.go | 198 +++++++++- ...pvminstances_operations_post_parameters.go | 8 +- ..._pvminstances_operations_post_responses.go | 198 +++++++++- .../pcloud_pvminstances_post_parameters.go | 8 +- .../pcloud_pvminstances_post_responses.go | 363 +++++++++++++++++- .../pcloud_pvminstances_put_parameters.go | 8 +- .../pcloud_pvminstances_put_responses.go | 303 ++++++++++++++- ...vminstances_snapshots_getall_parameters.go | 8 +- ...pvminstances_snapshots_getall_responses.go | 187 ++++++++- ..._pvminstances_snapshots_post_parameters.go | 8 +- ...d_pvminstances_snapshots_post_responses.go | 336 +++++++++++++++- ...ances_snapshots_restore_post_parameters.go | 8 +- ...tances_snapshots_restore_post_responses.go | 303 ++++++++++++++- ..._v2_pvminstances_capture_get_parameters.go | 8 +- ...d_v2_pvminstances_capture_get_responses.go | 132 ++++++- ...v2_pvminstances_capture_post_parameters.go | 8 +- ..._v2_pvminstances_capture_post_responses.go | 231 ++++++++++- .../p_cloud_placement_groups_client.go | 12 +- ...cloud_placementgroups_delete_parameters.go | 8 +- ...pcloud_placementgroups_delete_responses.go | 201 +++++++++- .../pcloud_placementgroups_get_parameters.go | 8 +- .../pcloud_placementgroups_get_responses.go | 201 +++++++++- ...cloud_placementgroups_getall_parameters.go | 8 +- ...pcloud_placementgroups_getall_responses.go | 201 +++++++++- ...acementgroups_members_delete_parameters.go | 8 +- ...lacementgroups_members_delete_responses.go | 267 ++++++++++++- ...placementgroups_members_post_parameters.go | 8 +- ..._placementgroups_members_post_responses.go | 267 ++++++++++++- .../pcloud_placementgroups_post_parameters.go | 8 +- .../pcloud_placementgroups_post_responses.go | 234 ++++++++++- .../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 | 165 +++++++- .../pcloud_sap_getall_parameters.go | 8 +- .../pcloud_sap_getall_responses.go | 132 ++++++- .../pcloud_sap_post_parameters.go | 8 +- .../pcloud_sap_post_responses.go | 264 ++++++++++++- .../p_cloudspp_placement_groups_client.go | 12 +- ...ud_sppplacementgroups_delete_parameters.go | 8 +- ...oud_sppplacementgroups_delete_responses.go | 231 ++++++++++- ...cloud_sppplacementgroups_get_parameters.go | 8 +- ...pcloud_sppplacementgroups_get_responses.go | 165 +++++++- ...ud_sppplacementgroups_getall_parameters.go | 8 +- ...oud_sppplacementgroups_getall_responses.go | 198 +++++++++- ...acementgroups_members_delete_parameters.go | 8 +- ...lacementgroups_members_delete_responses.go | 231 ++++++++++- ...placementgroups_members_post_parameters.go | 8 +- ...pplacementgroups_members_post_responses.go | 264 ++++++++++++- ...loud_sppplacementgroups_post_parameters.go | 8 +- ...cloud_sppplacementgroups_post_responses.go | 231 ++++++++++- .../p_cloud_servicedhcp_client.go | 8 +- .../pcloud_dhcp_delete_parameters.go | 8 +- .../pcloud_dhcp_delete_responses.go | 165 +++++++- .../pcloud_dhcp_get_parameters.go | 8 +- .../pcloud_dhcp_get_responses.go | 165 +++++++- .../pcloud_dhcp_getall_parameters.go | 8 +- .../pcloud_dhcp_getall_responses.go | 99 ++++- .../pcloud_dhcp_post_parameters.go | 8 +- .../pcloud_dhcp_post_responses.go | 132 ++++++- .../p_cloud_shared_processor_pools_client.go | 10 +- ..._sharedprocessorpools_delete_parameters.go | 8 +- ...d_sharedprocessorpools_delete_responses.go | 231 ++++++++++- ...oud_sharedprocessorpools_get_parameters.go | 8 +- ...loud_sharedprocessorpools_get_responses.go | 165 +++++++- ..._sharedprocessorpools_getall_parameters.go | 8 +- ...d_sharedprocessorpools_getall_responses.go | 198 +++++++++- ...ud_sharedprocessorpools_post_parameters.go | 8 +- ...oud_sharedprocessorpools_post_responses.go | 231 ++++++++++- ...oud_sharedprocessorpools_put_parameters.go | 8 +- ...loud_sharedprocessorpools_put_responses.go | 198 +++++++++- .../p_cloud_snapshots_client.go | 8 +- ...udinstances_snapshots_delete_parameters.go | 8 +- ...oudinstances_snapshots_delete_responses.go | 267 ++++++++++++- ...cloudinstances_snapshots_get_parameters.go | 8 +- ..._cloudinstances_snapshots_get_responses.go | 234 ++++++++++- ...udinstances_snapshots_getall_parameters.go | 8 +- ...oudinstances_snapshots_getall_responses.go | 201 +++++++++- ...cloudinstances_snapshots_put_parameters.go | 8 +- ..._cloudinstances_snapshots_put_responses.go | 234 ++++++++++- .../p_cloud_storage_capacity_client.go | 8 +- ...ud_storagecapacity_pools_get_parameters.go | 8 +- ...oud_storagecapacity_pools_get_responses.go | 201 +++++++++- ...storagecapacity_pools_getall_parameters.go | 8 +- ..._storagecapacity_pools_getall_responses.go | 168 +++++++- ...ud_storagecapacity_types_get_parameters.go | 8 +- ...oud_storagecapacity_types_get_responses.go | 201 +++++++++- ...storagecapacity_types_getall_parameters.go | 8 +- ..._storagecapacity_types_getall_responses.go | 168 +++++++- .../p_cloud_system_pools_client.go | 2 +- .../pcloud_systempools_get_parameters.go | 8 +- .../pcloud_systempools_get_responses.go | 168 +++++++- .../p_cloud_tasks/p_cloud_tasks_client.go | 4 +- .../pcloud_tasks_delete_parameters.go | 8 +- .../pcloud_tasks_delete_responses.go | 198 +++++++++- .../pcloud_tasks_get_parameters.go | 8 +- .../pcloud_tasks_get_responses.go | 165 +++++++- .../p_cloud_tenants/p_cloud_tenants_client.go | 4 +- .../pcloud_tenants_get_parameters.go | 8 +- .../pcloud_tenants_get_responses.go | 198 +++++++++- .../pcloud_tenants_put_parameters.go | 8 +- .../pcloud_tenants_put_responses.go | 165 +++++++- .../p_cloud_tenants_ssh_keys_client.go | 10 +- ...cloud_tenants_sshkeys_delete_parameters.go | 8 +- ...pcloud_tenants_sshkeys_delete_responses.go | 165 +++++++- .../pcloud_tenants_sshkeys_get_parameters.go | 8 +- .../pcloud_tenants_sshkeys_get_responses.go | 234 ++++++++++- ...cloud_tenants_sshkeys_getall_parameters.go | 8 +- ...pcloud_tenants_sshkeys_getall_responses.go | 234 ++++++++++- .../pcloud_tenants_sshkeys_post_parameters.go | 8 +- .../pcloud_tenants_sshkeys_post_responses.go | 231 ++++++++++- .../pcloud_tenants_sshkeys_put_parameters.go | 8 +- .../pcloud_tenants_sshkeys_put_responses.go | 165 +++++++- .../p_cloudvpn_connections_client.go | 44 +-- ...pcloud_vpnconnections_delete_parameters.go | 8 +- .../pcloud_vpnconnections_delete_responses.go | 198 +++++++++- .../pcloud_vpnconnections_get_parameters.go | 8 +- .../pcloud_vpnconnections_get_responses.go | 231 ++++++++++- ...pcloud_vpnconnections_getall_parameters.go | 8 +- .../pcloud_vpnconnections_getall_responses.go | 198 +++++++++- ...nconnections_networks_delete_parameters.go | 8 +- ...pnconnections_networks_delete_responses.go | 231 ++++++++++- ..._vpnconnections_networks_get_parameters.go | 8 +- ...d_vpnconnections_networks_get_responses.go | 198 +++++++++- ..._vpnconnections_networks_put_parameters.go | 8 +- ...d_vpnconnections_networks_put_responses.go | 231 ++++++++++- ...nnections_peersubnets_delete_parameters.go | 8 +- ...onnections_peersubnets_delete_responses.go | 198 +++++++++- ...nconnections_peersubnets_get_parameters.go | 8 +- ...pnconnections_peersubnets_get_responses.go | 198 +++++++++- ...nconnections_peersubnets_put_parameters.go | 8 +- ...pnconnections_peersubnets_put_responses.go | 198 +++++++++- .../pcloud_vpnconnections_post_parameters.go | 8 +- .../pcloud_vpnconnections_post_responses.go | 231 ++++++++++- .../pcloud_vpnconnections_put_parameters.go | 8 +- .../pcloud_vpnconnections_put_responses.go | 231 ++++++++++- .../p_cloudvpn_policies_client.go | 40 +- .../pcloud_ikepolicies_delete_parameters.go | 8 +- .../pcloud_ikepolicies_delete_responses.go | 198 +++++++++- .../pcloud_ikepolicies_get_parameters.go | 8 +- .../pcloud_ikepolicies_get_responses.go | 231 ++++++++++- .../pcloud_ikepolicies_getall_parameters.go | 8 +- .../pcloud_ikepolicies_getall_responses.go | 198 +++++++++- .../pcloud_ikepolicies_post_parameters.go | 8 +- .../pcloud_ikepolicies_post_responses.go | 231 ++++++++++- .../pcloud_ikepolicies_put_parameters.go | 8 +- .../pcloud_ikepolicies_put_responses.go | 198 +++++++++- .../pcloud_ipsecpolicies_delete_parameters.go | 8 +- .../pcloud_ipsecpolicies_delete_responses.go | 198 +++++++++- .../pcloud_ipsecpolicies_get_parameters.go | 8 +- .../pcloud_ipsecpolicies_get_responses.go | 231 ++++++++++- .../pcloud_ipsecpolicies_getall_parameters.go | 8 +- .../pcloud_ipsecpolicies_getall_responses.go | 198 +++++++++- .../pcloud_ipsecpolicies_post_parameters.go | 8 +- .../pcloud_ipsecpolicies_post_responses.go | 231 ++++++++++- .../pcloud_ipsecpolicies_put_parameters.go | 8 +- .../pcloud_ipsecpolicies_put_responses.go | 231 ++++++++++- .../p_cloud_volume_groups_client.go | 20 +- ...oud_volumegroups_action_post_parameters.go | 8 +- ...loud_volumegroups_action_post_responses.go | 234 ++++++++++- .../pcloud_volumegroups_delete_parameters.go | 8 +- .../pcloud_volumegroups_delete_responses.go | 234 ++++++++++- ...oud_volumegroups_get_details_parameters.go | 8 +- ...loud_volumegroups_get_details_responses.go | 201 +++++++++- .../pcloud_volumegroups_get_parameters.go | 8 +- .../pcloud_volumegroups_get_responses.go | 201 +++++++++- ..._volumegroups_getall_details_parameters.go | 8 +- ...d_volumegroups_getall_details_responses.go | 201 +++++++++- .../pcloud_volumegroups_getall_parameters.go | 8 +- .../pcloud_volumegroups_getall_responses.go | 201 +++++++++- .../pcloud_volumegroups_post_parameters.go | 8 +- .../pcloud_volumegroups_post_responses.go | 333 +++++++++++++++- .../pcloud_volumegroups_put_parameters.go | 8 +- .../pcloud_volumegroups_put_responses.go | 300 ++++++++++++++- ...emote_copy_relationships_get_parameters.go | 8 +- ...remote_copy_relationships_get_responses.go | 198 +++++++++- ...megroups_storage_details_get_parameters.go | 8 +- ...umegroups_storage_details_get_responses.go | 198 +++++++++- .../p_cloud_volume_onboarding_client.go | 6 +- ...pcloud_volume_onboarding_get_parameters.go | 8 +- .../pcloud_volume_onboarding_get_responses.go | 234 ++++++++++- ...oud_volume_onboarding_getall_parameters.go | 8 +- ...loud_volume_onboarding_getall_responses.go | 187 ++++++++- ...cloud_volume_onboarding_post_parameters.go | 8 +- ...pcloud_volume_onboarding_post_responses.go | 198 +++++++++- .../p_cloud_volumes/p_cloud_volumes_client.go | 52 +-- ...nstances_volumes_action_post_parameters.go | 8 +- ...instances_volumes_action_post_responses.go | 231 ++++++++++- ...loudinstances_volumes_delete_parameters.go | 8 +- ...cloudinstances_volumes_delete_responses.go | 267 ++++++++++++- ...umes_flash_copy_mappings_get_parameters.go | 8 +- ...lumes_flash_copy_mappings_get_responses.go | 231 ++++++++++- ...d_cloudinstances_volumes_get_parameters.go | 8 +- ...ud_cloudinstances_volumes_get_responses.go | 234 ++++++++++- ...loudinstances_volumes_getall_parameters.go | 8 +- ...cloudinstances_volumes_getall_responses.go | 234 ++++++++++- ..._cloudinstances_volumes_post_parameters.go | 8 +- ...d_cloudinstances_volumes_post_responses.go | 231 ++++++++++- ...d_cloudinstances_volumes_put_parameters.go | 8 +- ...ud_cloudinstances_volumes_put_responses.go | 336 +++++++++++++++- ...remote_copy_relationship_get_parameters.go | 8 +- ..._remote_copy_relationship_get_responses.go | 231 ++++++++++- ..._pvminstances_volumes_delete_parameters.go | 8 +- ...d_pvminstances_volumes_delete_responses.go | 231 ++++++++++- ...oud_pvminstances_volumes_get_parameters.go | 8 +- ...loud_pvminstances_volumes_get_responses.go | 234 ++++++++++- ..._pvminstances_volumes_getall_parameters.go | 8 +- ...d_pvminstances_volumes_getall_responses.go | 234 ++++++++++- ...ud_pvminstances_volumes_post_parameters.go | 8 +- ...oud_pvminstances_volumes_post_responses.go | 231 ++++++++++- ...oud_pvminstances_volumes_put_parameters.go | 8 +- ...loud_pvminstances_volumes_put_responses.go | 237 +++++++++++- ...nstances_volumes_setboot_put_parameters.go | 8 +- ...instances_volumes_setboot_put_responses.go | 234 ++++++++++- ...v2_pvminstances_volumes_post_parameters.go | 8 +- ..._v2_pvminstances_volumes_post_responses.go | 198 +++++++++- ...pcloud_v2_volumes_clone_post_parameters.go | 8 +- .../pcloud_v2_volumes_clone_post_responses.go | 198 +++++++++- ...ud_v2_volumes_clonetasks_get_parameters.go | 8 +- ...oud_v2_volumes_clonetasks_get_responses.go | 267 ++++++++++++- .../pcloud_v2_volumes_post_parameters.go | 8 +- .../pcloud_v2_volumes_post_responses.go | 231 ++++++++++- ..._v2_volumesclone_cancel_post_parameters.go | 8 +- ...d_v2_volumesclone_cancel_post_responses.go | 165 +++++++- ...cloud_v2_volumesclone_delete_parameters.go | 8 +- ...pcloud_v2_volumesclone_delete_responses.go | 198 +++++++++- ...v2_volumesclone_execute_post_parameters.go | 8 +- ..._v2_volumesclone_execute_post_responses.go | 198 +++++++++- .../pcloud_v2_volumesclone_get_parameters.go | 8 +- .../pcloud_v2_volumesclone_get_responses.go | 234 ++++++++++- ...cloud_v2_volumesclone_getall_parameters.go | 8 +- ...pcloud_v2_volumesclone_getall_responses.go | 187 ++++++++- .../pcloud_v2_volumesclone_post_parameters.go | 8 +- .../pcloud_v2_volumesclone_post_responses.go | 191 +++++++-- ...d_v2_volumesclone_start_post_parameters.go | 8 +- ...ud_v2_volumesclone_start_post_responses.go | 165 +++++++- .../pcloud_volumes_clone_post_parameters.go | 8 +- .../pcloud_volumes_clone_post_responses.go | 198 +++++++++- .../service_binding_binding_parameters.go | 8 +- .../service_binding_binding_responses.go | 198 +++++++++- .../service_binding_get_parameters.go | 8 +- .../service_binding_get_responses.go | 66 +++- ...e_binding_last_operation_get_parameters.go | 8 +- ...ce_binding_last_operation_get_responses.go | 99 ++++- .../service_binding_unbinding_parameters.go | 8 +- .../service_binding_unbinding_responses.go | 132 ++++++- .../service_bindings_client.go | 8 +- ...service_instance_deprovision_parameters.go | 8 +- .../service_instance_deprovision_responses.go | 198 +++++++++- .../service_instance_get_parameters.go | 8 +- .../service_instance_get_responses.go | 66 +++- ..._instance_last_operation_get_parameters.go | 8 +- ...e_instance_last_operation_get_responses.go | 99 ++++- .../service_instance_provision_parameters.go | 8 +- .../service_instance_provision_responses.go | 198 +++++++++- .../service_instance_update_parameters.go | 8 +- .../service_instance_update_responses.go | 132 ++++++- .../service_instances_client.go | 10 +- ...vice_broker_storagetypes_get_parameters.go | 8 +- ...rvice_broker_storagetypes_get_responses.go | 66 +++- .../storage_types/storage_types_client.go | 2 +- .../service_broker_swaggerspec_parameters.go | 8 +- .../service_broker_swaggerspec_responses.go | 33 +- .../swagger_spec/swagger_spec_client.go | 2 +- power/models/p_vm_instance.go | 2 +- power/models/p_vm_instance_create.go | 2 +- power/models/s_a_p_create.go | 3 - power/models/target_object.go | 88 +++++ power/models/transit_connection_error.go | 77 ---- power/models/transit_connection_error_item.go | 139 +++++++ power/models/transit_gateway_instance.go | 62 +-- power/models/volume.go | 5 +- power/models/volume_reference.go | 5 +- 459 files changed, 41738 insertions(+), 2090 deletions(-) create mode 100644 power/models/target_object.go delete mode 100644 power/models/transit_connection_error.go create mode 100644 power/models/transit_connection_error_item.go diff --git a/power/client/authentication/authentication_client.go b/power/client/authentication/authentication_client.go index 2e9c3f96..33f0e028 100644 --- a/power/client/authentication/authentication_client.go +++ b/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/power/client/authentication/service_broker_auth_callback_parameters.go b/power/client/authentication/service_broker_auth_callback_parameters.go index 7c2aaa3c..3e884e28 100644 --- a/power/client/authentication/service_broker_auth_callback_parameters.go +++ b/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/power/client/authentication/service_broker_auth_callback_responses.go b/power/client/authentication/service_broker_auth_callback_responses.go index b48acc24..ecd31641 100644 --- a/power/client/authentication/service_broker_auth_callback_responses.go +++ b/power/client/authentication/service_broker_auth_callback_responses.go @@ -51,7 +51,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 +60,39 @@ 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 +} + 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 } @@ -83,7 +114,8 @@ func NewServiceBrokerAuthCallbackUnauthorized() *ServiceBrokerAuthCallbackUnauth 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 +123,39 @@ 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 +} + 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 } @@ -115,7 +177,8 @@ func NewServiceBrokerAuthCallbackInternalServerError() *ServiceBrokerAuthCallbac 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 +186,39 @@ 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 +} + 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/power/client/authentication/service_broker_auth_device_code_post_parameters.go b/power/client/authentication/service_broker_auth_device_code_post_parameters.go index ad621b60..a6046d34 100644 --- a/power/client/authentication/service_broker_auth_device_code_post_parameters.go +++ b/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/power/client/authentication/service_broker_auth_device_code_post_responses.go b/power/client/authentication/service_broker_auth_device_code_post_responses.go index b0d31f0b..602b66cd 100644 --- a/power/client/authentication/service_broker_auth_device_code_post_responses.go +++ b/power/client/authentication/service_broker_auth_device_code_post_responses.go @@ -51,7 +51,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 +60,39 @@ 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 +} + 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 } @@ -83,7 +114,8 @@ func NewServiceBrokerAuthDeviceCodePostForbidden() *ServiceBrokerAuthDeviceCodeP 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 */ @@ -91,9 +123,39 @@ 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 +} + 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 } @@ -115,7 +177,8 @@ func NewServiceBrokerAuthDeviceCodePostInternalServerError() *ServiceBrokerAuthD 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 +186,39 @@ 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 +} + 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/power/client/authentication/service_broker_auth_device_token_post_parameters.go b/power/client/authentication/service_broker_auth_device_token_post_parameters.go index ab928c9a..0d9bc3ea 100644 --- a/power/client/authentication/service_broker_auth_device_token_post_parameters.go +++ b/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/power/client/authentication/service_broker_auth_device_token_post_responses.go b/power/client/authentication/service_broker_auth_device_token_post_responses.go index f9579f5c..2a2bd8d9 100644 --- a/power/client/authentication/service_broker_auth_device_token_post_responses.go +++ b/power/client/authentication/service_broker_auth_device_token_post_responses.go @@ -65,7 +65,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 +74,39 @@ 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 +} + 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,7 +128,8 @@ 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 */ @@ -105,9 +137,39 @@ 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 +} + 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 } @@ -129,7 +191,8 @@ func NewServiceBrokerAuthDeviceTokenPostForbidden() *ServiceBrokerAuthDeviceToke 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 */ @@ -137,9 +200,39 @@ 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 +} + 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 } @@ -161,7 +254,8 @@ func NewServiceBrokerAuthDeviceTokenPostTooManyRequests() *ServiceBrokerAuthDevi 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 +263,39 @@ 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 +} + 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 +317,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 +326,39 @@ 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 +} + 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 +375,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/power/client/authentication/service_broker_auth_info_token_parameters.go b/power/client/authentication/service_broker_auth_info_token_parameters.go index 8bd091b8..33c025ce 100644 --- a/power/client/authentication/service_broker_auth_info_token_parameters.go +++ b/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/power/client/authentication/service_broker_auth_info_token_responses.go b/power/client/authentication/service_broker_auth_info_token_responses.go index 5c38010d..d835aa49 100644 --- a/power/client/authentication/service_broker_auth_info_token_responses.go +++ b/power/client/authentication/service_broker_auth_info_token_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 } @@ -77,7 +108,8 @@ func NewServiceBrokerAuthInfoTokenInternalServerError() *ServiceBrokerAuthInfoTo 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 +117,39 @@ 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 +} + 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/power/client/authentication/service_broker_auth_info_user_parameters.go b/power/client/authentication/service_broker_auth_info_user_parameters.go index 400cfced..ce2d0697 100644 --- a/power/client/authentication/service_broker_auth_info_user_parameters.go +++ b/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/power/client/authentication/service_broker_auth_info_user_responses.go b/power/client/authentication/service_broker_auth_info_user_responses.go index c8a412df..e310114b 100644 --- a/power/client/authentication/service_broker_auth_info_user_responses.go +++ b/power/client/authentication/service_broker_auth_info_user_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 } @@ -77,7 +108,8 @@ func NewServiceBrokerAuthInfoUserInternalServerError() *ServiceBrokerAuthInfoUse 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 +117,39 @@ 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 +} + 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/power/client/authentication/service_broker_auth_login_parameters.go b/power/client/authentication/service_broker_auth_login_parameters.go index 821c5a04..9d582be1 100644 --- a/power/client/authentication/service_broker_auth_login_parameters.go +++ b/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/power/client/authentication/service_broker_auth_login_responses.go b/power/client/authentication/service_broker_auth_login_responses.go index 0372c622..0638e274 100644 --- a/power/client/authentication/service_broker_auth_login_responses.go +++ b/power/client/authentication/service_broker_auth_login_responses.go @@ -51,7 +51,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 +60,39 @@ 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 +} + 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 } @@ -83,7 +114,8 @@ 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 +123,39 @@ 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 +} + 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 } @@ -115,7 +177,8 @@ func NewServiceBrokerAuthLoginInternalServerError() *ServiceBrokerAuthLoginInter 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 +186,39 @@ 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 +} + 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/power/client/authentication/service_broker_auth_logout_parameters.go b/power/client/authentication/service_broker_auth_logout_parameters.go index dd227cda..ba95ff8b 100644 --- a/power/client/authentication/service_broker_auth_logout_parameters.go +++ b/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/power/client/authentication/service_broker_auth_logout_responses.go b/power/client/authentication/service_broker_auth_logout_responses.go index 6907da01..25bcf26d 100644 --- a/power/client/authentication/service_broker_auth_logout_responses.go +++ b/power/client/authentication/service_broker_auth_logout_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 } @@ -75,7 +106,8 @@ func NewServiceBrokerAuthLogoutInternalServerError() *ServiceBrokerAuthLogoutInt 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 +115,39 @@ 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 +} + 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/power/client/authentication/service_broker_auth_registration_callback_parameters.go b/power/client/authentication/service_broker_auth_registration_callback_parameters.go index 0aceb531..4f53dcbc 100644 --- a/power/client/authentication/service_broker_auth_registration_callback_parameters.go +++ b/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/power/client/authentication/service_broker_auth_registration_callback_responses.go b/power/client/authentication/service_broker_auth_registration_callback_responses.go index bc09a805..3b31ccc9 100644 --- a/power/client/authentication/service_broker_auth_registration_callback_responses.go +++ b/power/client/authentication/service_broker_auth_registration_callback_responses.go @@ -51,7 +51,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 +60,39 @@ 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 +} + 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 } @@ -83,7 +114,8 @@ func NewServiceBrokerAuthRegistrationCallbackUnauthorized() *ServiceBrokerAuthRe 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 +123,39 @@ 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 +} + 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 } @@ -115,7 +177,8 @@ func NewServiceBrokerAuthRegistrationCallbackInternalServerError() *ServiceBroke 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 +186,39 @@ 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 +} + 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/power/client/authentication/service_broker_auth_registration_parameters.go b/power/client/authentication/service_broker_auth_registration_parameters.go index 3a49c00a..0324385e 100644 --- a/power/client/authentication/service_broker_auth_registration_parameters.go +++ b/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/power/client/authentication/service_broker_auth_registration_responses.go b/power/client/authentication/service_broker_auth_registration_responses.go index 7ccbe10a..b55d028f 100644 --- a/power/client/authentication/service_broker_auth_registration_responses.go +++ b/power/client/authentication/service_broker_auth_registration_responses.go @@ -51,7 +51,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 +60,39 @@ 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 +} + 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 } @@ -83,7 +114,8 @@ func NewServiceBrokerAuthRegistrationUnauthorized() *ServiceBrokerAuthRegistrati 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 +123,39 @@ 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 +} + 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 } @@ -115,7 +177,8 @@ func NewServiceBrokerAuthRegistrationInternalServerError() *ServiceBrokerAuthReg 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 +186,39 @@ 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 +} + 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/power/client/authentication/service_broker_auth_token_post_parameters.go b/power/client/authentication/service_broker_auth_token_post_parameters.go index 7c77f5ac..d057427c 100644 --- a/power/client/authentication/service_broker_auth_token_post_parameters.go +++ b/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/power/client/authentication/service_broker_auth_token_post_responses.go b/power/client/authentication/service_broker_auth_token_post_responses.go index 72087200..65203548 100644 --- a/power/client/authentication/service_broker_auth_token_post_responses.go +++ b/power/client/authentication/service_broker_auth_token_post_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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,7 +126,8 @@ 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 */ @@ -103,9 +135,39 @@ 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 +} + 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 } @@ -127,7 +189,8 @@ func NewServiceBrokerAuthTokenPostForbidden() *ServiceBrokerAuthTokenPostForbidd 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 */ @@ -135,9 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ func NewServiceBrokerAuthTokenPostTooManyRequests() *ServiceBrokerAuthTokenPostT 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/bluemix_service_instances/bluemix_service_instance_get_parameters.go b/power/client/bluemix_service_instances/bluemix_service_instance_get_parameters.go index 185400b2..c1250167 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instance_get_parameters.go +++ b/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/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go b/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go index 0fe5b096..0dbbebf1 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go +++ b/power/client/bluemix_service_instances/bluemix_service_instance_get_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 +108,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 +117,39 @@ 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 +} + 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 } diff --git a/power/client/bluemix_service_instances/bluemix_service_instance_put_parameters.go b/power/client/bluemix_service_instances/bluemix_service_instance_put_parameters.go index 7bc989be..e366c432 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instance_put_parameters.go +++ b/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/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go b/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go index d35787f1..7526af89 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go +++ b/power/client/bluemix_service_instances/bluemix_service_instance_put_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 +108,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 +117,39 @@ 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 +} + 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 } diff --git a/power/client/bluemix_service_instances/bluemix_service_instances_client.go b/power/client/bluemix_service_instances/bluemix_service_instances_client.go index d0cb0758..76f2c993 100644 --- a/power/client/bluemix_service_instances/bluemix_service_instances_client.go +++ b/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/power/client/catalog/catalog_client.go b/power/client/catalog/catalog_client.go index 265b7dfe..0641b3b1 100644 --- a/power/client/catalog/catalog_client.go +++ b/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/power/client/catalog/catalog_get_parameters.go b/power/client/catalog/catalog_get_parameters.go index 5f11d0a1..b525e380 100644 --- a/power/client/catalog/catalog_get_parameters.go +++ b/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/power/client/catalog/catalog_get_responses.go b/power/client/catalog/catalog_get_responses.go index 448d665f..f8accdb6 100644 --- a/power/client/catalog/catalog_get_responses.go +++ b/power/client/catalog/catalog_get_responses.go @@ -39,7 +39,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 +48,39 @@ 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 +} + 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 } diff --git a/power/client/hardware_platforms/hardware_platforms_client.go b/power/client/hardware_platforms/hardware_platforms_client.go index 0cb215ec..89412a25 100644 --- a/power/client/hardware_platforms/hardware_platforms_client.go +++ b/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/power/client/hardware_platforms/service_broker_hardwareplatforms_get_parameters.go b/power/client/hardware_platforms/service_broker_hardwareplatforms_get_parameters.go index 53c6aee7..693d196b 100644 --- a/power/client/hardware_platforms/service_broker_hardwareplatforms_get_parameters.go +++ b/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/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go b/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go index 41e79c37..ea90ab57 100644 --- a/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go +++ b/power/client/hardware_platforms/service_broker_hardwareplatforms_get_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 } @@ -75,7 +106,8 @@ func NewServiceBrokerHardwareplatformsGetInternalServerError() *ServiceBrokerHar 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 +115,39 @@ 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 +} + 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/power/client/iaas_service_broker/iaas_service_broker_client.go b/power/client/iaas_service_broker/iaas_service_broker_client.go index fee72986..8b177881 100644 --- a/power/client/iaas_service_broker/iaas_service_broker_client.go +++ b/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/power/client/iaas_service_broker/service_broker_health_head_parameters.go b/power/client/iaas_service_broker/service_broker_health_head_parameters.go index 04086695..a5be3690 100644 --- a/power/client/iaas_service_broker/service_broker_health_head_parameters.go +++ b/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/power/client/iaas_service_broker/service_broker_health_head_responses.go b/power/client/iaas_service_broker/service_broker_health_head_responses.go index 3af3bd54..674e4d6f 100644 --- a/power/client/iaas_service_broker/service_broker_health_head_responses.go +++ b/power/client/iaas_service_broker/service_broker_health_head_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 +108,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 +117,39 @@ 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 +} + 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 } diff --git a/power/client/iaas_service_broker/service_broker_health_parameters.go b/power/client/iaas_service_broker/service_broker_health_parameters.go index bed2ea2f..6f9e2010 100644 --- a/power/client/iaas_service_broker/service_broker_health_parameters.go +++ b/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/power/client/iaas_service_broker/service_broker_health_responses.go b/power/client/iaas_service_broker/service_broker_health_responses.go index 9ad3dd6b..dbef0532 100644 --- a/power/client/iaas_service_broker/service_broker_health_responses.go +++ b/power/client/iaas_service_broker/service_broker_health_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 +108,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 +117,39 @@ 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 +} + 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 } diff --git a/power/client/iaas_service_broker/service_broker_test_timeout_parameters.go b/power/client/iaas_service_broker/service_broker_test_timeout_parameters.go index aec4dc2a..f401a8bd 100644 --- a/power/client/iaas_service_broker/service_broker_test_timeout_parameters.go +++ b/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/power/client/iaas_service_broker/service_broker_test_timeout_responses.go b/power/client/iaas_service_broker/service_broker_test_timeout_responses.go index 4aee22ea..048f0e27 100644 --- a/power/client/iaas_service_broker/service_broker_test_timeout_responses.go +++ b/power/client/iaas_service_broker/service_broker_test_timeout_responses.go @@ -39,7 +39,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 +48,39 @@ 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 +} + 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 } diff --git a/power/client/iaas_service_broker/service_broker_version_parameters.go b/power/client/iaas_service_broker/service_broker_version_parameters.go index 6afbe895..99b839db 100644 --- a/power/client/iaas_service_broker/service_broker_version_parameters.go +++ b/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/power/client/iaas_service_broker/service_broker_version_responses.go b/power/client/iaas_service_broker/service_broker_version_responses.go index 85c8fc17..961dad92 100644 --- a/power/client/iaas_service_broker/service_broker_version_responses.go +++ b/power/client/iaas_service_broker/service_broker_version_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 +108,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 +117,39 @@ 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 +} + 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 } diff --git a/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go b/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go index 1c14c108..3c26fc52 100644 --- a/power/client/internal_power_v_s_instances/internal_powervs_instances_client.go +++ b/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/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_parameters.go b/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_parameters.go index 05ff1883..d70686db 100644 --- a/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_parameters.go +++ b/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/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go b/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go index e8d4224a..ea38a7a1 100644 --- a/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go +++ b/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go @@ -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,39 @@ 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 +} + 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 +114,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 +123,39 @@ 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 +} + 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 +177,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 +186,39 @@ 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 +} + 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/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go b/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go index 46254944..0e67d48e 100644 --- a/power/client/internal_power_v_s_locations/internal_powervs_locations_client.go +++ b/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/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_parameters.go b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_parameters.go index b2cd034a..1de5554b 100644 --- a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_parameters.go +++ b/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/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go index e55ecdb2..cc1d00a3 100644 --- a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go +++ b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go @@ -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,39 @@ 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 +} + 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 +114,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 +123,39 @@ 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 +} + 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 +177,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 +186,39 @@ 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 +} + 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/power/client/internal_storage_regions/internal_storage_regions_client.go b/power/client/internal_storage_regions/internal_storage_regions_client.go index eb44b6d7..6c57756c 100644 --- a/power/client/internal_storage_regions/internal_storage_regions_client.go +++ b/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/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_parameters.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_parameters.go index 7f5c37e4..a3c88e2a 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_parameters.go +++ b/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/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go index 4cb42f88..374564dd 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +124,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 +133,39 @@ 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 +} + 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 +182,76 @@ 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 +} + +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 +259,39 @@ 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 +} + 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 +313,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 +322,39 @@ 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 +} + 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/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_parameters.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_parameters.go index cda5153c..a2535590 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_parameters.go +++ b/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/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go index 1c654e2d..3bc64a77 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_getall_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +124,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 +133,39 @@ 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 +} + 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 +182,76 @@ 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 +} + +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 +259,39 @@ 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 +} + 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 +313,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 +322,39 @@ 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 +} + 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/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_parameters.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_parameters.go index 624f961b..675a4d07 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_parameters.go +++ b/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/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go index f36b6457..a1996432 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_storage_pools_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_parameters.go b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_parameters.go index c60d4fea..e7a53a59 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_parameters.go +++ b/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/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go index 87dbb71e..074209d5 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +184,76 @@ 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 +} + +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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_parameters.go b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_parameters.go index 37d83665..46f354dd 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_parameters.go +++ b/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/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go index fab946ca..a61d4335 100644 --- a/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go +++ b/power/client/internal_storage_regions/internal_v1_storage_regions_thresholds_put_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/internal_transit_gateway/internal_transit_gateway_client.go b/power/client/internal_transit_gateway/internal_transit_gateway_client.go index fac9ae4e..7e54f6c3 100644 --- a/power/client/internal_transit_gateway/internal_transit_gateway_client.go +++ b/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/power/client/internal_transit_gateway/internal_v1_transitgateway_get_parameters.go b/power/client/internal_transit_gateway/internal_v1_transitgateway_get_parameters.go index 57d54599..123bbefc 100644 --- a/power/client/internal_transit_gateway/internal_v1_transitgateway_get_parameters.go +++ b/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/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go b/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go index 3d25a711..07584952 100644 --- a/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go +++ b/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go @@ -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,39 @@ 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 +} + 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 +108,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 +117,39 @@ 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 +} + 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/power/client/open_stacks/open_stacks_client.go b/power/client/open_stacks/open_stacks_client.go index 693bef3b..7cce851e 100644 --- a/power/client/open_stacks/open_stacks_client.go +++ b/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/power/client/open_stacks/service_broker_openstacks_get_parameters.go b/power/client/open_stacks/service_broker_openstacks_get_parameters.go index a5fc89bf..9ea71fae 100644 --- a/power/client/open_stacks/service_broker_openstacks_get_parameters.go +++ b/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/power/client/open_stacks/service_broker_openstacks_get_responses.go b/power/client/open_stacks/service_broker_openstacks_get_responses.go index c1903411..95ac39fb 100644 --- a/power/client/open_stacks/service_broker_openstacks_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_get_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 +120,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 +129,39 @@ 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 +} + 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 } @@ -121,7 +183,8 @@ func NewServiceBrokerOpenstacksGetForbidden() *ServiceBrokerOpenstacksGetForbidd 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 */ @@ -129,9 +192,39 @@ 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 +} + 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 } @@ -153,7 +246,8 @@ func NewServiceBrokerOpenstacksGetInternalServerError() *ServiceBrokerOpenstacks 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 +255,39 @@ 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 +} + 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/power/client/open_stacks/service_broker_openstacks_hosts_get_parameters.go b/power/client/open_stacks/service_broker_openstacks_hosts_get_parameters.go index 0f29aa65..0e25e371 100644 --- a/power/client/open_stacks/service_broker_openstacks_hosts_get_parameters.go +++ b/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/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go b/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go index 83eff4cf..7d8e21ab 100644 --- a/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_hosts_get_responses.go @@ -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,39 @@ 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 +} + 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 +120,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 +129,39 @@ 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 +} + 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 +183,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 +192,39 @@ 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 +} + 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 +246,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 +255,39 @@ 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 +} + 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/power/client/open_stacks/service_broker_openstacks_openstack_get_parameters.go b/power/client/open_stacks/service_broker_openstacks_openstack_get_parameters.go index 11249b70..e3b228af 100644 --- a/power/client/open_stacks/service_broker_openstacks_openstack_get_parameters.go +++ b/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/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go b/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go index dece779e..b5e57c58 100644 --- a/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_openstack_get_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 +120,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 +129,39 @@ 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 +} + 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 } @@ -121,7 +183,8 @@ func NewServiceBrokerOpenstacksOpenstackGetNotFound() *ServiceBrokerOpenstacksOp 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 +192,39 @@ 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 +} + 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 +246,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 +255,39 @@ 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 +} + 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/power/client/open_stacks/service_broker_openstacks_post_parameters.go b/power/client/open_stacks/service_broker_openstacks_post_parameters.go index 32935216..3b9a54f6 100644 --- a/power/client/open_stacks/service_broker_openstacks_post_parameters.go +++ b/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/power/client/open_stacks/service_broker_openstacks_post_responses.go b/power/client/open_stacks/service_broker_openstacks_post_responses.go index b83e9e39..749ae0e0 100644 --- a/power/client/open_stacks/service_broker_openstacks_post_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_post_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 } @@ -165,7 +258,8 @@ func NewServiceBrokerOpenstacksPostConflict() *ServiceBrokerOpenstacksPostConfli 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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/open_stacks/service_broker_openstacks_servers_get_parameters.go b/power/client/open_stacks/service_broker_openstacks_servers_get_parameters.go index dbe1a1a5..2ba42257 100644 --- a/power/client/open_stacks/service_broker_openstacks_servers_get_parameters.go +++ b/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/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go b/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go index d52ebc75..98035c1a 100644 --- a/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go +++ b/power/client/open_stacks/service_broker_openstacks_servers_get_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 +120,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 +129,39 @@ 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 +} + 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 } @@ -121,7 +183,8 @@ func NewServiceBrokerOpenstacksServersGetNotFound() *ServiceBrokerOpenstacksServ 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 +192,39 @@ 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 +} + 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 +246,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 +255,39 @@ 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 +} + 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/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go b/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go index 6b3a5437..54b04ee0 100644 --- a/power/client/p_cloud_cloud_connections/p_cloud_cloud_connections_client.go +++ b/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 deletes 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 adds 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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_parameters.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_parameters.go index 9cbc14c9..f83100f6 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_parameters.go +++ b/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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go index d955a28b..8ba636d2 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_delete_responses.go @@ -81,7 +81,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 +90,39 @@ 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 +} + 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 +142,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 +151,39 @@ 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 +} + 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 +205,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 +214,39 @@ 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 +} + 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 +268,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 +277,39 @@ 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 +} + 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 } @@ -207,7 +331,8 @@ func NewPcloudCloudconnectionsDeleteNotFound() *PcloudCloudconnectionsDeleteNotF 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 +340,39 @@ 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 +} + 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 +394,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 +403,39 @@ 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 +} + 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 +457,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 +466,39 @@ 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 +} + 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 +520,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 +529,39 @@ 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 +} + 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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_parameters.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_parameters.go index 16a386f8..58a85a95 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_parameters.go +++ b/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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go index 11434159..2da8381a 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_get_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 } @@ -165,7 +258,8 @@ 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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_parameters.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_parameters.go index ab74a7af..a0969a7b 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_parameters.go +++ b/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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go index f096d6de..7c82948d 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_getall_responses.go @@ -41,6 +41,12 @@ 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 408: result := NewPcloudCloudconnectionsGetallRequestTimeout() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -63,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +} + // 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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_parameters.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_parameters.go index e3c9466d..b5227f7a 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_parameters.go +++ b/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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go index 254b75df..93de7c29 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_delete_responses.go @@ -81,7 +81,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 +90,39 @@ 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 +} + 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 +142,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 +151,39 @@ 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 +} + 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 +205,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 +214,39 @@ 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 +} + 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 +268,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 +277,39 @@ 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 +} + 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 } @@ -207,7 +331,8 @@ func NewPcloudCloudconnectionsNetworksDeleteNotFound() *PcloudCloudconnectionsNe 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 +340,39 @@ 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 +} + 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 +394,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 +403,39 @@ 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 +} + 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 +457,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 +466,39 @@ 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 +} + 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 +520,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 +529,39 @@ 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 +} + 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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_parameters.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_parameters.go index c19e5e7a..7fdcb871 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_parameters.go +++ b/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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go index 0317d3be..61549c72 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_networks_put_responses.go @@ -81,7 +81,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 +90,39 @@ 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 +} + 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 +142,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 +151,39 @@ 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 +} + 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 +205,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 +214,39 @@ 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 +} + 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 +268,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 +277,39 @@ 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 +} + 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 } @@ -207,7 +331,8 @@ func NewPcloudCloudconnectionsNetworksPutNotFound() *PcloudCloudconnectionsNetwo 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 +340,39 @@ 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 +} + 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 +394,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 +403,39 @@ 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 +} + 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 +457,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 +466,39 @@ 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 +} + 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 +520,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 +529,39 @@ 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 +} + 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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_parameters.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_parameters.go index 71ee602f..b2bcf71f 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_parameters.go +++ b/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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go index bde60c12..81828742 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go @@ -99,7 +99,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 +108,39 @@ 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 +} + 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 +162,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 +171,39 @@ 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 +} + 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 +225,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 +234,39 @@ 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 +} + 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 +288,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 +297,39 @@ 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 +} + 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 +351,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 +360,39 @@ 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 +} + 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 } @@ -259,7 +414,8 @@ 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 +423,39 @@ 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 +} + 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 +477,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 +486,39 @@ 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 +} + 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 +540,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 +549,39 @@ 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 +} + 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 +603,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 +612,39 @@ 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 +} + 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 +666,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 +675,39 @@ 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 +} + 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 } @@ -419,7 +729,8 @@ func NewPcloudCloudconnectionsPostGatewayTimeout() *PcloudCloudconnectionsPostGa 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 +738,39 @@ 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 +} + 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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_parameters.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_parameters.go index 13698088..61ecb3be 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_parameters.go +++ b/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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go index 2b46c560..f04f373c 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_put_responses.go @@ -93,7 +93,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 +102,39 @@ 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 +} + 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 +156,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 +165,39 @@ 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 +} + 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 +219,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 +228,39 @@ 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 +} + 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 +282,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 +291,39 @@ 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 +} + 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 } @@ -221,7 +345,8 @@ 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 +354,39 @@ 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 +} + 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 +408,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 +417,39 @@ 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 +} + 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 +471,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 +480,39 @@ 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 +} + 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 +534,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 +543,39 @@ 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 +} + 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 +597,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 +606,39 @@ 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 +} + 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 +660,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 +669,39 @@ 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 +} + 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 } diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_parameters.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_parameters.go index 6cc7c04c..64064893 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_parameters.go +++ b/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/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go index 3da81fad..00e93166 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go @@ -41,6 +41,12 @@ 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 408: result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -69,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +259,76 @@ 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 +} + +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 +} + // 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 } @@ -229,7 +453,8 @@ func NewPcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout() *Pcloud 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 +462,39 @@ 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 +} + 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/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go b/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go index 377f9a16..bdcf215f 100644 --- a/power/client/p_cloud_disaster_recovery/p_cloud_disaster_recovery_client.go +++ b/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/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_parameters.go b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_parameters.go index 60da677c..7bdf07a1 100644 --- a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_parameters.go +++ b/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/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go index 3bf37390..3de9489a 100644 --- a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go +++ b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_get_responses.go @@ -29,6 +29,12 @@ 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +121,76 @@ 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 +} + +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 +198,39 @@ 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 +} + 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 } @@ -121,7 +252,8 @@ func NewPcloudLocationsDisasterrecoveryGetNotFound() *PcloudLocationsDisasterrec 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_parameters.go b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_parameters.go index 4c92f7d7..bee46c0c 100644 --- a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_parameters.go +++ b/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/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go index 6af89762..e44dd9f3 100644 --- a/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go +++ b/power/client/p_cloud_disaster_recovery/pcloud_locations_disasterrecovery_getall_responses.go @@ -29,6 +29,12 @@ 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +121,76 @@ 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 +} + +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 +198,39 @@ 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 +} + 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 } @@ -121,7 +252,8 @@ func NewPcloudLocationsDisasterrecoveryGetallNotFound() *PcloudLocationsDisaster 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_events/p_cloud_events_client.go b/power/client/p_cloud_events/p_cloud_events_client.go index 7305a156..567b869d 100644 --- a/power/client/p_cloud_events/p_cloud_events_client.go +++ b/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/power/client/p_cloud_events/pcloud_events_get_parameters.go b/power/client/p_cloud_events/pcloud_events_get_parameters.go index a2b5d98e..86b44174 100644 --- a/power/client/p_cloud_events/pcloud_events_get_parameters.go +++ b/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/power/client/p_cloud_events/pcloud_events_get_responses.go b/power/client/p_cloud_events/pcloud_events_get_responses.go index ff28ed26..47f15ba5 100644 --- a/power/client/p_cloud_events/pcloud_events_get_responses.go +++ b/power/client/p_cloud_events/pcloud_events_get_responses.go @@ -35,8 +35,8 @@ func (o *PcloudEventsGetReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return nil, result - case 401: - result := NewPcloudEventsGetUnauthorized() + case 403: + result := NewPcloudEventsGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 } @@ -122,27 +184,58 @@ func (o *PcloudEventsGetBadRequest) readResponse(response runtime.ClientResponse return nil } -// NewPcloudEventsGetUnauthorized creates a PcloudEventsGetUnauthorized with default headers values -func NewPcloudEventsGetUnauthorized() *PcloudEventsGetUnauthorized { - return &PcloudEventsGetUnauthorized{} +// NewPcloudEventsGetForbidden creates a PcloudEventsGetForbidden with default headers values +func NewPcloudEventsGetForbidden() *PcloudEventsGetForbidden { + return &PcloudEventsGetForbidden{} } -/* PcloudEventsGetUnauthorized describes a response with status code 401, with default header values. +/* +PcloudEventsGetForbidden describes a response with status code 403, with default header values. -Unauthorized +Forbidden */ -type PcloudEventsGetUnauthorized struct { +type PcloudEventsGetForbidden struct { Payload *models.Error } -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) +// 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 } -func (o *PcloudEventsGetUnauthorized) GetPayload() *models.Error { + +// 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 +} + +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 *PcloudEventsGetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *PcloudEventsGetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Error) @@ -159,7 +252,8 @@ 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_events/pcloud_events_getquery_parameters.go b/power/client/p_cloud_events/pcloud_events_getquery_parameters.go index 4ee037fa..8355be3e 100644 --- a/power/client/p_cloud_events/pcloud_events_getquery_parameters.go +++ b/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/power/client/p_cloud_events/pcloud_events_getquery_responses.go b/power/client/p_cloud_events/pcloud_events_getquery_responses.go index b018f267..640dddd8 100644 --- a/power/client/p_cloud_events/pcloud_events_getquery_responses.go +++ b/power/client/p_cloud_events/pcloud_events_getquery_responses.go @@ -41,6 +41,12 @@ 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 500: result := NewPcloudEventsGetqueryInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +247,76 @@ 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 +} + +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 +} + // 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 +324,39 @@ 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 +} + 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/power/client/p_cloud_images/p_cloud_images_client.go b/power/client/p_cloud_images/p_cloud_images_client.go index be0badf8..fb30f5d6 100644 --- a/power/client/p_cloud_images/p_cloud_images_client.go +++ b/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,7 @@ func (a *Client) PcloudCloudinstancesImagesDelete(params *PcloudCloudinstancesIm } /* - PcloudCloudinstancesImagesExportPost exports an image +PcloudCloudinstancesImagesExportPost exports an image */ func (a *Client) PcloudCloudinstancesImagesExportPost(params *PcloudCloudinstancesImagesExportPostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudCloudinstancesImagesExportPostAccepted, error) { // TODO: Validate the params before sending @@ -138,7 +138,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 +177,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 +216,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 +256,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 +295,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 +334,7 @@ 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 deprecateds for pcloud v1 cloud instances cloud instance id stock images image id detailed info of an available stock image */ func (a *Client) PcloudImagesGet(params *PcloudImagesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudImagesGetOK, error) { // TODO: Validate the params before sending @@ -373,7 +373,7 @@ 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 deprecateds for pcloud v1 cloud instances cloud instance id stock images list all available stock images */ func (a *Client) PcloudImagesGetall(params *PcloudImagesGetallParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudImagesGetallOK, error) { // TODO: Validate the params before sending @@ -412,7 +412,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 +451,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 +490,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 +529,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/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_parameters.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_parameters.go index 36c1a384..38504994 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go index 27719800..c5c0a1fd 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_delete_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +257,139 @@ 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 +} + +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 +} + +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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_parameters.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_parameters.go index ec3a6247..fa5916de 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go index 0b0a6a0b..3e01975b 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_export_post_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +257,76 @@ 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 +} + +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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_cloudinstances_images_get_parameters.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_get_parameters.go index decd92c0..f1f52276 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_get_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go index d4b52ee6..5232e265 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_parameters.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_parameters.go index a0acea17..267edf75 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go index a06568fe..936d6530 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_getall_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_cloudinstances_images_post_parameters.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_post_parameters.go index cd22b7b1..48b37be0 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_post_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go index 570d8467..9f967a20 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_images_post_responses.go @@ -47,6 +47,12 @@ 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 409: result := NewPcloudCloudinstancesImagesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -75,7 +81,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 +90,39 @@ 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 +} + 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 +144,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 +153,39 @@ 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 +} + 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 +207,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 +216,39 @@ 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 +} + 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 +270,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 +279,39 @@ 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 +} + 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 +328,76 @@ 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 +} + +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 +} + // 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 +405,39 @@ 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 +} + 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 +459,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 +468,39 @@ 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 +} + 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 +522,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 +531,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_parameters.go b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_parameters.go index 071d73d8..b70b19f5 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go index 2073da1c..393fea1d 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_get_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ func NewPcloudCloudinstancesStockimagesGetNotFound() *PcloudCloudinstancesStocki 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go index cec512f7..8cc03905 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go index b30c8388..2359271d 100644 --- a/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go +++ b/power/client/p_cloud_images/pcloud_cloudinstances_stockimages_getall_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ func NewPcloudCloudinstancesStockimagesGetallNotFound() *PcloudCloudinstancesSto 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_images_get_parameters.go b/power/client/p_cloud_images/pcloud_images_get_parameters.go index 91192f6f..ce58fbc1 100644 --- a/power/client/p_cloud_images/pcloud_images_get_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_images_get_responses.go b/power/client/p_cloud_images/pcloud_images_get_responses.go index 040e27c3..bbff4fc2 100644 --- a/power/client/p_cloud_images/pcloud_images_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_images_getall_parameters.go b/power/client/p_cloud_images/pcloud_images_getall_parameters.go index cb90f6f5..008b8284 100644 --- a/power/client/p_cloud_images/pcloud_images_getall_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_images_getall_responses.go b/power/client/p_cloud_images/pcloud_images_getall_responses.go index 5be159bd..bdb5074c 100644 --- a/power/client/p_cloud_images/pcloud_images_getall_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_parameters.go b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_parameters.go index dd5a1f9a..4a97024d 100644 --- a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go index 54dad0dc..2e8683f9 100644 --- a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go +++ b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudV1CloudinstancesCosimagesGetReader) ReadResponse(response runtime 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 } @@ -89,7 +126,8 @@ func NewPcloudV1CloudinstancesCosimagesGetUnauthorized() *PcloudV1Cloudinstances 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 +135,39 @@ 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 +} + 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 +184,76 @@ 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 +} + +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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_parameters.go b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_parameters.go index 199d9e7a..6a7952ce 100644 --- a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go index ac1a8d0a..f12a354f 100644 --- a/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go +++ b/power/client/p_cloud_images/pcloud_v1_cloudinstances_cosimages_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ func NewPcloudV1CloudinstancesCosimagesPostConflict() *PcloudV1CloudinstancesCos 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_v2_images_export_get_parameters.go b/power/client/p_cloud_images/pcloud_v2_images_export_get_parameters.go index 6a7f12b2..6758df1b 100644 --- a/power/client/p_cloud_images/pcloud_v2_images_export_get_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go b/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go index a5c695a1..c336e36b 100644 --- a/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go +++ b/power/client/p_cloud_images/pcloud_v2_images_export_get_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 } @@ -89,7 +120,8 @@ func NewPcloudV2ImagesExportGetUnauthorized() *PcloudV2ImagesExportGetUnauthoriz 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 +129,39 @@ 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 +} + 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 } @@ -121,7 +183,8 @@ 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 +192,39 @@ 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 +} + 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 +246,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 +255,39 @@ 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 +} + 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/power/client/p_cloud_images/pcloud_v2_images_export_post_parameters.go b/power/client/p_cloud_images/pcloud_v2_images_export_post_parameters.go index da0c0be1..d6b4ba26 100644 --- a/power/client/p_cloud_images/pcloud_v2_images_export_post_parameters.go +++ b/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/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go b/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go index 43957ae2..3fc0394e 100644 --- a/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go +++ b/power/client/p_cloud_images/pcloud_v2_images_export_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 } @@ -171,7 +264,8 @@ 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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_instances/p_cloud_instances_client.go b/power/client/p_cloud_instances/p_cloud_instances_client.go index b8c3c3c8..7a43f878 100644 --- a/power/client/p_cloud_instances/p_cloud_instances_client.go +++ b/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/power/client/p_cloud_instances/pcloud_cloudinstances_delete_parameters.go b/power/client/p_cloud_instances/pcloud_cloudinstances_delete_parameters.go index e375cf16..69237be9 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_delete_parameters.go +++ b/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/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go index 6bd8adbb..f540d6c5 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_delete_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +124,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 +133,39 @@ 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 +} + 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 +187,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 +196,39 @@ 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 +} + 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 } @@ -157,7 +250,8 @@ 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 +259,39 @@ 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 +} + 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 +313,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 +322,39 @@ 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 +} + 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/power/client/p_cloud_instances/pcloud_cloudinstances_get_parameters.go b/power/client/p_cloud_instances/pcloud_cloudinstances_get_parameters.go index 4eda9ee4..225bf55d 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_get_parameters.go +++ b/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/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go index c7056df6..9cf834be 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_get_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_instances/pcloud_cloudinstances_put_parameters.go b/power/client/p_cloud_instances/pcloud_cloudinstances_put_parameters.go index 4e47d1af..91a04cdf 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_put_parameters.go +++ b/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/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go b/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go index 8d6cf4b5..867d9f16 100644 --- a/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go +++ b/power/client/p_cloud_instances/pcloud_cloudinstances_put_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ func NewPcloudCloudinstancesPutUnprocessableEntity() *PcloudCloudinstancesPutUnp 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_jobs/p_cloud_jobs_client.go b/power/client/p_cloud_jobs/p_cloud_jobs_client.go index 0d4c362a..37612074 100644 --- a/power/client/p_cloud_jobs/p_cloud_jobs_client.go +++ b/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/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_parameters.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_parameters.go index 9e3b31e1..0adff405 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_parameters.go +++ b/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/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go index da6ffd99..9fd1ef5b 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_delete_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +257,76 @@ 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 +} + +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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_parameters.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_parameters.go index 8b584354..8ed6f789 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_parameters.go +++ b/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/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go index b232653f..f070db0c 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_parameters.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_parameters.go index 50646a09..6a330511 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_parameters.go +++ b/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/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go b/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go index d3b942e5..c1c3ef91 100644 --- a/power/client/p_cloud_jobs/pcloud_cloudinstances_jobs_getall_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_networks/p_cloud_networks_client.go b/power/client/p_cloud_networks/p_cloud_networks_client.go index 5a08ce2c..438b0652 100644 --- a/power/client/p_cloud_networks/p_cloud_networks_client.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_delete_parameters.go b/power/client/p_cloud_networks/pcloud_networks_delete_parameters.go index ed9fd5e8..22bce1a9 100644 --- a/power/client/p_cloud_networks/pcloud_networks_delete_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_delete_responses.go b/power/client/p_cloud_networks/pcloud_networks_delete_responses.go index 8d00b97e..9e78e5f9 100644 --- a/power/client/p_cloud_networks/pcloud_networks_delete_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +257,76 @@ 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 +} + +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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_networks/pcloud_networks_get_parameters.go b/power/client/p_cloud_networks/pcloud_networks_get_parameters.go index a9694c89..f5ce21af 100644 --- a/power/client/p_cloud_networks/pcloud_networks_get_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_get_responses.go b/power/client/p_cloud_networks/pcloud_networks_get_responses.go index d66f5f1b..7d361a28 100644 --- a/power/client/p_cloud_networks/pcloud_networks_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_networks/pcloud_networks_getall_parameters.go b/power/client/p_cloud_networks/pcloud_networks_getall_parameters.go index 3ec2e1b9..a1d644b5 100644 --- a/power/client/p_cloud_networks/pcloud_networks_getall_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_getall_responses.go b/power/client/p_cloud_networks/pcloud_networks_getall_responses.go index fd07134b..83a2b58c 100644 --- a/power/client/p_cloud_networks/pcloud_networks_getall_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_getall_responses.go @@ -41,6 +41,12 @@ 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 500: result := NewPcloudNetworksGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +247,76 @@ 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 +} + +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 +} + // 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 +324,39 @@ 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 +} + 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/power/client/p_cloud_networks/pcloud_networks_ports_delete_parameters.go b/power/client/p_cloud_networks/pcloud_networks_ports_delete_parameters.go index 2782cd9e..89b04912 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_delete_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go index 45c94b02..a619f540 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_delete_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +257,139 @@ 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 +} + +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 +} + +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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_networks/pcloud_networks_ports_get_parameters.go b/power/client/p_cloud_networks/pcloud_networks_ports_get_parameters.go index cced0387..032ff418 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_get_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go index 70ff78c3..890d35d8 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_ports_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudNetworksPortsGetReader) ReadResponse(response runtime.ClientRespo 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 } @@ -89,7 +126,8 @@ 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 +135,39 @@ 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 +} + 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 +184,76 @@ 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 +} + +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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_networks/pcloud_networks_ports_getall_parameters.go b/power/client/p_cloud_networks/pcloud_networks_ports_getall_parameters.go index bae1e681..6197e3c6 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_getall_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go index 4c5a2100..2692867a 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_getall_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,139 @@ 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 +} + +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 +} + +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 +393,39 @@ 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 +} + 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/power/client/p_cloud_networks/pcloud_networks_ports_post_parameters.go b/power/client/p_cloud_networks/pcloud_networks_ports_post_parameters.go index ffeb9359..886acd02 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_post_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go index a284e8b3..1b9fad84 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_post_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +144,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 +153,39 @@ 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 +} + 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 +207,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 +216,39 @@ 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 +} + 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 +265,139 @@ 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 +} + +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 +} + +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 +405,39 @@ 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 +} + 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 +459,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 +468,39 @@ 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 +} + 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 +522,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 +531,39 @@ 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 +} + 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/power/client/p_cloud_networks/pcloud_networks_ports_put_parameters.go b/power/client/p_cloud_networks/pcloud_networks_ports_put_parameters.go index fce7c87e..d29caefc 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_put_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go b/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go index 4fc8e47d..68eaa9a9 100644 --- a/power/client/p_cloud_networks/pcloud_networks_ports_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +259,139 @@ 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 +} + +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 +} + +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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_networks/pcloud_networks_post_parameters.go b/power/client/p_cloud_networks/pcloud_networks_post_parameters.go index dea14d36..aca2c975 100644 --- a/power/client/p_cloud_networks/pcloud_networks_post_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_post_responses.go b/power/client/p_cloud_networks/pcloud_networks_post_responses.go index 27a0da33..a82d5196 100644 --- a/power/client/p_cloud_networks/pcloud_networks_post_responses.go +++ b/power/client/p_cloud_networks/pcloud_networks_post_responses.go @@ -47,6 +47,12 @@ 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 409: result := NewPcloudNetworksPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -75,7 +81,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 +90,39 @@ 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 +} + 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 +144,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 +153,39 @@ 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 +} + 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 +207,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 +216,39 @@ 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 +} + 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 +270,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 +279,39 @@ 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 +} + 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 +328,76 @@ 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 +} + +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 +} + // 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 +405,39 @@ 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 +} + 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 +459,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 +468,39 @@ 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 +} + 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 +522,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 +531,39 @@ 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 +} + 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 } diff --git a/power/client/p_cloud_networks/pcloud_networks_put_parameters.go b/power/client/p_cloud_networks/pcloud_networks_put_parameters.go index 00ef70f9..7bf87fc4 100644 --- a/power/client/p_cloud_networks/pcloud_networks_put_parameters.go +++ b/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/power/client/p_cloud_networks/pcloud_networks_put_responses.go b/power/client/p_cloud_networks/pcloud_networks_put_responses.go index 72797dcd..8a29abc1 100644 --- a/power/client/p_cloud_networks/pcloud_networks_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +259,76 @@ 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 +} + +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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go b/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go index 197fa4cf..5a10ee25 100644 --- a/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go +++ b/power/client/p_cloud_p_vm_instances/p_cloudp_vm_instances_client.go @@ -76,7 +76,7 @@ type ClientService interface { } /* - 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 +115,7 @@ 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 */ func (a *Client) PcloudPvminstancesCapturePost(params *PcloudPvminstancesCapturePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudPvminstancesCapturePostOK, *PcloudPvminstancesCapturePostAccepted, error) { // TODO: Validate the params before sending @@ -155,7 +155,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 +194,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 +233,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 +272,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 +311,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 +350,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 +389,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 +428,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 +467,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 +506,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 +545,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 +584,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 +623,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 +665,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 +704,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 +743,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 +782,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 +821,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 +860,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 diff --git a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_parameters.go index 27ae8aa3..9aed1ab0 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go index 52184b01..54376cbc 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_action_post_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +257,76 @@ 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 +} + +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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_parameters.go index 501695e6..84668e1b 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go index 436187f5..6aa8f86c 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_capture_post_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +142,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 +151,39 @@ 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 +} + 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 +203,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 +212,39 @@ 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 +} + 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 +266,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 +275,39 @@ 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 +} + 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 +324,139 @@ 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 +} + +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 +} + +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 +464,39 @@ 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 +} + 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 +518,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 +527,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_parameters.go index b51625f4..021f4c39 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go index 4d4e0510..65b6a17a 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_clone_post_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 } @@ -165,7 +258,8 @@ func NewPcloudPvminstancesClonePostConflict() *PcloudPvminstancesClonePostConfli 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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_parameters.go index 80d994b2..a0c8cc63 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go index 1caf3498..eaa17c31 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,139 @@ 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 +} + +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 +} + +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 +393,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_parameters.go index 86a27e66..3566f8bd 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go index 590e7f5b..04cfd468 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_post_responses.go @@ -35,6 +35,18 @@ func (o *PcloudPvminstancesConsolePostReader) ReadResponse(response runtime.Clie 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 { @@ -57,7 +69,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 +78,39 @@ 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 +} + 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 } @@ -89,7 +132,8 @@ func NewPcloudPvminstancesConsolePostUnauthorized() *PcloudPvminstancesConsolePo 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 +141,39 @@ 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 +} + 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 +190,139 @@ 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 +} + +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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_parameters.go index a6f70378..bffe725e 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go index c3331bef..76efa34a 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_console_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,139 @@ 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 +} + +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 +} + +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 +393,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_parameters.go index 8c369a01..61981333 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go index 18189dcd..9ff11fff 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_delete_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +257,76 @@ 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 +} + +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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_parameters.go index ebbc6f4a..da6e9ea3 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go index ddd375ee..2b311da9 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_parameters.go index 88205d33..9aea7e82 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go index f55d7623..9c7dad42 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_getall_responses.go @@ -41,6 +41,12 @@ 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 500: result := NewPcloudPvminstancesGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +247,76 @@ 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 +} + +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 +} + // 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 +324,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_parameters.go index 5b6b0ee4..cb853180 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go index 38648bbb..75436fe4 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_delete_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 } @@ -163,7 +256,8 @@ func NewPcloudPvminstancesNetworksDeleteNotFound() *PcloudPvminstancesNetworksDe 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 +265,39 @@ 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 +} + 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 +319,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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_parameters.go index c9a444ef..c9903222 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go index 1587866e..20826ba3 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_get_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 } @@ -89,7 +120,8 @@ func NewPcloudPvminstancesNetworksGetUnauthorized() *PcloudPvminstancesNetworksG 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 +129,39 @@ 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 +} + 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 } @@ -121,7 +183,8 @@ func NewPcloudPvminstancesNetworksGetNotFound() *PcloudPvminstancesNetworksGetNo 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 +192,39 @@ 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 +} + 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 +246,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 +255,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_parameters.go index 97fe7898..6871438e 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go index 79103867..000cda14 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_getall_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 +120,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 +129,39 @@ 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 +} + 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 +183,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 +192,39 @@ 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 +} + 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 } @@ -153,7 +246,8 @@ func NewPcloudPvminstancesNetworksGetallInternalServerError() *PcloudPvminstance 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 +255,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_parameters.go index 23c0b0d4..70a2d29c 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go index 4bd3ed07..71e5c164 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_networks_post_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 } @@ -165,7 +258,8 @@ func NewPcloudPvminstancesNetworksPostConflict() *PcloudPvminstancesNetworksPost 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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_parameters.go index adf92278..d21988dd 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go index a68b4319..0b259d47 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_operations_post_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 } @@ -163,7 +256,8 @@ func NewPcloudPvminstancesOperationsPostNotFound() *PcloudPvminstancesOperations 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 +265,39 @@ 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 +} + 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 +319,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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go index 4720dc28..b4982b92 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go index 7c905fb3..c7973e9e 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_post_responses.go @@ -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,39 @@ 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 +} + 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 +160,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 +169,39 @@ 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 +} + 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 +221,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 +230,39 @@ 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 +} + 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 +282,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 +291,39 @@ 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 +} + 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 +345,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 +354,39 @@ 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 +} + 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 +408,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 +417,39 @@ 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 +} + 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 +471,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 +480,39 @@ 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 +} + 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 +534,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 +543,39 @@ 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 +} + 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 +597,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 +606,39 @@ 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 +} + 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 +660,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 +669,39 @@ 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 +} + 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 +723,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 +732,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_parameters.go index 48b71a21..76102574 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go index c88a794f..d64ac657 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +259,139 @@ 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 +} + +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 +} + +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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_parameters.go index 6441ed24..c4b49ce0 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go index 9b257b3e..2cd11182 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_getall_responses.go @@ -41,8 +41,8 @@ func (o *PcloudPvminstancesSnapshotsGetallReader) ReadResponse(response runtime. return nil, err } return nil, result - case 404: - result := NewPcloudPvminstancesSnapshotsGetallNotFound() + case 403: + result := NewPcloudPvminstancesSnapshotsGetallForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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,27 +247,58 @@ func (o *PcloudPvminstancesSnapshotsGetallUnauthorized) readResponse(response ru return nil } -// NewPcloudPvminstancesSnapshotsGetallNotFound creates a PcloudPvminstancesSnapshotsGetallNotFound with default headers values -func NewPcloudPvminstancesSnapshotsGetallNotFound() *PcloudPvminstancesSnapshotsGetallNotFound { - return &PcloudPvminstancesSnapshotsGetallNotFound{} +// NewPcloudPvminstancesSnapshotsGetallForbidden creates a PcloudPvminstancesSnapshotsGetallForbidden with default headers values +func NewPcloudPvminstancesSnapshotsGetallForbidden() *PcloudPvminstancesSnapshotsGetallForbidden { + return &PcloudPvminstancesSnapshotsGetallForbidden{} } -/* PcloudPvminstancesSnapshotsGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudPvminstancesSnapshotsGetallForbidden describes a response with status code 403, with default header values. -Not Found +Forbidden */ -type PcloudPvminstancesSnapshotsGetallNotFound struct { +type PcloudPvminstancesSnapshotsGetallForbidden struct { Payload *models.Error } -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) +// 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 +} + +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 *PcloudPvminstancesSnapshotsGetallNotFound) GetPayload() *models.Error { + +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 *PcloudPvminstancesSnapshotsGetallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *PcloudPvminstancesSnapshotsGetallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Error) @@ -191,7 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_parameters.go index 551a20e4..f2e94483 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go index a1f95722..67270998 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_post_responses.go +++ b/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,6 +65,12 @@ 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()) } @@ -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,39 @@ 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 +} + 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 +144,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 +153,39 @@ 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 +} + 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 +207,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 +216,39 @@ 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 +} + 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 +265,76 @@ 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 +} + +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 +342,39 @@ 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 +} + 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 +396,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 +405,39 @@ 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 +} + 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 +459,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 +468,39 @@ 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 +} + 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 +516,66 @@ 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 +} + +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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_parameters.go index 9a56a1f7..608c6d51 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go index 5dbfbac8..ae57f99b 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_pvminstances_snapshots_restore_post_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +259,139 @@ 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 +} + +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 +} + +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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_parameters.go index 8519057e..caa2694f 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go index d53cfa0b..c235af7c 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_get_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 } @@ -89,7 +120,8 @@ func NewPcloudV2PvminstancesCaptureGetUnauthorized() *PcloudV2PvminstancesCaptur 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 +129,39 @@ 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 +} + 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 } @@ -121,7 +183,8 @@ func NewPcloudV2PvminstancesCaptureGetNotFound() *PcloudV2PvminstancesCaptureGet 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 +192,39 @@ 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 +} + 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 +246,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 +255,39 @@ 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 +} + 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/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_parameters.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_parameters.go index 2a09a266..37804b37 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_parameters.go +++ b/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/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go index 787b81fa..ceb2edde 100644 --- a/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go +++ b/power/client/p_cloud_p_vm_instances/pcloud_v2_pvminstances_capture_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 } @@ -171,7 +264,8 @@ func NewPcloudV2PvminstancesCapturePostNotFound() *PcloudV2PvminstancesCapturePo 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 */ @@ -179,9 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go b/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go index 85828def..801e58e2 100644 --- a/power/client/p_cloud_placement_groups/p_cloud_placement_groups_client.go +++ b/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/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go index a81176ab..c028be24 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_parameters.go +++ b/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/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go index 7052f606..9ea94566 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_delete_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsDeleteReader) ReadResponse(response runtime.Client return nil, err } return nil, result + case 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +124,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 +133,39 @@ 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 +} + 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 +182,76 @@ func (o *PcloudPlacementgroupsDeleteBadRequest) readResponse(response runtime.Cl 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 +} + +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 +259,39 @@ 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 +} + 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 +313,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 +322,39 @@ 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 +} + 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/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go index 7c9106fc..f9334942 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_parameters.go +++ b/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/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go index 8a3a7acf..a93b11c7 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsGetReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +184,76 @@ func (o *PcloudPlacementgroupsGetBadRequest) readResponse(response runtime.Clien 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 +} + +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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go index 07366c2d..a4fb1188 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_parameters.go +++ b/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/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go index 7263ac5f..5fc38490 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_getall_responses.go @@ -41,6 +41,12 @@ 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 500: result := NewPcloudPlacementgroupsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +247,76 @@ 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 +} + +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 +} + // 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 +324,39 @@ 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 +} + 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/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go index c860277a..5c7fd401 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_parameters.go +++ b/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/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go index 51317876..924593df 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_delete_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsMembersDeleteReader) ReadResponse(response runtime return nil, err } return nil, result + case 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 { @@ -69,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +196,76 @@ func (o *PcloudPlacementgroupsMembersDeleteBadRequest) readResponse(response run 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 +} + +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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go index 8f9106c1..cdbaa913 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_parameters.go +++ b/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/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go index c7d53f93..1ff1f2b3 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_members_post_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsMembersPostReader) ReadResponse(response runtime.C return nil, err } return nil, result + case 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 { @@ -69,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +196,76 @@ func (o *PcloudPlacementgroupsMembersPostBadRequest) readResponse(response runti 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 +} + +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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go index 2bb2348a..abdf6844 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_parameters.go +++ b/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/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go b/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go index 448359f1..f00c3422 100644 --- a/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go +++ b/power/client/p_cloud_placement_groups/pcloud_placementgroups_post_responses.go @@ -35,6 +35,12 @@ func (o *PcloudPlacementgroupsPostReader) ReadResponse(response runtime.ClientRe 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 409: result := NewPcloudPlacementgroupsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -63,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +190,76 @@ func (o *PcloudPlacementgroupsPostBadRequest) readResponse(response runtime.Clie 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 +} + +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 +} + // 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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_s_a_p/p_cloudsap_client.go b/power/client/p_cloud_s_a_p/p_cloudsap_client.go index 0504c37c..917e5395 100644 --- a/power/client/p_cloud_s_a_p/p_cloudsap_client.go +++ b/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/power/client/p_cloud_s_a_p/pcloud_sap_get_parameters.go b/power/client/p_cloud_s_a_p/pcloud_sap_get_parameters.go index 76081ddb..b9d629fc 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_get_parameters.go +++ b/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/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go index 395448fd..a2536b00 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_get_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_s_a_p/pcloud_sap_getall_parameters.go b/power/client/p_cloud_s_a_p/pcloud_sap_getall_parameters.go index 725a1afc..108da8cd 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_getall_parameters.go +++ b/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/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go index 97b35e04..09da6635 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_getall_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 +120,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 +129,39 @@ 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 +} + 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 +183,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 +192,39 @@ 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 +} + 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 } @@ -153,7 +246,8 @@ 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 +255,39 @@ 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 +} + 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/power/client/p_cloud_s_a_p/pcloud_sap_post_parameters.go b/power/client/p_cloud_s_a_p/pcloud_sap_post_parameters.go index 1b8ad094..fd17be92 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_post_parameters.go +++ b/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/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go b/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go index 802291ee..49764e07 100644 --- a/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go +++ b/power/client/p_cloud_s_a_p/pcloud_sap_post_responses.go @@ -81,7 +81,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 +90,39 @@ 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 +} + 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 +142,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 +151,39 @@ 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 +} + 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 +203,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 +212,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 } @@ -235,7 +390,8 @@ 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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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 +516,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 +525,39 @@ 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 +} + 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/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go b/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go index 1783fd6d..6407002a 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/p_cloudspp_placement_groups_client.go +++ b/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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_parameters.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_parameters.go index 8c52195d..5854efdd 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_parameters.go +++ b/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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go index abcd38a5..6360af65 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_delete_responses.go @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +262,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 +271,39 @@ 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 +} + 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 +325,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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_parameters.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_parameters.go index dcaeb4c1..01e7b181 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_parameters.go +++ b/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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go index e6aed10b..598fbcb8 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_get_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ func NewPcloudSppplacementgroupsGetNotFound() *PcloudSppplacementgroupsGetNotFou 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_parameters.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_parameters.go index 002a26d1..7a88075d 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_parameters.go +++ b/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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go index c8981685..e84cc496 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_getall_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_parameters.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_parameters.go index bc898f3b..f6eda86e 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_parameters.go +++ b/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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go index 1eb9bc52..b767ae66 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_delete_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_parameters.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_parameters.go index 1a3362f9..8db44d08 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_parameters.go +++ b/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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go index ae3c476e..904dbebf 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go @@ -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,39 @@ 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 +} + 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 +144,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 +153,39 @@ 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 +} + 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 +207,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 +216,39 @@ 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 +} + 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 +270,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 +279,39 @@ 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 +} + 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 +333,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 +342,39 @@ 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 +} + 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 +396,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 +405,39 @@ 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 +} + 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 +459,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 +468,39 @@ 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 +} + 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 +522,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 +531,39 @@ 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 +} + 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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_parameters.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_parameters.go index 7246e4c4..614dec0a 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_parameters.go +++ b/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/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go index 0f89dedf..4972e6a1 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ func NewPcloudSppplacementgroupsPostConflict() *PcloudSppplacementgroupsPostConf 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go b/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go index ddf143b6..4c13670f 100644 --- a/power/client/p_cloud_service_d_h_c_p/p_cloud_servicedhcp_client.go +++ b/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/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_parameters.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_parameters.go index 3869c756..9cfd2aa2 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_parameters.go +++ b/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/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go index f108dada..81756033 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_delete_responses.go @@ -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,39 @@ 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 +} + 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 +124,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 +133,39 @@ 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 +} + 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 +187,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 +196,39 @@ 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 +} + 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 +250,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 +259,39 @@ 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 +} + 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 +313,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 +322,39 @@ 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 +} + 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/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_parameters.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_parameters.go index 341c63d4..2b581e4f 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_parameters.go +++ b/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/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go index 533dd79a..dc96eeab 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_get_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 } @@ -127,7 +189,8 @@ 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 +198,39 @@ 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 +} + 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 +252,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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_parameters.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_parameters.go index 52bbb848..723a3bdc 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_parameters.go +++ b/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/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go index 3aeb4415..5f97ba10 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_getall_responses.go @@ -51,7 +51,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 +60,39 @@ 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 +} + 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 } @@ -81,7 +112,8 @@ 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 +121,39 @@ 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 +} + 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 } @@ -113,7 +175,8 @@ func NewPcloudDhcpGetallInternalServerError() *PcloudDhcpGetallInternalServerErr 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 +184,39 @@ 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 +} + 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/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_parameters.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_parameters.go index d16312a1..decad440 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_parameters.go +++ b/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/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go index 7b5b6850..a9f88693 100644 --- a/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go +++ b/power/client/p_cloud_service_d_h_c_p/pcloud_dhcp_post_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 +120,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 +129,39 @@ 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 +} + 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 } @@ -121,7 +183,8 @@ 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 +192,39 @@ 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 +} + 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 } @@ -153,7 +246,8 @@ 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 +255,39 @@ 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 +} + 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/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go b/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go index be4b3b8f..7c4e27a7 100644 --- a/power/client/p_cloud_shared_processor_pools/p_cloud_shared_processor_pools_client.go +++ b/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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_parameters.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_parameters.go index 484d1c6f..3f18e084 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_parameters.go +++ b/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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go index 4b5cd9c7..ecc7e026 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_delete_responses.go @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +262,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 +271,39 @@ 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 +} + 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 +325,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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_parameters.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_parameters.go index 1a064000..d98083fe 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_parameters.go +++ b/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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go index 06ce4fce..ea466d8c 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_get_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ func NewPcloudSharedprocessorpoolsGetNotFound() *PcloudSharedprocessorpoolsGetNo 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_parameters.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_parameters.go index 0a6d3701..3a2744c2 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_parameters.go +++ b/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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go index d9a0edb8..c66d3267 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_getall_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_parameters.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_parameters.go index 79362013..0a8865f4 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_parameters.go +++ b/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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go index f99e64e1..ba2af46a 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ func NewPcloudSharedprocessorpoolsPostConflict() *PcloudSharedprocessorpoolsPost 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_parameters.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_parameters.go index 77011245..b464b907 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_parameters.go +++ b/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/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go index 6c4490d7..94df0202 100644 --- a/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go +++ b/power/client/p_cloud_shared_processor_pools/pcloud_sharedprocessorpools_put_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go b/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go index 173f4442..cfadbbb1 100644 --- a/power/client/p_cloud_snapshots/p_cloud_snapshots_client.go +++ b/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/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_parameters.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_parameters.go index ce101373..b054bf63 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_parameters.go +++ b/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/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go index db473201..caf93af3 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_delete_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +257,76 @@ 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 +} + +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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_parameters.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_parameters.go index 58857dc0..d7c7a54e 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_parameters.go +++ b/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/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go index 44ebe000..e3fcdc86 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_parameters.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_parameters.go index 281b7062..dcb111dc 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_parameters.go +++ b/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/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go index c4dee1b5..a9930407 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go +++ b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_getall_responses.go @@ -41,6 +41,12 @@ 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 500: result := NewPcloudCloudinstancesSnapshotsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +247,76 @@ 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 +} + +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 +} + // 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 +324,39 @@ 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 +} + 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/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_parameters.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_parameters.go index 268a2dfe..8692b110 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_parameters.go +++ b/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/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go b/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go index 5dd9d99f..157bb704 100644 --- a/power/client/p_cloud_snapshots/pcloud_cloudinstances_snapshots_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 +251,76 @@ 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 +} + +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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go b/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go index 061b5272..cd76cbf1 100644 --- a/power/client/p_cloud_storage_capacity/p_cloud_storage_capacity_client.go +++ b/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/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_parameters.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_parameters.go index c2d5df80..685a5b57 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_parameters.go +++ b/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/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go index d6abdcf9..bad1ca8d 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudStoragecapacityPoolsGetReader) ReadResponse(response runtime.Clie 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 } @@ -89,7 +126,8 @@ func NewPcloudStoragecapacityPoolsGetUnauthorized() *PcloudStoragecapacityPoolsG 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 +135,39 @@ 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 +} + 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 +184,76 @@ 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 +} + +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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_parameters.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_parameters.go index e955e007..4b3075cd 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_parameters.go +++ b/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/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go index 6aa16ffe..b054fd75 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_pools_getall_responses.go @@ -35,6 +35,12 @@ func (o *PcloudStoragecapacityPoolsGetallReader) ReadResponse(response runtime.C 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 500: result := NewPcloudStoragecapacityPoolsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -51,7 +57,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 +66,39 @@ 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 +} + 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 } @@ -83,7 +120,8 @@ func NewPcloudStoragecapacityPoolsGetallUnauthorized() *PcloudStoragecapacityPoo 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 +129,39 @@ 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 +} + 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 +178,76 @@ 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 +} + +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 +} + // 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 +255,39 @@ 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 +} + 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/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_parameters.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_parameters.go index 51f3bb9b..a39e232a 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_parameters.go +++ b/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/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go index 3623f47c..334c73a3 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudStoragecapacityTypesGetReader) ReadResponse(response runtime.Clie 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 } @@ -89,7 +126,8 @@ func NewPcloudStoragecapacityTypesGetUnauthorized() *PcloudStoragecapacityTypesG 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 +135,39 @@ 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 +} + 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 +184,76 @@ 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 +} + +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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_parameters.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_parameters.go index 50519ea2..62a3922f 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_parameters.go +++ b/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/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go index 97595cd3..bbefc007 100644 --- a/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go +++ b/power/client/p_cloud_storage_capacity/pcloud_storagecapacity_types_getall_responses.go @@ -35,6 +35,12 @@ func (o *PcloudStoragecapacityTypesGetallReader) ReadResponse(response runtime.C 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 500: result := NewPcloudStoragecapacityTypesGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -51,7 +57,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 +66,39 @@ 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 +} + 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 } @@ -83,7 +120,8 @@ func NewPcloudStoragecapacityTypesGetallUnauthorized() *PcloudStoragecapacityTyp 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 +129,39 @@ 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 +} + 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 +178,76 @@ 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 +} + +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 +} + // 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 +255,39 @@ 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 +} + 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/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go b/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go index a94da9c2..a2c33346 100644 --- a/power/client/p_cloud_system_pools/p_cloud_system_pools_client.go +++ b/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/power/client/p_cloud_system_pools/pcloud_systempools_get_parameters.go b/power/client/p_cloud_system_pools/pcloud_systempools_get_parameters.go index a727b64e..13617473 100644 --- a/power/client/p_cloud_system_pools/pcloud_systempools_get_parameters.go +++ b/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/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go b/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go index 78089d7a..6a0ecb42 100644 --- a/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go +++ b/power/client/p_cloud_system_pools/pcloud_systempools_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudSystempoolsGetReader) ReadResponse(response runtime.ClientRespons 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 500: result := NewPcloudSystempoolsGetInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -51,7 +57,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 +66,39 @@ 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 +} + 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 } @@ -81,7 +118,8 @@ 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 +127,39 @@ 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 +} + 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 +176,76 @@ 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 +} + +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 +} + // 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 +253,39 @@ 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 +} + 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/power/client/p_cloud_tasks/p_cloud_tasks_client.go b/power/client/p_cloud_tasks/p_cloud_tasks_client.go index 22d71e5e..9327245f 100644 --- a/power/client/p_cloud_tasks/p_cloud_tasks_client.go +++ b/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/power/client/p_cloud_tasks/pcloud_tasks_delete_parameters.go b/power/client/p_cloud_tasks/pcloud_tasks_delete_parameters.go index 641d712b..ad07c23e 100644 --- a/power/client/p_cloud_tasks/pcloud_tasks_delete_parameters.go +++ b/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/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go b/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go index 63e82c88..bd6f95f1 100644 --- a/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go +++ b/power/client/p_cloud_tasks/pcloud_tasks_delete_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 } @@ -163,7 +256,8 @@ 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 +265,39 @@ 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 +} + 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 +319,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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_tasks/pcloud_tasks_get_parameters.go b/power/client/p_cloud_tasks/pcloud_tasks_get_parameters.go index 756ff392..5fd5d905 100644 --- a/power/client/p_cloud_tasks/pcloud_tasks_get_parameters.go +++ b/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/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go b/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go index 607e52aa..02f313aa 100644 --- a/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go +++ b/power/client/p_cloud_tasks/pcloud_tasks_get_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_tenants/p_cloud_tenants_client.go b/power/client/p_cloud_tenants/p_cloud_tenants_client.go index 48cd87d9..4d2b50aa 100644 --- a/power/client/p_cloud_tenants/p_cloud_tenants_client.go +++ b/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/power/client/p_cloud_tenants/pcloud_tenants_get_parameters.go b/power/client/p_cloud_tenants/pcloud_tenants_get_parameters.go index f6106bae..43c00134 100644 --- a/power/client/p_cloud_tenants/pcloud_tenants_get_parameters.go +++ b/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/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go b/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go index a6ca2731..81df0f46 100644 --- a/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go +++ b/power/client/p_cloud_tenants/pcloud_tenants_get_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_tenants/pcloud_tenants_put_parameters.go b/power/client/p_cloud_tenants/pcloud_tenants_put_parameters.go index 182262c5..a6a09a26 100644 --- a/power/client/p_cloud_tenants/pcloud_tenants_put_parameters.go +++ b/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/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go b/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go index 75fec044..ec9354a1 100644 --- a/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go +++ b/power/client/p_cloud_tenants/pcloud_tenants_put_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ func NewPcloudTenantsPutUnprocessableEntity() *PcloudTenantsPutUnprocessableEnti 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go b/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go index d05737fe..90906d7e 100644 --- a/power/client/p_cloud_tenants_ssh_keys/p_cloud_tenants_ssh_keys_client.go +++ b/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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_parameters.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_parameters.go index 0de6c32d..0e02e65b 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_parameters.go +++ b/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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go index 2c0f8aa2..96bbb44d 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_delete_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +124,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 +133,39 @@ 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 +} + 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 +187,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 +196,39 @@ 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 +} + 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 } @@ -157,7 +250,8 @@ 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 +259,39 @@ 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 +} + 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 +313,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 +322,39 @@ 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 +} + 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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_parameters.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_parameters.go index 574cc6ae..d6eb5818 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_parameters.go +++ b/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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go index f49bad3c..45c18f33 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_parameters.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_parameters.go index 0e0e30b0..ce7cb34d 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_parameters.go +++ b/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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go index 700ea0eb..a6d47c02 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_getall_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_parameters.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_parameters.go index 0f65423a..1db66eb5 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_parameters.go +++ b/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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go index 2717b7ea..86e3548e 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_parameters.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_parameters.go index af532745..dec8247f 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_parameters.go +++ b/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/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go index 5d091866..e99f7a53 100644 --- a/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go +++ b/power/client/p_cloud_tenants_ssh_keys/pcloud_tenants_sshkeys_put_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 } @@ -159,7 +252,8 @@ func NewPcloudTenantsSshkeysPutUnprocessableEntity() *PcloudTenantsSshkeysPutUnp 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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go b/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go index 95a58fbe..33aac598 100644 --- a/power/client/p_cloud_v_p_n_connections/p_cloudvpn_connections_client.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_parameters.go index 6bb03a9b..17957da7 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go index cd546b15..cad588ee 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_delete_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_parameters.go index 9e34b496..a9a6cc5a 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go index 79413add..d47a6ab5 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_get_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_parameters.go index 08d55e3a..d5e20f44 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go index 487398c7..9d7a1e29 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_getall_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_parameters.go index a7b4b14a..30362f81 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go index 4d2685a4..6ac2e4ce 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_delete_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_parameters.go index a09738cf..10be75f0 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go index de86c27f..2b1a0666 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_get_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_parameters.go index 1cd48aa1..9d7258f9 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go index 4bcc8502..432e9711 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_networks_put_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_parameters.go index 5834aeab..998b5673 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go index 5b6d05ba..24d66b80 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_delete_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 } @@ -197,7 +321,8 @@ func NewPcloudVpnconnectionsPeersubnetsDeleteUnprocessableEntity() *PcloudVpncon 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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_parameters.go index d17411fd..8e05c88f 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go index 6f9e64ef..f063e12c 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_get_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_parameters.go index 0f74fcc1..4d15c6d5 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go index a9967c9a..566dba05 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_peersubnets_put_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 } @@ -197,7 +321,8 @@ func NewPcloudVpnconnectionsPeersubnetsPutUnprocessableEntity() *PcloudVpnconnec 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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_parameters.go index 0c101621..ae5b6423 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go index c4f1f0a6..95ac1756 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_parameters.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_parameters.go index 5775cb00..55b6b90c 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_parameters.go +++ b/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/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go index 2e2026de..0057c177 100644 --- a/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go +++ b/power/client/p_cloud_v_p_n_connections/pcloud_vpnconnections_put_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go b/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go index 677be4f2..65300d6d 100644 --- a/power/client/p_cloud_v_p_n_policies/p_cloudvpn_policies_client.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_parameters.go index 7463101d..cebd8de7 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go index 6e717941..a580929f 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_delete_responses.go @@ -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,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 +256,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 +265,39 @@ 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 +} + 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 +319,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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_parameters.go index 9a0318cf..7c6ac1e8 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go index d6d3b799..2cfeec40 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_get_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_parameters.go index c83d29a4..a72e0935 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go index 8286d8f0..101b375d 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_getall_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_parameters.go index 57d82f09..5fdca243 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go index 3b3d8196..35073063 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_post_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_parameters.go index c845b8ae..3301ab28 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go index b9350c86..92ec5b78 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ikepolicies_put_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 } @@ -197,7 +321,8 @@ func NewPcloudIkepoliciesPutUnprocessableEntity() *PcloudIkepoliciesPutUnprocess 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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_parameters.go index fdd67659..00f4b2ec 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go index 0d01bf97..592bdb79 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_delete_responses.go @@ -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,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 +256,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 +265,39 @@ 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 +} + 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 +319,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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_parameters.go index 8f24e703..c1aee0b1 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go index ddaa9a9b..7daad242 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_get_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_parameters.go index 6d9a00d3..8b092989 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go index 92925b59..14cd58f6 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_getall_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_parameters.go index a09d4300..2d95ce87 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go index 20620cea..98047537 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_parameters.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_parameters.go index 4849277e..fa5acb3e 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_parameters.go +++ b/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/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go index feb15131..85d5e30f 100644 --- a/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go +++ b/power/client/p_cloud_v_p_n_policies/pcloud_ipsecpolicies_put_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go b/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go index 90d69dad..78d0d2bb 100644 --- a/power/client/p_cloud_volume_groups/p_cloud_volume_groups_client.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_parameters.go index 703cd1b0..026ef99a 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go index 4924180e..4de6e390 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_action_post_responses.go @@ -47,6 +47,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 { @@ -63,7 +69,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 +78,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 } @@ -125,7 +193,8 @@ func NewPcloudVolumegroupsActionPostForbidden() *PcloudVolumegroupsActionPostFor 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 +202,39 @@ 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 +} + 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 +256,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 +265,39 @@ 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 +} + 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 +314,76 @@ 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 +} + +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 +391,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_parameters.go index d2e33ce0..c7e1629b 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go index 2fa8dc5e..a0902b1a 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_delete_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 +251,76 @@ 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 +} + +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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_parameters.go index 08ce9f5b..de511e1a 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go index c3811889..91422667 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_details_responses.go @@ -35,6 +35,12 @@ func (o *PcloudVolumegroupsGetDetailsReader) ReadResponse(response runtime.Clien return nil, err } return nil, result + case 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +184,76 @@ func (o *PcloudVolumegroupsGetDetailsBadRequest) readResponse(response runtime.C 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 +} + +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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_parameters.go index e72fa7f5..96ad516d 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go index 178a7d2a..99f15c1d 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_get_responses.go @@ -35,6 +35,12 @@ func (o *PcloudVolumegroupsGetReader) ReadResponse(response runtime.ClientRespon return nil, err } return nil, result + case 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 { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +184,76 @@ func (o *PcloudVolumegroupsGetBadRequest) readResponse(response runtime.ClientRe 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 +} + +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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_parameters.go index d6de6a44..a21f1220 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go index 141ab582..b92688b8 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_details_responses.go @@ -41,6 +41,12 @@ 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 500: result := NewPcloudVolumegroupsGetallDetailsInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +247,76 @@ 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 +} + +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 +} + // 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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_parameters.go index ab561370..2c3e2a13 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go index 540752d2..1cf8cc6c 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_getall_responses.go @@ -41,6 +41,12 @@ 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 500: result := NewPcloudVolumegroupsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -57,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +247,76 @@ 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 +} + +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 +} + // 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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_parameters.go index 9c43bbb6..706f7761 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go index d57cc92d..6fb47f1e 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_post_responses.go @@ -47,6 +47,12 @@ 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 409: result := NewPcloudVolumegroupsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -81,7 +87,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 +96,39 @@ 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 +} + 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 +150,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 +159,39 @@ 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 +} + 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 +213,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 +222,39 @@ 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 +} + 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 +276,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 +285,39 @@ 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 +} + 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 +334,76 @@ 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 +} + +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 +} + // 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 +411,39 @@ 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 +} + 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 +465,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 +474,39 @@ 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 +} + 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 +528,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 +537,39 @@ 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 +} + 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 +591,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 +600,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_parameters.go index f99b17e9..b97a3cc9 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go index 0a2085ee..eb647a79 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +142,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 +151,39 @@ 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 +} + 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 +205,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 +214,39 @@ 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 +} + 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 +263,76 @@ 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 +} + +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 +340,39 @@ 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 +} + 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 +394,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 +403,39 @@ 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 +} + 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 +457,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 +466,39 @@ 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 +} + 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 +520,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 +529,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_parameters.go index 52ef79a2..7e4a5784 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go index a081f2db..32f3672f 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_remote_copy_relationships_get_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 } @@ -133,7 +195,8 @@ func NewPcloudVolumegroupsRemoteCopyRelationshipsGetForbidden() *PcloudVolumegro 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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_parameters.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_parameters.go index 6f464a68..2ca4cb52 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_parameters.go +++ b/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/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go b/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go index a89339f4..de06ecc4 100644 --- a/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go +++ b/power/client/p_cloud_volume_groups/pcloud_volumegroups_storage_details_get_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 } @@ -133,7 +195,8 @@ func NewPcloudVolumegroupsStorageDetailsGetForbidden() *PcloudVolumegroupsStorag 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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go b/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go index 856f9ee9..5e84664f 100644 --- a/power/client/p_cloud_volume_onboarding/p_cloud_volume_onboarding_client.go +++ b/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/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_parameters.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_parameters.go index fb01ac17..3fc2f3fd 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_parameters.go +++ b/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/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go index bf5ee186..ac781267 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_parameters.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_parameters.go index ffcf2db0..5cb9db5e 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_parameters.go +++ b/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/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go index aa3f9de0..5c75ce5e 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go +++ b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_getall_responses.go @@ -41,8 +41,8 @@ func (o *PcloudVolumeOnboardingGetallReader) ReadResponse(response runtime.Clien return nil, err } return nil, result - case 404: - result := NewPcloudVolumeOnboardingGetallNotFound() + case 403: + result := NewPcloudVolumeOnboardingGetallForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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,27 +247,58 @@ func (o *PcloudVolumeOnboardingGetallUnauthorized) readResponse(response runtime return nil } -// NewPcloudVolumeOnboardingGetallNotFound creates a PcloudVolumeOnboardingGetallNotFound with default headers values -func NewPcloudVolumeOnboardingGetallNotFound() *PcloudVolumeOnboardingGetallNotFound { - return &PcloudVolumeOnboardingGetallNotFound{} +// NewPcloudVolumeOnboardingGetallForbidden creates a PcloudVolumeOnboardingGetallForbidden with default headers values +func NewPcloudVolumeOnboardingGetallForbidden() *PcloudVolumeOnboardingGetallForbidden { + return &PcloudVolumeOnboardingGetallForbidden{} } -/* PcloudVolumeOnboardingGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudVolumeOnboardingGetallForbidden describes a response with status code 403, with default header values. -Not Found +Forbidden */ -type PcloudVolumeOnboardingGetallNotFound struct { +type PcloudVolumeOnboardingGetallForbidden struct { Payload *models.Error } -func (o *PcloudVolumeOnboardingGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/onboarding][%d] pcloudVolumeOnboardingGetallNotFound %+v", 404, o.Payload) +// 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 +} + +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 *PcloudVolumeOnboardingGetallNotFound) GetPayload() *models.Error { + +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 *PcloudVolumeOnboardingGetallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *PcloudVolumeOnboardingGetallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Error) @@ -191,7 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_parameters.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_parameters.go index a61d8f90..5b0ae450 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_parameters.go +++ b/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/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go index d400d947..0a53828b 100644 --- a/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go +++ b/power/client/p_cloud_volume_onboarding/pcloud_volume_onboarding_post_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 } @@ -197,7 +321,8 @@ 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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/p_cloud_volumes_client.go b/power/client/p_cloud_volumes/p_cloud_volumes_client.go index d10ec624..acfa25fb 100644 --- a/power/client/p_cloud_volumes/p_cloud_volumes_client.go +++ b/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,7 @@ func (a *Client) PcloudV2VolumescloneStartPost(params *PcloudV2VolumescloneStart } /* - PcloudVolumesClonePost creates a volume clone for specified volumes +PcloudVolumesClonePost creates a volume clone for specified volumes */ func (a *Client) PcloudVolumesClonePost(params *PcloudVolumesClonePostParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PcloudVolumesClonePostOK, error) { // TODO: Validate the params before sending diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_parameters.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_parameters.go index a66e7a29..fbe61b97 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go index 89a7e126..f6b8f3f5 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +262,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 +271,39 @@ 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 +} + 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 +325,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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_parameters.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_parameters.go index d6066439..28c1c34e 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go index b8da1c3b..98a0223c 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_delete_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +262,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 +271,39 @@ 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 +} + 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 +320,76 @@ 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 +} + +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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_parameters.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_parameters.go index da03434d..6e582833 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go index 11456a4e..a0540696 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_flash_copy_mappings_get_responses.go @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +262,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 +271,39 @@ 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 +} + 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 +325,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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_parameters.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_parameters.go index df8f8e69..5cefa5cf 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go index 896d21be..ec93fbd9 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_parameters.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_parameters.go index 25ac732c..0c39df16 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go index 88e6badb..041bdcaa 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_getall_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_parameters.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_parameters.go index 456bf17a..e0d7ac73 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go index a8596908..b051afb3 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ func NewPcloudCloudinstancesVolumesPostConflict() *PcloudCloudinstancesVolumesPo 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_parameters.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_parameters.go index 3c0e47c9..df41f14e 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go index 37837d85..b2134932 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +144,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 +153,39 @@ 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 +} + 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 +207,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 +216,39 @@ 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 +} + 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 +265,139 @@ 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 +} + +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 +} + +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 +405,39 @@ 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 +} + 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 +459,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 +468,39 @@ 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 +} + 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 +522,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 +531,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_parameters.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_parameters.go index af419540..6b20d718 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go index 6d5f81f0..6a522d62 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_remote_copy_relationship_get_responses.go @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 +327,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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_parameters.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_parameters.go index 0facc81b..94d56f06 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go index 7965aa2c..d425113e 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_delete_responses.go @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +262,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 +271,39 @@ 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 +} + 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 +325,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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_parameters.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_parameters.go index 0307f189..ddd51932 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go index fa119079..d3772a52 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_parameters.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_parameters.go index ad7ca531..f4f012b3 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go index 7e983529..dd7933fa 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_getall_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_parameters.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_parameters.go index e6144e82..b76bf3cc 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go index 85de2ff7..22bf8994 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_post_responses.go @@ -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,39 @@ 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 +} + 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 +136,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 +145,39 @@ 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 +} + 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 +199,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 +208,39 @@ 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 +} + 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 +262,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 +271,39 @@ 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 +} + 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 +325,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 +334,39 @@ 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 +} + 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 +388,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 +397,39 @@ 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 +} + 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 +451,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 +460,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_parameters.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_parameters.go index 01ba400c..1d32c93e 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go index a9da1b15..43bd5dce 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go +++ b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_put_responses.go @@ -35,6 +35,18 @@ func (o *PcloudPvminstancesVolumesPutReader) ReadResponse(response runtime.Clien 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 { @@ -51,7 +63,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 +72,39 @@ 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 +} + 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 +124,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 +133,39 @@ 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 +} + 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 +182,139 @@ func (o *PcloudPvminstancesVolumesPutBadRequest) readResponse(response runtime.C 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 +} + +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 +} + +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 +322,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_parameters.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_parameters.go index 77fab0cb..2480b961 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go b/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go index 0842e8f1..1d2786cd 100644 --- a/power/client/p_cloud_volumes/pcloud_pvminstances_volumes_setboot_put_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 +251,76 @@ 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 +} + +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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go index ba0f3192..5a1b49df 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go index 38479deb..40799bc9 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_pvminstances_volumes_post_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 } @@ -165,7 +258,8 @@ func NewPcloudV2PvminstancesVolumesPostNotFound() *PcloudV2PvminstancesVolumesPo 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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_parameters.go index 99a119e9..3f81a918 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go index b505cb9b..661daa32 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_parameters.go index b75497e1..0143dd91 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go index a5949186..417e4533 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_clonetasks_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +259,76 @@ 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 +} + +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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumes_post_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_post_parameters.go index 6ec3d108..ba3f0d54 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go index f9abc5c3..231d17d0 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go @@ -75,7 +75,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 +84,39 @@ 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 +} + 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 +138,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 +147,39 @@ 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 +} + 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 +201,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 +210,39 @@ 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 +} + 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 +264,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 +273,39 @@ 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 +} + 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 } @@ -203,7 +327,8 @@ 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 +336,39 @@ 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 +} + 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 +390,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 +399,39 @@ 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 +} + 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 +453,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 +462,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_parameters.go index a71bc1d7..40b73374 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go index 784ad3b1..ee3ae630 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 } @@ -95,7 +126,8 @@ func NewPcloudV2VolumescloneCancelPostUnauthorized() *PcloudV2VolumescloneCancel 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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +252,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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_parameters.go index bee81198..bf3ea7fe 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go index 663e0c9f..eca1cafd 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go @@ -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,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 +256,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 +265,39 @@ 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 +} + 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 +319,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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_parameters.go index f3d74219..d19d9205 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go index 064daf76..df760877 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 +321,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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_parameters.go index 0a9c293e..aec6578e 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go index f1dfe63f..f6401774 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_get_responses.go +++ b/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 { @@ -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,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +253,76 @@ 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 +} + +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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_parameters.go index f18506d0..5bd97558 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go index ed1b6660..4fcff9d3 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_getall_responses.go @@ -41,8 +41,8 @@ func (o *PcloudV2VolumescloneGetallReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result - case 404: - result := NewPcloudV2VolumescloneGetallNotFound() + case 403: + result := NewPcloudV2VolumescloneGetallForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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,27 +247,58 @@ func (o *PcloudV2VolumescloneGetallUnauthorized) readResponse(response runtime.C return nil } -// NewPcloudV2VolumescloneGetallNotFound creates a PcloudV2VolumescloneGetallNotFound with default headers values -func NewPcloudV2VolumescloneGetallNotFound() *PcloudV2VolumescloneGetallNotFound { - return &PcloudV2VolumescloneGetallNotFound{} +// NewPcloudV2VolumescloneGetallForbidden creates a PcloudV2VolumescloneGetallForbidden with default headers values +func NewPcloudV2VolumescloneGetallForbidden() *PcloudV2VolumescloneGetallForbidden { + return &PcloudV2VolumescloneGetallForbidden{} } -/* PcloudV2VolumescloneGetallNotFound describes a response with status code 404, with default header values. +/* +PcloudV2VolumescloneGetallForbidden describes a response with status code 403, with default header values. -Not Found +Forbidden */ -type PcloudV2VolumescloneGetallNotFound struct { +type PcloudV2VolumescloneGetallForbidden struct { Payload *models.Error } -func (o *PcloudV2VolumescloneGetallNotFound) Error() string { - return fmt.Sprintf("[GET /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumescloneGetallNotFound %+v", 404, o.Payload) +// 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 +} + +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 *PcloudV2VolumescloneGetallNotFound) GetPayload() *models.Error { + +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 *PcloudV2VolumescloneGetallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *PcloudV2VolumescloneGetallForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Error) @@ -191,7 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_parameters.go index f728df4e..c3182587 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go index 6caa458f..cdfa99ec 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_post_responses.go @@ -47,12 +47,6 @@ func (o *PcloudV2VolumesclonePostReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result - case 404: - result := NewPcloudV2VolumesclonePostNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result case 500: result := NewPcloudV2VolumesclonePostInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -69,7 +63,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 +72,39 @@ 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 +} + 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 +126,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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +252,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,46 +261,44 @@ type PcloudV2VolumesclonePostForbidden struct { Payload *models.Error } -func (o *PcloudV2VolumesclonePostForbidden) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostForbidden %+v", 403, o.Payload) +// IsSuccess returns true when this pcloud v2 volumesclone post forbidden response has a 2xx status code +func (o *PcloudV2VolumesclonePostForbidden) IsSuccess() bool { + return false } -func (o *PcloudV2VolumesclonePostForbidden) GetPayload() *models.Error { - return o.Payload -} - -func (o *PcloudV2VolumesclonePostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } +// IsRedirect returns true when this pcloud v2 volumesclone post forbidden response has a 3xx status code +func (o *PcloudV2VolumesclonePostForbidden) IsRedirect() bool { + return false +} - return nil +// IsClientError returns true when this pcloud v2 volumesclone post forbidden response has a 4xx status code +func (o *PcloudV2VolumesclonePostForbidden) IsClientError() bool { + return true } -// NewPcloudV2VolumesclonePostNotFound creates a PcloudV2VolumesclonePostNotFound with default headers values -func NewPcloudV2VolumesclonePostNotFound() *PcloudV2VolumesclonePostNotFound { - return &PcloudV2VolumesclonePostNotFound{} +// IsServerError returns true when this pcloud v2 volumesclone post forbidden response has a 5xx status code +func (o *PcloudV2VolumesclonePostForbidden) IsServerError() bool { + return false } -/* PcloudV2VolumesclonePostNotFound describes a response with status code 404, with default header values. +// 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 +} -Not Found -*/ -type PcloudV2VolumesclonePostNotFound struct { - Payload *models.Error +func (o *PcloudV2VolumesclonePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostForbidden %+v", 403, o.Payload) } -func (o *PcloudV2VolumesclonePostNotFound) Error() string { - return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone][%d] pcloudV2VolumesclonePostNotFound %+v", 404, 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 *PcloudV2VolumesclonePostNotFound) GetPayload() *models.Error { + +func (o *PcloudV2VolumesclonePostForbidden) GetPayload() *models.Error { return o.Payload } -func (o *PcloudV2VolumesclonePostNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *PcloudV2VolumesclonePostForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Error) @@ -229,7 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_parameters.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_parameters.go index 86e9c246..5eeac3cd 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go index 22fa2bf7..514415c1 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go @@ -63,7 +63,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 +72,39 @@ 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 +} + 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 } @@ -95,7 +126,8 @@ func NewPcloudV2VolumescloneStartPostUnauthorized() *PcloudV2VolumescloneStartPo 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 +135,39 @@ 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 +} + 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 +189,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 +198,39 @@ 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 +} + 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 +252,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 +261,39 @@ 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 +} + 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 +315,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 +324,39 @@ 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 +} + 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/power/client/p_cloud_volumes/pcloud_volumes_clone_post_parameters.go b/power/client/p_cloud_volumes/pcloud_volumes_clone_post_parameters.go index 44e22ad1..4b44d5e2 100644 --- a/power/client/p_cloud_volumes/pcloud_volumes_clone_post_parameters.go +++ b/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/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go b/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go index 0c26160d..d2426e3c 100644 --- a/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 } @@ -197,7 +321,8 @@ 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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/service_bindings/service_binding_binding_parameters.go b/power/client/service_bindings/service_binding_binding_parameters.go index e2a1fc91..61d9b2d3 100644 --- a/power/client/service_bindings/service_binding_binding_parameters.go +++ b/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/power/client/service_bindings/service_binding_binding_responses.go b/power/client/service_bindings/service_binding_binding_responses.go index 8d6a348a..63fa451e 100644 --- a/power/client/service_bindings/service_binding_binding_responses.go +++ b/power/client/service_bindings/service_binding_binding_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 } @@ -197,7 +321,8 @@ 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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/service_bindings/service_binding_get_parameters.go b/power/client/service_bindings/service_binding_get_parameters.go index 98450eb6..399963c8 100644 --- a/power/client/service_bindings/service_binding_get_parameters.go +++ b/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/power/client/service_bindings/service_binding_get_responses.go b/power/client/service_bindings/service_binding_get_responses.go index ba1f5d08..16145d0a 100644 --- a/power/client/service_bindings/service_binding_get_responses.go +++ b/power/client/service_bindings/service_binding_get_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 } @@ -77,7 +108,8 @@ 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 +117,39 @@ 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 +} + 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/power/client/service_bindings/service_binding_last_operation_get_parameters.go b/power/client/service_bindings/service_binding_last_operation_get_parameters.go index 20ee289c..06155278 100644 --- a/power/client/service_bindings/service_binding_last_operation_get_parameters.go +++ b/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/power/client/service_bindings/service_binding_last_operation_get_responses.go b/power/client/service_bindings/service_binding_last_operation_get_responses.go index 46779aad..91ab7484 100644 --- a/power/client/service_bindings/service_binding_last_operation_get_responses.go +++ b/power/client/service_bindings/service_binding_last_operation_get_responses.go @@ -51,7 +51,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 +60,39 @@ 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 +} + 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 +114,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 +123,39 @@ 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 +} + 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 } @@ -115,7 +177,8 @@ 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 +186,39 @@ 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 +} + 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/power/client/service_bindings/service_binding_unbinding_parameters.go b/power/client/service_bindings/service_binding_unbinding_parameters.go index fb2dc202..091881ba 100644 --- a/power/client/service_bindings/service_binding_unbinding_parameters.go +++ b/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/power/client/service_bindings/service_binding_unbinding_responses.go b/power/client/service_bindings/service_binding_unbinding_responses.go index 2416449a..b07ff272 100644 --- a/power/client/service_bindings/service_binding_unbinding_responses.go +++ b/power/client/service_bindings/service_binding_unbinding_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 +118,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 +127,39 @@ 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 +} + 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 +181,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 +190,39 @@ 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 +} + 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 } @@ -151,7 +244,8 @@ 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 +253,39 @@ 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 +} + 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/power/client/service_bindings/service_bindings_client.go b/power/client/service_bindings/service_bindings_client.go index 554b058d..73c69f53 100644 --- a/power/client/service_bindings/service_bindings_client.go +++ b/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/power/client/service_instances/service_instance_deprovision_parameters.go b/power/client/service_instances/service_instance_deprovision_parameters.go index a9f8033e..45aa2dc2 100644 --- a/power/client/service_instances/service_instance_deprovision_parameters.go +++ b/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/power/client/service_instances/service_instance_deprovision_responses.go b/power/client/service_instances/service_instance_deprovision_responses.go index 3c0425c6..776fb060 100644 --- a/power/client/service_instances/service_instance_deprovision_responses.go +++ b/power/client/service_instances/service_instance_deprovision_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +130,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 +139,39 @@ 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 +} + 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 +193,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 +202,39 @@ 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 +} + 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 +256,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 +265,39 @@ 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 +} + 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 } @@ -195,7 +319,8 @@ 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 +328,39 @@ 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 +} + 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 +382,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 +391,39 @@ 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 +} + 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/power/client/service_instances/service_instance_get_parameters.go b/power/client/service_instances/service_instance_get_parameters.go index c3594fe6..c931d3c1 100644 --- a/power/client/service_instances/service_instance_get_parameters.go +++ b/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/power/client/service_instances/service_instance_get_responses.go b/power/client/service_instances/service_instance_get_responses.go index 94ecfeca..13e8700e 100644 --- a/power/client/service_instances/service_instance_get_responses.go +++ b/power/client/service_instances/service_instance_get_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 } @@ -77,7 +108,8 @@ 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 +117,39 @@ 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 +} + 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/power/client/service_instances/service_instance_last_operation_get_parameters.go b/power/client/service_instances/service_instance_last_operation_get_parameters.go index 8c735cce..9a08b521 100644 --- a/power/client/service_instances/service_instance_last_operation_get_parameters.go +++ b/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/power/client/service_instances/service_instance_last_operation_get_responses.go b/power/client/service_instances/service_instance_last_operation_get_responses.go index 10e635bf..d0de7967 100644 --- a/power/client/service_instances/service_instance_last_operation_get_responses.go +++ b/power/client/service_instances/service_instance_last_operation_get_responses.go @@ -51,7 +51,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 +60,39 @@ 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 +} + 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 +114,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 +123,39 @@ 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 +} + 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 } @@ -115,7 +177,8 @@ func NewServiceInstanceLastOperationGetGone() *ServiceInstanceLastOperationGetGo 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 +186,39 @@ 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 +} + 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/power/client/service_instances/service_instance_provision_parameters.go b/power/client/service_instances/service_instance_provision_parameters.go index 89458c04..37691575 100644 --- a/power/client/service_instances/service_instance_provision_parameters.go +++ b/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/power/client/service_instances/service_instance_provision_responses.go b/power/client/service_instances/service_instance_provision_responses.go index 1b457b95..f923162d 100644 --- a/power/client/service_instances/service_instance_provision_responses.go +++ b/power/client/service_instances/service_instance_provision_responses.go @@ -69,7 +69,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 +78,39 @@ 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 +} + 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 +132,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 +141,39 @@ 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 +} + 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 +195,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 +204,39 @@ 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 +} + 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 +258,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 +267,39 @@ 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 +} + 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 } @@ -197,7 +321,8 @@ 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 +330,39 @@ 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 +} + 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 +384,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 +393,39 @@ 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 +} + 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/power/client/service_instances/service_instance_update_parameters.go b/power/client/service_instances/service_instance_update_parameters.go index 0e27172b..669fdcff 100644 --- a/power/client/service_instances/service_instance_update_parameters.go +++ b/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/power/client/service_instances/service_instance_update_responses.go b/power/client/service_instances/service_instance_update_responses.go index b8656497..68068d9f 100644 --- a/power/client/service_instances/service_instance_update_responses.go +++ b/power/client/service_instances/service_instance_update_responses.go @@ -57,7 +57,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 +66,39 @@ 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 +} + 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 +118,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 +127,39 @@ 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 +} + 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 +181,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 +190,39 @@ 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 +} + 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 } @@ -151,7 +244,8 @@ func NewServiceInstanceUpdateUnprocessableEntity() *ServiceInstanceUpdateUnproce 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 +253,39 @@ 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 +} + 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/power/client/service_instances/service_instances_client.go b/power/client/service_instances/service_instances_client.go index 13b07b16..9dc2833e 100644 --- a/power/client/service_instances/service_instances_client.go +++ b/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/power/client/storage_types/service_broker_storagetypes_get_parameters.go b/power/client/storage_types/service_broker_storagetypes_get_parameters.go index 932bb7a0..81cd3a29 100644 --- a/power/client/storage_types/service_broker_storagetypes_get_parameters.go +++ b/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/power/client/storage_types/service_broker_storagetypes_get_responses.go b/power/client/storage_types/service_broker_storagetypes_get_responses.go index 30d420dd..b805454d 100644 --- a/power/client/storage_types/service_broker_storagetypes_get_responses.go +++ b/power/client/storage_types/service_broker_storagetypes_get_responses.go @@ -45,7 +45,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 +54,39 @@ 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 +} + 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 } @@ -75,7 +106,8 @@ func NewServiceBrokerStoragetypesGetInternalServerError() *ServiceBrokerStoraget 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 +115,39 @@ 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 +} + 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/power/client/storage_types/storage_types_client.go b/power/client/storage_types/storage_types_client.go index 5adc4f1e..1609c8d9 100644 --- a/power/client/storage_types/storage_types_client.go +++ b/power/client/storage_types/storage_types_client.go @@ -36,7 +36,7 @@ type ClientService interface { } /* - ServiceBrokerStoragetypesGet availables storage types in a region +ServiceBrokerStoragetypesGet availables storage types in a region */ func (a *Client) ServiceBrokerStoragetypesGet(params *ServiceBrokerStoragetypesGetParams, opts ...ClientOption) (*ServiceBrokerStoragetypesGetOK, error) { // TODO: Validate the params before sending diff --git a/power/client/swagger_spec/service_broker_swaggerspec_parameters.go b/power/client/swagger_spec/service_broker_swaggerspec_parameters.go index 12c76c9d..42725e2a 100644 --- a/power/client/swagger_spec/service_broker_swaggerspec_parameters.go +++ b/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/power/client/swagger_spec/service_broker_swaggerspec_responses.go b/power/client/swagger_spec/service_broker_swaggerspec_responses.go index 7f37f6cd..3dc362f0 100644 --- a/power/client/swagger_spec/service_broker_swaggerspec_responses.go +++ b/power/client/swagger_spec/service_broker_swaggerspec_responses.go @@ -39,7 +39,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 +48,39 @@ 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 +} + 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 } diff --git a/power/client/swagger_spec/swagger_spec_client.go b/power/client/swagger_spec/swagger_spec_client.go index d6ba1ec1..32228ff3 100644 --- a/power/client/swagger_spec/swagger_spec_client.go +++ b/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/power/models/p_vm_instance.go b/power/models/p_vm_instance.go index 19f52b67..3659bd08 100644 --- a/power/models/p_vm_instance.go +++ b/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) diff --git a/power/models/p_vm_instance_create.go b/power/models/p_vm_instance_create.go index 24872097..75f35a64 100644 --- a/power/models/p_vm_instance_create.go +++ b/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 diff --git a/power/models/s_a_p_create.go b/power/models/s_a_p_create.go index 989ba719..4c00c726 100644 --- a/power/models/s_a_p_create.go +++ b/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"` diff --git a/power/models/target_object.go b/power/models/target_object.go new file mode 100644 index 00000000..a5c1bc51 --- /dev/null +++ b/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/power/models/transit_connection_error.go b/power/models/transit_connection_error.go deleted file mode 100644 index f48668b0..00000000 --- a/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/power/models/transit_connection_error_item.go b/power/models/transit_connection_error_item.go new file mode 100644 index 00000000..4b626ecb --- /dev/null +++ b/power/models/transit_connection_error_item.go @@ -0,0 +1,139 @@ +// 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 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/power/models/transit_gateway_instance.go b/power/models/transit_gateway_instance.go index 2f1b34f1..acb4c751 100644 --- a/power/models/transit_gateway_instance.go +++ b/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,21 @@ 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 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/power/models/volume.go b/power/models/volume.go index 067ea451..dcbc20c9 100644 --- a/power/models/volume.go +++ b/power/models/volume.go @@ -64,6 +64,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 +75,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/power/models/volume_reference.go b/power/models/volume_reference.go index 1eec3b79..b6a922d2 100644 --- a/power/models/volume_reference.go +++ b/power/models/volume_reference.go @@ -70,6 +70,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 +81,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"`