From 8d5633e7748e25e078862859026e7f0aff387ec9 Mon Sep 17 00:00:00 2001 From: smutel Date: Sat, 3 Oct 2020 20:28:50 +0200 Subject: [PATCH] feat: Update provider to work with Netbox 2.9 --- docs/resources/ipam_ip_addresses.md | 11 +- docs/resources/ipam_prefix.md | 10 +- docs/resources/ipam_vlan.md | 10 +- docs/resources/tenancy_tenant.md | 10 +- examples/main.tf | 44 +- examples/provider.tf | 9 + go.mod | 4 +- go.sum | 108 + makefile | 16 +- netbox/data_netbox_dcim_site.go | 17 +- netbox/data_netbox_ipam_ip_addresses.go | 17 +- netbox/data_netbox_ipam_role.go | 17 +- netbox/data_netbox_ipam_vlan.go | 17 +- netbox/data_netbox_ipam_vlan_group.go | 17 +- netbox/data_netbox_tenancy_tenant.go | 17 +- netbox/data_netbox_tenancy_tenant_group.go | 17 +- netbox/provider.go | 3 +- netbox/resource_netbox_ipam_ip_addresses.go | 80 +- netbox/resource_netbox_ipam_prefix.go | 46 +- netbox/resource_netbox_ipam_vlan.go | 56 +- netbox/resource_netbox_ipam_vlan_group.go | 19 +- netbox/resource_netbox_tenancy_tenant.go | 52 +- .../resource_netbox_tenancy_tenant_group.go | 19 +- netbox/util.go | 34 + .../asaskevich/govalidator/.gitignore | 15 + .../asaskevich/govalidator/.travis.yml | 22 +- .../asaskevich/govalidator/CONTRIBUTING.md | 4 +- .../asaskevich/govalidator/README.md | 139 +- .../github.com/asaskevich/govalidator/doc.go | 3 + .../asaskevich/govalidator/error.go | 6 +- .../github.com/asaskevich/govalidator/go.mod | 3 + .../asaskevich/govalidator/patterns.go | 166 +- .../asaskevich/govalidator/types.go | 31 +- .../asaskevich/govalidator/utils.go | 46 +- .../asaskevich/govalidator/validator.go | 318 ++- .../asaskevich/govalidator/wercker.yml | 2 +- .../go-openapi/analysis/.golangci.yml | 5 + .../go-openapi/analysis/.travis.yml | 8 +- .../go-openapi/analysis/analyzer.go | 50 +- .../github.com/go-openapi/analysis/flatten.go | 97 +- vendor/github.com/go-openapi/analysis/go.mod | 18 +- vendor/github.com/go-openapi/analysis/go.sum | 89 + .../github.com/go-openapi/analysis/mixin.go | 6 + vendor/github.com/go-openapi/errors/go.mod | 10 +- vendor/github.com/go-openapi/errors/go.sum | 25 +- vendor/github.com/go-openapi/errors/schema.go | 46 +- .../github.com/go-openapi/loads/.travis.yml | 8 +- vendor/github.com/go-openapi/loads/go.mod | 8 +- vendor/github.com/go-openapi/loads/go.sum | 98 +- .../go-openapi/runtime/client_response.go | 9 +- vendor/github.com/go-openapi/runtime/go.mod | 19 +- vendor/github.com/go-openapi/runtime/go.sum | 119 ++ .../go-openapi/runtime/middleware/context.go | 20 + .../runtime/middleware/denco/router.go | 6 +- .../runtime/middleware/parameter.go | 4 +- .../runtime/middleware/swaggerui.go | 162 ++ .../github.com/go-openapi/spec/.golangci.yml | 5 + vendor/github.com/go-openapi/spec/.travis.yml | 6 +- vendor/github.com/go-openapi/spec/bindata.go | 36 +- .../go-openapi/spec/contact_info.go | 30 + vendor/github.com/go-openapi/spec/expander.go | 9 +- vendor/github.com/go-openapi/spec/go.mod | 7 +- vendor/github.com/go-openapi/spec/go.sum | 29 +- vendor/github.com/go-openapi/spec/license.go | 30 + vendor/github.com/go-openapi/spec/ref.go | 2 + .../go-openapi/spec/schema_loader.go | 17 +- .../go-openapi/swag/convert_types.go | 135 ++ vendor/github.com/go-openapi/swag/loading.go | 18 + vendor/github.com/go-openapi/validate/go.mod | 29 +- vendor/github.com/go-openapi/validate/go.sum | 151 +- .../go-openapi/validate/object_validator.go | 10 +- .../github.com/go-openapi/validate/values.go | 66 +- .../mailru/easyjson/jwriter/writer.go | 43 +- .../mitchellh/mapstructure/.travis.yml | 3 +- .../mitchellh/mapstructure/CHANGELOG.md | 36 + .../github.com/mitchellh/mapstructure/go.mod | 2 + .../mitchellh/mapstructure/mapstructure.go | 333 +++- .../circuits_choices_list_parameters.go | 128 -- .../circuits_choices_read_parameters.go | 148 -- .../circuits_choices_read_responses.go | 70 - ...s_circuit_terminations_create_responses.go | 50 +- ...s_circuit_terminations_delete_responses.go | 2 +- ...its_circuit_terminations_list_responses.go | 2 +- ...t_terminations_partial_update_responses.go | 50 +- ...its_circuit_terminations_read_responses.go | 2 +- ...s_circuit_terminations_update_responses.go | 50 +- ...circuits_circuit_types_create_responses.go | 50 +- ...circuits_circuit_types_delete_responses.go | 2 +- .../circuits_circuit_types_list_responses.go | 2 +- ..._circuit_types_partial_update_responses.go | 50 +- .../circuits_circuit_types_read_responses.go | 2 +- ...circuits_circuit_types_update_responses.go | 50 +- .../circuits_circuits_create_responses.go | 50 +- .../circuits_circuits_delete_responses.go | 2 +- .../circuits_circuits_list_responses.go | 2 +- ...cuits_circuits_partial_update_responses.go | 50 +- .../circuits_circuits_read_responses.go | 2 +- .../circuits_circuits_update_responses.go | 50 +- .../netbox/client/circuits/circuits_client.go | 76 +- .../circuits_providers_create_responses.go | 50 +- .../circuits_providers_delete_responses.go | 2 +- .../circuits_providers_graphs_responses.go | 2 +- .../circuits_providers_list_responses.go | 2 +- ...uits_providers_partial_update_responses.go | 50 +- .../circuits_providers_read_responses.go | 2 +- .../circuits_providers_update_responses.go | 50 +- .../dcim/dcim_cables_create_responses.go | 50 +- .../dcim/dcim_cables_delete_responses.go | 2 +- .../dcim/dcim_cables_list_parameters.go | 58 + .../client/dcim/dcim_cables_list_responses.go | 2 +- .../dcim_cables_partial_update_responses.go | 50 +- .../client/dcim/dcim_cables_read_responses.go | 2 +- .../dcim/dcim_cables_update_responses.go | 50 +- .../dcim/dcim_choices_list_parameters.go | 128 -- .../dcim/dcim_choices_read_parameters.go | 148 -- .../dcim/dcim_choices_read_responses.go | 70 - .../netbox/client/dcim/dcim_client.go | 682 ++++--- .../dcim_connected_device_list_responses.go | 2 +- ...dcim_console_connections_list_responses.go | 2 +- ...console_port_templates_create_responses.go | 50 +- ...console_port_templates_delete_responses.go | 2 +- ...m_console_port_templates_list_responses.go | 2 +- ...port_templates_partial_update_responses.go | 50 +- ...m_console_port_templates_read_responses.go | 2 +- ...console_port_templates_update_responses.go | 50 +- .../dcim_console_ports_create_responses.go | 50 +- .../dcim_console_ports_delete_responses.go | 2 +- .../dcim/dcim_console_ports_list_responses.go | 2 +- ..._console_ports_partial_update_responses.go | 50 +- .../dcim/dcim_console_ports_read_responses.go | 2 +- .../dcim_console_ports_trace_responses.go | 2 +- .../dcim_console_ports_update_responses.go | 50 +- ..._server_port_templates_create_responses.go | 50 +- ..._server_port_templates_delete_responses.go | 2 +- ...le_server_port_templates_list_responses.go | 2 +- ...port_templates_partial_update_responses.go | 50 +- ...le_server_port_templates_read_responses.go | 2 +- ..._server_port_templates_update_responses.go | 50 +- ...m_console_server_ports_create_responses.go | 50 +- ...m_console_server_ports_delete_responses.go | 2 +- ...cim_console_server_ports_list_responses.go | 2 +- ...e_server_ports_partial_update_responses.go | 50 +- ...cim_console_server_ports_read_responses.go | 2 +- ...im_console_server_ports_trace_responses.go | 2 +- ...m_console_server_ports_update_responses.go | 50 +- ...m_device_bay_templates_create_responses.go | 50 +- ...m_device_bay_templates_delete_responses.go | 2 +- ...cim_device_bay_templates_list_responses.go | 2 +- ..._bay_templates_partial_update_responses.go | 50 +- ...cim_device_bay_templates_read_responses.go | 2 +- ...m_device_bay_templates_update_responses.go | 50 +- .../dcim/dcim_device_bays_create_responses.go | 50 +- .../dcim/dcim_device_bays_delete_responses.go | 2 +- .../dcim/dcim_device_bays_list_responses.go | 2 +- ...im_device_bays_partial_update_responses.go | 50 +- .../dcim/dcim_device_bays_read_responses.go | 2 +- .../dcim/dcim_device_bays_update_responses.go | 50 +- .../dcim_device_roles_create_responses.go | 50 +- .../dcim_device_roles_delete_responses.go | 2 +- .../dcim/dcim_device_roles_list_responses.go | 2 +- ...m_device_roles_partial_update_responses.go | 50 +- .../dcim/dcim_device_roles_read_responses.go | 2 +- .../dcim_device_roles_update_responses.go | 50 +- .../dcim_device_types_create_responses.go | 50 +- .../dcim_device_types_delete_responses.go | 2 +- .../dcim/dcim_device_types_list_responses.go | 2 +- ...m_device_types_partial_update_responses.go | 50 +- .../dcim/dcim_device_types_read_responses.go | 2 +- .../dcim_device_types_update_responses.go | 50 +- .../dcim/dcim_devices_create_responses.go | 50 +- .../dcim/dcim_devices_delete_responses.go | 2 +- .../dcim/dcim_devices_graphs_responses.go | 2 +- .../dcim/dcim_devices_list_responses.go | 2 +- .../dcim/dcim_devices_napalm_responses.go | 2 +- .../dcim_devices_partial_update_responses.go | 50 +- .../dcim/dcim_devices_read_responses.go | 2 +- .../dcim/dcim_devices_update_responses.go | 50 +- ...m_front_port_templates_create_responses.go | 50 +- ...m_front_port_templates_delete_responses.go | 2 +- ...cim_front_port_templates_list_responses.go | 2 +- ...port_templates_partial_update_responses.go | 50 +- ...cim_front_port_templates_read_responses.go | 2 +- ...m_front_port_templates_update_responses.go | 50 +- .../dcim/dcim_front_ports_create_responses.go | 50 +- .../dcim/dcim_front_ports_delete_responses.go | 2 +- .../dcim/dcim_front_ports_list_responses.go | 2 +- ...im_front_ports_partial_update_responses.go | 50 +- .../dcim/dcim_front_ports_read_responses.go | 2 +- .../dcim/dcim_front_ports_trace_parameters.go | 151 ++ .../dcim_front_ports_trace_responses.go} | 46 +- .../dcim/dcim_front_ports_update_responses.go | 50 +- ...im_interface_connections_list_responses.go | 2 +- ...im_interface_templates_create_responses.go | 50 +- ...im_interface_templates_delete_responses.go | 2 +- ...dcim_interface_templates_list_responses.go | 2 +- ...face_templates_partial_update_responses.go | 50 +- ...dcim_interface_templates_read_responses.go | 2 +- ...im_interface_templates_update_responses.go | 50 +- .../dcim/dcim_interfaces_create_parameters.go | 6 +- .../dcim/dcim_interfaces_create_responses.go | 56 +- .../dcim/dcim_interfaces_delete_responses.go | 2 +- .../dcim/dcim_interfaces_graphs_responses.go | 8 +- .../dcim/dcim_interfaces_list_responses.go | 4 +- ...im_interfaces_partial_update_parameters.go | 6 +- ...cim_interfaces_partial_update_responses.go | 56 +- .../dcim/dcim_interfaces_read_responses.go | 8 +- .../dcim/dcim_interfaces_trace_responses.go | 8 +- .../dcim/dcim_interfaces_update_parameters.go | 6 +- .../dcim/dcim_interfaces_update_responses.go | 56 +- .../dcim_inventory_items_create_responses.go | 50 +- .../dcim_inventory_items_delete_responses.go | 2 +- .../dcim_inventory_items_list_responses.go | 2 +- ...nventory_items_partial_update_responses.go | 50 +- .../dcim_inventory_items_read_responses.go | 2 +- .../dcim_inventory_items_update_responses.go | 50 +- .../dcim_manufacturers_create_responses.go | 50 +- .../dcim_manufacturers_delete_responses.go | 2 +- .../dcim/dcim_manufacturers_list_responses.go | 2 +- ..._manufacturers_partial_update_responses.go | 50 +- .../dcim/dcim_manufacturers_read_responses.go | 2 +- .../dcim_manufacturers_update_responses.go | 50 +- .../dcim/dcim_platforms_create_responses.go | 50 +- .../dcim/dcim_platforms_delete_responses.go | 2 +- .../dcim/dcim_platforms_list_responses.go | 2 +- ...dcim_platforms_partial_update_responses.go | 50 +- .../dcim/dcim_platforms_read_responses.go | 2 +- .../dcim/dcim_platforms_update_responses.go | 50 +- .../dcim_power_connections_list_responses.go | 2 +- .../dcim/dcim_power_feeds_create_responses.go | 50 +- .../dcim/dcim_power_feeds_delete_responses.go | 2 +- .../dcim/dcim_power_feeds_list_responses.go | 2 +- ...im_power_feeds_partial_update_responses.go | 50 +- .../dcim/dcim_power_feeds_read_responses.go | 2 +- .../dcim/dcim_power_feeds_update_responses.go | 50 +- ...power_outlet_templates_create_responses.go | 50 +- ...power_outlet_templates_delete_responses.go | 2 +- ...m_power_outlet_templates_list_responses.go | 2 +- ...tlet_templates_partial_update_responses.go | 50 +- ...m_power_outlet_templates_read_responses.go | 2 +- ...power_outlet_templates_update_responses.go | 50 +- .../dcim_power_outlets_create_responses.go | 50 +- .../dcim_power_outlets_delete_responses.go | 2 +- .../dcim/dcim_power_outlets_list_responses.go | 2 +- ..._power_outlets_partial_update_responses.go | 50 +- .../dcim/dcim_power_outlets_read_responses.go | 2 +- .../dcim_power_outlets_trace_responses.go | 2 +- .../dcim_power_outlets_update_responses.go | 50 +- .../dcim_power_panels_create_responses.go | 50 +- .../dcim_power_panels_delete_responses.go | 2 +- .../dcim/dcim_power_panels_list_parameters.go | 58 + .../dcim/dcim_power_panels_list_responses.go | 2 +- ...m_power_panels_partial_update_responses.go | 50 +- .../dcim/dcim_power_panels_read_responses.go | 2 +- .../dcim_power_panels_update_responses.go | 50 +- ...m_power_port_templates_create_responses.go | 50 +- ...m_power_port_templates_delete_responses.go | 2 +- ...cim_power_port_templates_list_responses.go | 2 +- ...port_templates_partial_update_responses.go | 50 +- ...cim_power_port_templates_read_responses.go | 2 +- ...m_power_port_templates_update_responses.go | 50 +- .../dcim/dcim_power_ports_create_responses.go | 50 +- .../dcim/dcim_power_ports_delete_responses.go | 2 +- .../dcim/dcim_power_ports_list_responses.go | 2 +- ...im_power_ports_partial_update_responses.go | 50 +- .../dcim/dcim_power_ports_read_responses.go | 2 +- .../dcim/dcim_power_ports_trace_responses.go | 2 +- .../dcim/dcim_power_ports_update_responses.go | 50 +- .../dcim/dcim_rack_groups_create_responses.go | 50 +- .../dcim/dcim_rack_groups_delete_responses.go | 2 +- .../dcim/dcim_rack_groups_list_responses.go | 2 +- ...im_rack_groups_partial_update_responses.go | 50 +- .../dcim/dcim_rack_groups_read_responses.go | 2 +- .../dcim/dcim_rack_groups_update_responses.go | 50 +- ...dcim_rack_reservations_create_responses.go | 50 +- ...dcim_rack_reservations_delete_responses.go | 2 +- .../dcim_rack_reservations_list_parameters.go | 58 + .../dcim_rack_reservations_list_responses.go | 2 +- ...k_reservations_partial_update_responses.go | 50 +- .../dcim_rack_reservations_read_responses.go | 2 +- ...dcim_rack_reservations_update_responses.go | 50 +- .../dcim/dcim_rack_roles_create_responses.go | 50 +- .../dcim/dcim_rack_roles_delete_responses.go | 2 +- .../dcim/dcim_rack_roles_list_responses.go | 2 +- ...cim_rack_roles_partial_update_responses.go | 50 +- .../dcim/dcim_rack_roles_read_responses.go | 2 +- .../dcim/dcim_rack_roles_update_responses.go | 50 +- .../dcim/dcim_racks_create_responses.go | 50 +- .../dcim/dcim_racks_delete_responses.go | 2 +- .../dcim/dcim_racks_elevation_responses.go | 2 +- .../client/dcim/dcim_racks_list_responses.go | 2 +- .../dcim_racks_partial_update_responses.go | 50 +- .../client/dcim/dcim_racks_read_responses.go | 2 +- .../dcim/dcim_racks_update_responses.go | 50 +- ...im_rear_port_templates_create_responses.go | 50 +- ...im_rear_port_templates_delete_responses.go | 2 +- ...dcim_rear_port_templates_list_responses.go | 2 +- ...port_templates_partial_update_responses.go | 50 +- ...dcim_rear_port_templates_read_responses.go | 2 +- ...im_rear_port_templates_update_responses.go | 50 +- .../dcim/dcim_rear_ports_create_responses.go | 50 +- .../dcim/dcim_rear_ports_delete_responses.go | 2 +- .../dcim/dcim_rear_ports_list_responses.go | 2 +- ...cim_rear_ports_partial_update_responses.go | 50 +- .../dcim/dcim_rear_ports_read_responses.go | 2 +- .../dcim/dcim_rear_ports_trace_parameters.go | 151 ++ .../dcim_rear_ports_trace_responses.go} | 46 +- .../dcim/dcim_rear_ports_update_responses.go | 50 +- .../dcim/dcim_regions_create_responses.go | 50 +- .../dcim/dcim_regions_delete_responses.go | 2 +- .../dcim/dcim_regions_list_responses.go | 2 +- .../dcim_regions_partial_update_responses.go | 50 +- .../dcim/dcim_regions_read_responses.go | 2 +- .../dcim/dcim_regions_update_responses.go | 50 +- .../dcim/dcim_sites_create_responses.go | 50 +- .../dcim/dcim_sites_delete_responses.go | 2 +- .../dcim/dcim_sites_graphs_responses.go | 2 +- .../client/dcim/dcim_sites_list_responses.go | 2 +- .../dcim_sites_partial_update_responses.go | 50 +- .../client/dcim/dcim_sites_read_responses.go | 2 +- .../dcim/dcim_sites_update_responses.go | 50 +- .../dcim_virtual_chassis_create_responses.go | 50 +- .../dcim_virtual_chassis_delete_responses.go | 2 +- .../dcim_virtual_chassis_list_responses.go | 2 +- ...irtual_chassis_partial_update_responses.go | 50 +- .../dcim_virtual_chassis_read_responses.go | 2 +- .../dcim_virtual_chassis_update_responses.go | 50 +- .../extras/extras_choices_list_parameters.go | 128 -- .../extras/extras_choices_read_parameters.go | 148 -- .../extras/extras_choices_read_responses.go | 70 - .../netbox/client/extras/extras_client.go | 172 +- ...extras_config_contexts_create_responses.go | 50 +- ...extras_config_contexts_delete_responses.go | 2 +- .../extras_config_contexts_list_responses.go | 2 +- ...onfig_contexts_partial_update_responses.go | 50 +- .../extras_config_contexts_read_responses.go | 2 +- ...extras_config_contexts_update_responses.go | 50 +- ...ras_custom_field_choices_list_responses.go | 2 +- ...ras_custom_field_choices_read_responses.go | 2 +- ...xtras_export_templates_create_responses.go | 50 +- ...xtras_export_templates_delete_responses.go | 2 +- .../extras_export_templates_list_responses.go | 2 +- ...port_templates_partial_update_responses.go | 50 +- .../extras_export_templates_read_responses.go | 2 +- ...xtras_export_templates_update_responses.go | 50 +- .../extras/extras_graphs_create_responses.go | 50 +- .../extras/extras_graphs_delete_responses.go | 2 +- .../extras/extras_graphs_list_responses.go | 2 +- .../extras_graphs_partial_update_responses.go | 50 +- .../extras/extras_graphs_read_responses.go | 2 +- .../extras/extras_graphs_update_responses.go | 50 +- ...tras_image_attachments_create_responses.go | 50 +- ...tras_image_attachments_delete_responses.go | 2 +- ...xtras_image_attachments_list_parameters.go | 696 +++++++ ...extras_image_attachments_list_responses.go | 2 +- ...ge_attachments_partial_update_responses.go | 50 +- ...extras_image_attachments_read_responses.go | 2 +- ...tras_image_attachments_update_responses.go | 50 +- .../extras_job_results_list_parameters.go | 919 +++++++++ .../extras_job_results_list_responses.go | 214 ++ .../extras_job_results_read_parameters.go | 151 ++ .../extras_job_results_read_responses.go | 84 + .../extras_object_changes_list_responses.go | 2 +- .../extras_object_changes_read_responses.go | 2 +- .../extras/extras_reports_list_responses.go | 2 +- .../extras/extras_reports_read_responses.go | 2 +- .../extras/extras_reports_run_responses.go | 51 +- .../extras/extras_scripts_list_responses.go | 2 +- .../extras/extras_scripts_read_responses.go | 2 +- .../extras/extras_tags_create_responses.go | 50 +- .../extras/extras_tags_delete_responses.go | 2 +- .../extras/extras_tags_list_responses.go | 2 +- .../extras_tags_partial_update_responses.go | 50 +- .../extras/extras_tags_read_responses.go | 2 +- .../extras/extras_tags_update_responses.go | 50 +- .../ipam/ipam_aggregates_create_responses.go | 50 +- .../ipam/ipam_aggregates_delete_responses.go | 2 +- .../ipam/ipam_aggregates_list_responses.go | 2 +- ...pam_aggregates_partial_update_responses.go | 50 +- .../ipam/ipam_aggregates_read_responses.go | 2 +- .../ipam/ipam_aggregates_update_responses.go | 50 +- .../ipam/ipam_choices_list_parameters.go | 128 -- .../ipam/ipam_choices_list_responses.go | 70 - .../ipam/ipam_choices_read_parameters.go | 148 -- .../ipam/ipam_choices_read_responses.go | 70 - .../netbox/client/ipam/ipam_client.go | 193 +- .../ipam_ip_addresses_create_responses.go | 50 +- .../ipam_ip_addresses_delete_responses.go | 2 +- .../ipam/ipam_ip_addresses_list_parameters.go | 148 +- .../ipam/ipam_ip_addresses_list_responses.go | 2 +- ...m_ip_addresses_partial_update_responses.go | 50 +- .../ipam/ipam_ip_addresses_read_responses.go | 2 +- .../ipam_ip_addresses_update_responses.go | 50 +- ...refixes_available_ips_create_parameters.go | 6 +- ...prefixes_available_ips_create_responses.go | 74 +- ...m_prefixes_available_ips_read_responses.go | 2 +- ...es_available_prefixes_create_parameters.go | 6 +- ...xes_available_prefixes_create_responses.go | 78 +- ...fixes_available_prefixes_read_responses.go | 2 +- .../ipam/ipam_prefixes_create_responses.go | 50 +- .../ipam/ipam_prefixes_delete_responses.go | 2 +- .../ipam/ipam_prefixes_list_parameters.go | 58 + .../ipam/ipam_prefixes_list_responses.go | 2 +- .../ipam_prefixes_partial_update_responses.go | 50 +- .../ipam/ipam_prefixes_read_responses.go | 2 +- .../ipam/ipam_prefixes_update_responses.go | 50 +- .../client/ipam/ipam_rirs_create_responses.go | 50 +- .../client/ipam/ipam_rirs_delete_responses.go | 2 +- .../client/ipam/ipam_rirs_list_responses.go | 2 +- .../ipam_rirs_partial_update_responses.go | 50 +- .../client/ipam/ipam_rirs_read_responses.go | 2 +- .../client/ipam/ipam_rirs_update_responses.go | 50 +- .../ipam/ipam_roles_create_responses.go | 50 +- .../ipam/ipam_roles_delete_responses.go | 2 +- .../client/ipam/ipam_roles_list_responses.go | 2 +- .../ipam_roles_partial_update_responses.go | 50 +- .../client/ipam/ipam_roles_read_responses.go | 2 +- .../ipam/ipam_roles_update_responses.go | 50 +- .../ipam/ipam_services_create_responses.go | 50 +- .../ipam/ipam_services_delete_responses.go | 2 +- .../ipam/ipam_services_list_responses.go | 2 +- .../ipam_services_partial_update_responses.go | 50 +- .../ipam/ipam_services_read_responses.go | 2 +- .../ipam/ipam_services_update_responses.go | 50 +- .../ipam/ipam_vlan_groups_create_responses.go | 50 +- .../ipam/ipam_vlan_groups_delete_responses.go | 2 +- .../ipam/ipam_vlan_groups_list_responses.go | 2 +- ...am_vlan_groups_partial_update_responses.go | 50 +- .../ipam/ipam_vlan_groups_read_responses.go | 2 +- .../ipam/ipam_vlan_groups_update_responses.go | 50 +- .../ipam/ipam_vlans_create_responses.go | 50 +- .../ipam/ipam_vlans_delete_responses.go | 2 +- .../client/ipam/ipam_vlans_list_responses.go | 2 +- .../ipam_vlans_partial_update_responses.go | 50 +- .../client/ipam/ipam_vlans_read_responses.go | 2 +- .../ipam/ipam_vlans_update_responses.go | 50 +- .../client/ipam/ipam_vrfs_create_responses.go | 50 +- .../client/ipam/ipam_vrfs_delete_responses.go | 2 +- .../client/ipam/ipam_vrfs_list_responses.go | 2 +- .../ipam_vrfs_partial_update_responses.go | 50 +- .../client/ipam/ipam_vrfs_read_responses.go | 2 +- .../client/ipam/ipam_vrfs_update_responses.go | 50 +- ...et_box_client.go => net_box_api_client.go} | 27 +- .../secrets_choices_list_parameters.go | 128 -- .../secrets/secrets_choices_list_responses.go | 70 - .../secrets_choices_read_parameters.go | 148 -- .../netbox/client/secrets/secrets_client.go | 39 +- ...ts_generate_rsa_key_pair_list_responses.go | 2 +- ...ecrets_get_session_key_create_responses.go | 51 +- .../secrets_secret_roles_create_responses.go | 50 +- .../secrets_secret_roles_delete_responses.go | 2 +- .../secrets_secret_roles_list_responses.go | 2 +- ...s_secret_roles_partial_update_responses.go | 50 +- .../secrets_secret_roles_read_responses.go | 2 +- .../secrets_secret_roles_update_responses.go | 50 +- .../secrets_secrets_create_responses.go | 50 +- .../secrets_secrets_delete_responses.go | 2 +- .../secrets/secrets_secrets_list_responses.go | 2 +- ...ecrets_secrets_partial_update_responses.go | 50 +- .../secrets/secrets_secrets_read_responses.go | 2 +- .../secrets_secrets_update_responses.go | 50 +- .../tenancy_choices_list_parameters.go | 128 -- .../tenancy/tenancy_choices_list_responses.go | 70 - .../tenancy_choices_read_parameters.go | 148 -- .../tenancy/tenancy_choices_read_responses.go | 70 - .../netbox/client/tenancy/tenancy_client.go | 38 +- .../tenancy_tenant_groups_create_responses.go | 50 +- .../tenancy_tenant_groups_delete_responses.go | 2 +- .../tenancy_tenant_groups_list_responses.go | 2 +- ..._tenant_groups_partial_update_responses.go | 50 +- .../tenancy_tenant_groups_read_responses.go | 2 +- .../tenancy_tenant_groups_update_responses.go | 50 +- .../tenancy_tenants_create_responses.go | 50 +- .../tenancy_tenants_delete_responses.go | 2 +- .../tenancy/tenancy_tenants_list_responses.go | 2 +- ...enancy_tenants_partial_update_responses.go | 50 +- .../tenancy/tenancy_tenants_read_responses.go | 2 +- .../tenancy_tenants_update_responses.go | 50 +- .../netbox/client/users/users_client.go | 708 +++++++ .../users/users_groups_create_parameters.go | 150 ++ .../users/users_groups_create_responses.go | 130 ++ .../users/users_groups_delete_parameters.go | 151 ++ .../users_groups_delete_responses.go} | 35 +- .../users/users_groups_list_parameters.go | 687 +++++++ .../users/users_groups_list_responses.go | 214 ++ .../users_groups_partial_update_parameters.go | 172 ++ .../users_groups_partial_update_responses.go | 130 ++ .../users/users_groups_read_parameters.go | 151 ++ .../users_groups_read_responses.go} | 46 +- .../users/users_groups_update_parameters.go | 172 ++ .../users/users_groups_update_responses.go | 130 ++ .../users_permissions_create_parameters.go | 150 ++ .../users_permissions_create_responses.go | 130 ++ .../users_permissions_delete_parameters.go | 151 ++ .../users_permissions_delete_responses.go | 69 + .../users_permissions_list_parameters.go | 977 ++++++++++ .../users/users_permissions_list_responses.go | 214 ++ ...s_permissions_partial_update_parameters.go | 172 ++ ...rs_permissions_partial_update_responses.go | 130 ++ .../users_permissions_read_parameters.go | 151 ++ .../users/users_permissions_read_responses.go | 84 + .../users_permissions_update_parameters.go | 172 ++ .../users_permissions_update_responses.go | 130 ++ .../users/users_users_create_parameters.go | 150 ++ .../users/users_users_create_responses.go | 130 ++ .../users/users_users_delete_parameters.go | 151 ++ .../users/users_users_delete_responses.go | 69 + .../users/users_users_list_parameters.go | 1731 +++++++++++++++++ .../users/users_users_list_responses.go | 214 ++ .../users_users_partial_update_parameters.go | 172 ++ .../users_users_partial_update_responses.go | 130 ++ .../users_users_read_parameters.go} | 71 +- .../users_users_read_responses.go} | 41 +- .../users/users_users_update_parameters.go | 172 ++ .../users/users_users_update_responses.go | 130 ++ .../virtualization_choices_list_parameters.go | 128 -- .../virtualization_choices_list_responses.go | 70 - .../virtualization_choices_read_parameters.go | 148 -- .../virtualization_choices_read_responses.go | 70 - .../virtualization/virtualization_client.go | 132 +- ...ization_cluster_groups_create_responses.go | 50 +- ...ization_cluster_groups_delete_responses.go | 2 +- ...alization_cluster_groups_list_responses.go | 2 +- ...cluster_groups_partial_update_responses.go | 50 +- ...alization_cluster_groups_read_responses.go | 2 +- ...ization_cluster_groups_update_responses.go | 50 +- ...lization_cluster_types_create_responses.go | 50 +- ...lization_cluster_types_delete_responses.go | 2 +- ...ualization_cluster_types_list_responses.go | 2 +- ..._cluster_types_partial_update_responses.go | 50 +- ...ualization_cluster_types_read_responses.go | 2 +- ...lization_cluster_types_update_responses.go | 50 +- ...irtualization_clusters_create_responses.go | 50 +- ...irtualization_clusters_delete_responses.go | 2 +- .../virtualization_clusters_list_responses.go | 2 +- ...ation_clusters_partial_update_responses.go | 50 +- .../virtualization_clusters_read_responses.go | 2 +- ...irtualization_clusters_update_responses.go | 50 +- ...ualization_interfaces_create_parameters.go | 6 +- ...tualization_interfaces_create_responses.go | 56 +- ...tualization_interfaces_delete_responses.go | 2 +- ...ualization_interfaces_graphs_parameters.go | 151 ++ ...tualization_interfaces_graphs_responses.go | 84 + ...rtualization_interfaces_list_parameters.go | 174 ++ ...irtualization_interfaces_list_responses.go | 4 +- ...on_interfaces_partial_update_parameters.go | 6 +- ...ion_interfaces_partial_update_responses.go | 56 +- ...irtualization_interfaces_read_responses.go | 8 +- ...ualization_interfaces_update_parameters.go | 6 +- ...tualization_interfaces_update_responses.go | 56 +- ...ation_virtual_machines_create_responses.go | 50 +- ...ation_virtual_machines_delete_responses.go | 2 +- ...ization_virtual_machines_list_responses.go | 2 +- ...rtual_machines_partial_update_responses.go | 50 +- ...ization_virtual_machines_read_responses.go | 2 +- ...ation_virtual_machines_update_responses.go | 50 +- .../go-netbox/netbox/models/aggregate.go | 40 +- .../go-netbox/netbox/models/cable.go | 65 +- .../go-netbox/netbox/models/circuit.go | 40 +- .../netbox/models/circuit_termination.go | 28 +- .../go-netbox/netbox/models/circuit_type.go | 22 + .../go-netbox/netbox/models/cluster.go | 36 +- .../go-netbox/netbox/models/cluster_group.go | 22 + .../go-netbox/netbox/models/cluster_type.go | 22 + .../go-netbox/netbox/models/config_context.go | 66 + .../go-netbox/netbox/models/console_port.go | 71 +- .../netbox/models/console_port_template.go | 74 +- .../netbox/models/console_server_port.go | 71 +- .../models/console_server_port_template.go | 74 +- .../go-netbox/netbox/models/device.go | 44 +- .../go-netbox/netbox/models/device_bay.go | 63 +- .../netbox/models/device_bay_template.go | 70 +- .../netbox/models/device_interface.go | 1239 ------------ .../go-netbox/netbox/models/device_role.go | 35 +- .../go-netbox/netbox/models/device_type.go | 40 +- .../models/device_with_config_context.go | 44 +- .../netbox/models/export_template.go | 48 +- .../go-netbox/netbox/models/front_port.go | 89 +- .../netbox/models/front_port_rear_port.go | 23 + .../netbox/models/front_port_template.go | 96 +- .../go-netbox/netbox/models/graph.go | 34 +- .../{ip_address_interface.go => group.go} | 70 +- .../netbox/models/image_attachment.go | 22 + .../go-netbox/netbox/models/interface.go | 1292 ++++++++++++ .../netbox/models/interface_connection.go | 4 +- .../netbox/models/interface_template.go | 70 +- .../go-netbox/netbox/models/inventory_item.go | 63 +- .../go-netbox/netbox/models/ip_address.go | 120 +- .../go-netbox/netbox/models/job_result.go | 395 ++++ .../go-netbox/netbox/models/manufacturer.go | 22 + .../go-netbox/netbox/models/nested_group.go | 115 ++ .../netbox/models/nested_interface.go | 4 +- .../netbox/models/nested_ip_address.go | 2 +- .../netbox/models/nested_power_port.go | 8 +- .../models/nested_power_port_template.go | 4 +- .../netbox/models/nested_rack_group.go | 4 + .../go-netbox/netbox/models/nested_region.go | 4 + .../go-netbox/netbox/models/nested_tag.go | 178 ++ .../netbox/models/nested_tenant_group.go | 4 + .../go-netbox/netbox/models/nested_user.go | 22 + .../go-netbox/netbox/models/nested_v_r_f.go | 4 + .../netbox/models/nested_virtual_chassis.go | 27 + .../go-netbox/netbox/models/object_change.go | 26 +- .../netbox/models/object_permission.go | 271 +++ .../go-netbox/netbox/models/platform.go | 22 + .../go-netbox/netbox/models/power_feed.go | 85 +- .../go-netbox/netbox/models/power_outlet.go | 233 ++- .../netbox/models/power_outlet_template.go | 236 ++- .../go-netbox/netbox/models/power_panel.go | 56 + .../go-netbox/netbox/models/power_port.go | 229 ++- .../netbox/models/power_port_template.go | 232 ++- .../go-netbox/netbox/models/prefix.go | 44 +- .../go-netbox/netbox/models/prefix_length.go | 79 + .../go-netbox/netbox/models/provider.go | 36 +- .../go-netbox/netbox/models/r_i_r.go | 22 + .../go-netbox/netbox/models/rack.go | 52 +- .../go-netbox/netbox/models/rack_group.go | 26 + .../netbox/models/rack_reservation.go | 54 + .../go-netbox/netbox/models/rack_role.go | 35 +- .../go-netbox/netbox/models/rack_unit.go | 8 +- .../go-netbox/netbox/models/rear_port.go | 89 +- .../netbox/models/rear_port_template.go | 96 +- .../go-netbox/netbox/models/region.go | 26 + .../go-netbox/netbox/models/role.go | 22 + .../go-netbox/netbox/models/secret.go | 36 +- .../go-netbox/netbox/models/secret_role.go | 22 + .../go-netbox/netbox/models/service.go | 40 +- .../go-netbox/netbox/models/site.go | 68 +- .../go-netbox/netbox/models/tag.go | 22 + .../go-netbox/netbox/models/tenant.go | 36 +- .../go-netbox/netbox/models/tenant_group.go | 26 + .../go-netbox/netbox/models/user.go | 260 +++ .../go-netbox/netbox/models/v_l_a_n.go | 40 +- .../go-netbox/netbox/models/v_l_a_n_group.go | 22 + .../go-netbox/netbox/models/v_r_f.go | 36 +- .../netbox/models/virtual_chassis.go | 70 +- .../models/virtual_machine_interface.go | 600 ------ .../virtual_machine_with_config_context.go | 40 +- .../go-netbox/netbox/models/vm_interface.go | 460 +++++ .../netbox/models/writable_aggregate.go | 36 +- .../netbox/models/writable_available_ip.go | 88 + .../go-netbox/netbox/models/writable_cable.go | 61 +- .../netbox/models/writable_circuit.go | 38 +- .../models/writable_circuit_termination.go | 30 +- .../netbox/models/writable_cluster.go | 36 +- .../netbox/models/writable_config_context.go | 66 + .../netbox/models/writable_console_port.go | 71 +- .../models/writable_console_port_template.go | 72 +- .../models/writable_console_server_port.go | 71 +- .../writable_console_server_port_template.go | 72 +- .../netbox/models/writable_device_bay.go | 63 +- .../models/writable_device_bay_template.go | 70 +- .../models/writable_device_interface.go | 621 ------ .../netbox/models/writable_device_type.go | 38 +- .../writable_device_with_config_context.go | 40 +- .../netbox/models/writable_export_template.go | 34 +- .../netbox/models/writable_front_port.go | 74 +- .../models/writable_front_port_template.go | 81 +- .../netbox/models/writable_interface.go | 674 +++++++ .../models/writable_interface_template.go | 68 +- .../netbox/models/writable_inventory_item.go | 63 +- .../netbox/models/writable_ip_address.go | 83 +- .../models/writable_object_permission.go | 239 +++ .../netbox/models/writable_platform.go | 22 + .../netbox/models/writable_power_feed.go | 69 +- .../netbox/models/writable_power_outlet.go | 152 +- .../models/writable_power_outlet_template.go | 153 +- .../netbox/models/writable_power_panel.go | 56 + .../netbox/models/writable_power_port.go | 150 +- .../models/writable_power_port_template.go | 151 +- .../netbox/models/writable_prefix.go | 38 +- .../go-netbox/netbox/models/writable_rack.go | 44 +- .../netbox/models/writable_rack_group.go | 26 + .../models/writable_rack_reservation.go | 54 + .../netbox/models/writable_rear_port.go | 74 +- .../models/writable_rear_port_template.go | 81 +- .../netbox/models/writable_region.go | 26 + .../netbox/models/writable_secret.go | 36 +- .../netbox/models/writable_service.go | 38 +- .../go-netbox/netbox/models/writable_site.go | 52 +- .../netbox/models/writable_tenant.go | 36 +- .../netbox/models/writable_tenant_group.go | 26 + .../go-netbox/netbox/models/writable_user.go | 242 +++ .../netbox/models/writable_v_l_a_n.go | 38 +- .../netbox/models/writable_v_l_a_n_group.go | 22 + .../go-netbox/netbox/models/writable_v_r_f.go | 36 +- .../netbox/models/writable_virtual_chassis.go | 59 +- .../writable_virtual_machine_interface.go | 516 ----- ...ble_virtual_machine_with_config_context.go | 38 +- .../netbox/models/writable_vm_interface.go | 298 +++ .../go.mongodb.org/mongo-driver/bson/bson.go | 22 +- .../mongo-driver/bson/bson_1_8.go | 28 +- .../bson/bsoncodec/byte_slice_codec.go | 87 + .../bson/bsoncodec/cond_addr_codec.go | 63 + .../bson/bsoncodec/default_value_decoders.go | 519 +++-- .../bson/bsoncodec/default_value_encoders.go | 217 ++- .../mongo-driver/bson/bsoncodec/doc.go | 67 +- .../bson/bsoncodec/empty_interface_codec.go | 125 ++ .../mongo-driver/bson/bsoncodec/map_codec.go | 206 ++ .../mongo-driver/bson/bsoncodec/registry.go | 160 +- .../bson/bsoncodec/slice_codec.go | 196 ++ .../bson/bsoncodec/string_codec.go | 94 + .../bson/bsoncodec/struct_codec.go | 223 ++- .../mongo-driver/bson/bsoncodec/time_codec.go | 101 + .../mongo-driver/bson/bsoncodec/types.go | 1 + .../mongo-driver/bson/bsoncodec/uint_codec.go | 150 ++ .../bsonoptions/byte_slice_codec_options.go | 38 + .../empty_interface_codec_options.go | 38 + .../bson/bsonoptions/map_codec_options.go | 48 + .../bson/bsonoptions/slice_codec_options.go | 38 + .../bson/bsonoptions/string_codec_options.go | 41 + .../bson/bsonoptions/struct_codec_options.go | 70 + .../bson/bsonoptions/time_codec_options.go | 38 + .../bson/bsonoptions/uint_codec_options.go | 38 + .../bson/bsonrw/extjson_parser.go | 13 +- .../bson/bsonrw/extjson_wrappers.go | 33 +- .../bson/bsonrw/extjson_writer.go | 5 +- .../mongo-driver/bson/bsonrw/json_scanner.go | 2 +- .../mongo-driver/bson/bsonrw/value_reader.go | 15 +- .../mongo-driver/bson/bsonrw/value_writer.go | 37 +- .../mongo-driver/bson/bsonrw/writer.go | 6 + .../mongo-driver/bson/bsontype/bsontype.go | 8 + .../mongo-driver/bson/decoder.go | 18 +- .../go.mongodb.org/mongo-driver/bson/doc.go | 110 +- .../mongo-driver/bson/marshal.go | 89 +- .../mongo-driver/bson/primitive/decimal.go | 379 ++-- .../mongo-driver/bson/primitive/objectid.go | 2 +- .../mongo-driver/bson/primitive/primitive.go | 60 +- .../mongo-driver/bson/primitive_codecs.go | 8 +- .../mongo-driver/x/bsonx/bsoncore/bsoncore.go | 12 +- .../x/net/http2/client_conn_pool.go | 8 +- vendor/golang.org/x/net/http2/flow.go | 2 + .../golang.org/x/net/http2/hpack/huffman.go | 7 + vendor/golang.org/x/net/http2/http2.go | 7 + vendor/golang.org/x/net/http2/server.go | 8 +- vendor/golang.org/x/net/http2/transport.go | 97 +- .../x/sys/unix/errors_freebsd_386.go | 6 + .../x/sys/unix/errors_freebsd_amd64.go | 6 + .../x/sys/unix/errors_freebsd_arm64.go | 17 + vendor/golang.org/x/sys/unix/mkall.sh | 13 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 7 + .../golang.org/x/sys/unix/syscall_freebsd.go | 4 - .../x/sys/unix/syscall_freebsd_386.go | 4 + .../x/sys/unix/syscall_freebsd_amd64.go | 4 + .../golang.org/x/sys/unix/syscall_illumos.go | 57 + vendor/golang.org/x/sys/unix/syscall_linux.go | 97 +- vendor/golang.org/x/sys/unix/syscall_unix.go | 2 +- .../x/sys/unix/zerrors_freebsd_386.go | 160 +- .../x/sys/unix/zerrors_freebsd_amd64.go | 158 +- .../x/sys/unix/zerrors_freebsd_arm.go | 16 + .../x/sys/unix/zerrors_freebsd_arm64.go | 159 +- vendor/golang.org/x/sys/unix/zerrors_linux.go | 1 + .../x/sys/unix/zsyscall_freebsd_386.go | 52 +- .../x/sys/unix/zsyscall_freebsd_amd64.go | 32 +- .../x/sys/unix/zsyscall_freebsd_arm64.go | 34 +- .../x/sys/unix/zsyscall_illumos_amd64.go | 87 + .../x/sys/unix/ztypes_freebsd_386.go | 39 +- .../x/sys/unix/ztypes_freebsd_amd64.go | 24 +- .../x/sys/unix/ztypes_freebsd_arm64.go | 54 +- vendor/golang.org/x/sys/unix/ztypes_linux.go | 19 + vendor/gopkg.in/yaml.v2/.travis.yml | 18 +- vendor/gopkg.in/yaml.v2/apic.go | 1 + vendor/gopkg.in/yaml.v2/decode.go | 14 +- vendor/gopkg.in/yaml.v2/scannerc.go | 107 +- vendor/gopkg.in/yaml.v2/yaml.go | 2 +- vendor/gopkg.in/yaml.v2/yamlh.go | 1 + vendor/modules.txt | 32 +- 766 files changed, 38189 insertions(+), 9177 deletions(-) create mode 100644 examples/provider.tf create mode 100644 vendor/github.com/asaskevich/govalidator/.gitignore create mode 100644 vendor/github.com/asaskevich/govalidator/doc.go create mode 100644 vendor/github.com/asaskevich/govalidator/go.mod create mode 100644 vendor/github.com/go-openapi/runtime/middleware/swaggerui.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_list_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_read_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_read_responses.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_list_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_read_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_read_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_trace_parameters.go rename vendor/github.com/netbox-community/go-netbox/netbox/client/{circuits/circuits_choices_list_responses.go => dcim/dcim_front_ports_trace_responses.go} (50%) create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_trace_parameters.go rename vendor/github.com/netbox-community/go-netbox/netbox/client/{secrets/secrets_choices_read_responses.go => dcim/dcim_rear_ports_trace_responses.go} (50%) delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_list_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_read_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_read_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_job_results_list_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_job_results_list_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_job_results_read_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_job_results_read_responses.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/ipam/ipam_choices_list_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/ipam/ipam_choices_list_responses.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/ipam/ipam_choices_read_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/ipam/ipam_choices_read_responses.go rename vendor/github.com/netbox-community/go-netbox/netbox/client/{net_box_client.go => net_box_api_client.go} (87%) delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/secrets/secrets_choices_list_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/secrets/secrets_choices_list_responses.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/secrets/secrets_choices_read_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/tenancy/tenancy_choices_list_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/tenancy/tenancy_choices_list_responses.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/tenancy/tenancy_choices_read_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/tenancy/tenancy_choices_read_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_client.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_create_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_create_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_delete_parameters.go rename vendor/github.com/netbox-community/go-netbox/netbox/client/{extras/extras_choices_list_responses.go => users/users_groups_delete_responses.go} (52%) create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_list_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_list_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_partial_update_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_partial_update_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_read_parameters.go rename vendor/github.com/netbox-community/go-netbox/netbox/client/{dcim/dcim_choices_list_responses.go => users/users_groups_read_responses.go} (51%) create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_update_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_groups_update_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_create_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_create_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_delete_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_delete_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_list_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_list_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_partial_update_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_partial_update_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_read_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_read_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_update_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_permissions_update_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_create_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_create_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_delete_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_delete_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_list_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_list_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_partial_update_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_partial_update_responses.go rename vendor/github.com/netbox-community/go-netbox/netbox/client/{dcim/dcim_racks_units_parameters.go => users/users_users_read_parameters.go} (50%) rename vendor/github.com/netbox-community/go-netbox/netbox/client/{dcim/dcim_racks_units_responses.go => users/users_users_read_responses.go} (57%) create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_update_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/users/users_users_update_responses.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/virtualization/virtualization_choices_list_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/virtualization/virtualization_choices_list_responses.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/virtualization/virtualization_choices_read_parameters.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/virtualization/virtualization_choices_read_responses.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/virtualization/virtualization_interfaces_graphs_parameters.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/client/virtualization/virtualization_interfaces_graphs_responses.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/device_interface.go rename vendor/github.com/netbox-community/go-netbox/netbox/models/{ip_address_interface.go => group.go} (53%) create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/interface.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/job_result.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/nested_group.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/nested_tag.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/object_permission.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/prefix_length.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/user.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/virtual_machine_interface.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/vm_interface.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/writable_available_ip.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/writable_device_interface.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/writable_interface.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/writable_object_permission.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/writable_user.go delete mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/writable_virtual_machine_interface.go create mode 100644 vendor/github.com/netbox-community/go-netbox/netbox/models/writable_vm_interface.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/byte_slice_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/cond_addr_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/empty_interface_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/map_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/slice_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/string_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/time_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/uint_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/byte_slice_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/empty_interface_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/map_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/slice_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/string_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/struct_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/time_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/uint_codec_options.go create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_illumos.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go diff --git a/docs/resources/ipam_ip_addresses.md b/docs/resources/ipam_ip_addresses.md index c5168f5d2..d477c4968 100644 --- a/docs/resources/ipam_ip_addresses.md +++ b/docs/resources/ipam_ip_addresses.md @@ -8,8 +8,12 @@ Manages an ipam ip addresses resource within Netbox. resource "netbox_ipam_ip_addresses" "ip_test" { address = "192.168.56.0/24" description = "IP created by terraform" - tags = ["tag1"] status = "active" + + tag { + name = "tag1" + slug = "tag1" + } } ``` @@ -24,12 +28,13 @@ The following arguments are supported: * ``nat_outside_id`` - (Optional) The ID of the NAT outside of this object. * ``role`` - (Optional) The role among loopback, secondary, anycast, vip, vrrp, hsrp, glbp, carp of this object. * ``status`` - (Optional) The status among container, active, reserved, deprecated (active by default). -* ``tags`` - (Optional) Array of tags for this object. * ``tenant_id`` - (Optional) ID of the tenant where this object is attached. * ``vrf_id`` - (Optional) The ID of the vrf attached to this object. +The ``tag`` block supports: +* ``name`` - (Required) Name of the existing tag to associate with this resource. +* ``slug`` - (Required) Slug of the existing tag to associate with this resource. ## Attributes Reference In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. - diff --git a/docs/resources/ipam_prefix.md b/docs/resources/ipam_prefix.md index 3b3a83b30..82559e726 100644 --- a/docs/resources/ipam_prefix.md +++ b/docs/resources/ipam_prefix.md @@ -11,8 +11,12 @@ resource "netbox_ipam_prefix" "prefix_test" { description = "Prefix created by terraform" site_id = netbox_ipam_vlan_group.vlan_group_test.site_id role_id = data.netbox_ipam_roles.vlan_role_production.id - tags = ["tag1"] status = "active" + + tag { + name = "tag1" + slug = "tag1" + } } ``` @@ -25,10 +29,12 @@ The following arguments are supported: * ``role_id`` - (Optional) The ID of the role attached to this object. * ``site_id`` - (Optional) ID of the site where this object is created * ``status`` - (Optional) The status among container, active, reserved, deprecated (active by default). -* ``tags`` - (Optional) Array of tags for this object. * ``tenant_id`` - (Optional) ID of the tenant where this object is attached. * ``vlan_id`` - (Optional) ID of the vlan where this object is attached. * ``vrf_id`` - (Optional) The ID of the vrf attached to this object. +The ``tag`` block supports: +* ``name`` - (Required) Name of the existing tag to associate with this resource. +* ``slug`` - (Required) Slug of the existing tag to associate with this resource. ## Attributes Reference diff --git a/docs/resources/ipam_vlan.md b/docs/resources/ipam_vlan.md index 12020332e..c3f84fe46 100644 --- a/docs/resources/ipam_vlan.md +++ b/docs/resources/ipam_vlan.md @@ -13,7 +13,11 @@ resource "netbox_ipam_vlan" "vlan_test" { vlan_group_id = netbox_ipam_vlan_group.vlan_group_test.id tenant_id = netbox_tenancy_tenant.tenant_test.id role_id = data.netbox_ipam_roles.vlan_role_production.id - tags = ["tag1"] + + tag { + name = "tag1" + slug = "tag1" + } } ``` @@ -26,9 +30,11 @@ The following arguments are supported: * ``role_id`` - (Optional) The ID of the role attached to this object. * ``site_id`` - (Optional) ID of the site where this object is created. * ``status`` - (Optional) The status among container, active, reserved, deprecated (active by default). -* ``tags`` - (Optional) Array of tags for this vlan. * ``tenant_id`` - (Optional) ID of the tenant where this object is attached. * ``vlan_id`` - (Required) The ID of this vlan (vlan tag). +The ``tag`` block supports: +* ``name`` - (Required) Name of the existing tag to associate with this resource. +* ``slug`` - (Required) Slug of the existing tag to associate with this resource. ## Attributes Reference diff --git a/docs/resources/tenancy_tenant.md b/docs/resources/tenancy_tenant.md index 28a7a19c9..a66da668c 100644 --- a/docs/resources/tenancy_tenant.md +++ b/docs/resources/tenancy_tenant.md @@ -11,7 +11,11 @@ resource "netbox_tenancy_tenant" "tenant_test" { description = "Tenant created by terraform" comments = "Some test comments" tenant_group_id = netbox_tenancy_tenant_group.tenant_group_test.id - tags = ["tag1"] + + tag { + name = "tag1" + slug = "tag1" + } } ``` @@ -23,7 +27,9 @@ The following arguments are supported: * ``tenant_group_id`` - (Optional) ID of the group where this object is located. * ``name`` - (Required) The name for this object. * ``slug`` - (Required) The slug for this object. -* ``tags`` - (Optional) Array of tags for this tenant. +The ``tag`` block supports: +* ``name`` - (Required) Name of the existing tag to associate with this resource. +* ``slug`` - (Required) Slug of the existing tag to associate with this resource. ## Attributes Reference diff --git a/examples/main.tf b/examples/main.tf index a44a3de94..59526c900 100644 --- a/examples/main.tf +++ b/examples/main.tf @@ -4,7 +4,16 @@ resource "netbox_tenancy_tenant" "tenant_test" { description = "Tenant created by terraform" comments = "Some test comments" tenant_group_id = netbox_tenancy_tenant_group.tenant_group_test.id - tags = ["tag1", "tag3"] + + tag { + name = "tag1" + slug = "tag1" + } + + tag { + name = "tag2" + slug = "tag2" + } } resource "netbox_tenancy_tenant_group" "tenant_group_test" { @@ -38,7 +47,16 @@ resource "netbox_ipam_vlan" "vlan_test" { vlan_group_id = netbox_ipam_vlan_group.vlan_group_test.id tenant_id = netbox_tenancy_tenant.tenant_test.id role_id = data.netbox_ipam_role.vlan_role_production.id - tags = ["tag1"] + + tag { + name = "tag1" + slug = "tag1" + } + + tag { + name = "tag2" + slug = "tag2" + } } resource "netbox_ipam_prefix" "prefix_test" { @@ -47,12 +65,30 @@ resource "netbox_ipam_prefix" "prefix_test" { description = "Prefix created by terraform" site_id = netbox_ipam_vlan_group.vlan_group_test.site_id role_id = data.netbox_ipam_role.vlan_role_production.id - tags = ["tag1"] - status = "container" + + tag { + name = "tag1" + slug = "tag1" + } + + tag { + name = "tag2" + slug = "tag2" + } } resource "netbox_ipam_ip_addresses" "ip_test" { address = "192.168.56.1/24" status = "active" tenant_id = netbox_tenancy_tenant.tenant_test.id + + tag { + name = "tag1" + slug = "tag1" + } + + tag { + name = "tag2" + slug = "tag2" + } } diff --git a/examples/provider.tf b/examples/provider.tf new file mode 100644 index 000000000..d892045e0 --- /dev/null +++ b/examples/provider.tf @@ -0,0 +1,9 @@ +terraform { + required_providers { + netbox = { + source = "registry.terraform.io/smutel/netbox" + version = "0.0.1" + } + } +} + diff --git a/go.mod b/go.mod index 9e8c7f498..2d64a06fb 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ module github.com/smutel/terraform-provider-netbox go 1.14 require ( - github.com/go-openapi/runtime v0.19.15 + github.com/go-openapi/runtime v0.19.21 github.com/go-openapi/strfmt v0.19.5 github.com/hashicorp/terraform-plugin-sdk v1.13.0 - github.com/netbox-community/go-netbox v0.0.0-20200527232624-eea85738db88 + github.com/netbox-community/go-netbox v0.0.0-20200916111521-9dc1ea8ff598 github.com/pkg/errors v0.9.1 ) diff --git a/go.sum b/go.sum index cf4c72edd..cdf0124eb 100644 --- a/go.sum +++ b/go.sum @@ -33,6 +33,9 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.25.3 h1:uM16hIw9BotjZKMZlX05SN2EFtaWfi/NonPKIARiBLQ= github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -43,6 +46,7 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -61,12 +65,17 @@ github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9sn github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.4 h1:fSGwO1tSYHFu70NKaWJt5Qh0qoBRtCm/mXS1yhf+0W0= github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6 h1:xZMThgv5SQ7SMbWtKFkCf9bBdvR2iEyw9k3zGZONuys= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -86,22 +95,30 @@ github.com/go-openapi/loads v0.19.3 h1:jwIoahqCmaA5OBoc/B+1+Mu2L0Gr8xYQnbeyQEo/7 github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= github.com/go-openapi/loads v0.19.4 h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/loads v0.19.5 h1:jZVYWawIQiA1NBnHla28ktg6hrcfTHsCE+3QLVRBIls= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.14/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= github.com/go-openapi/runtime v0.19.15 h1:2GIefxs9Rx1vCDNghRtypRq+ig8KSLrjHbAYI/gCLCM= github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.21 h1:81PiYus9l6fwwS4EwhJD+tQb3EPZBeWfgdAVTfFD25Q= +github.com/go-openapi/runtime v0.19.21/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= @@ -109,18 +126,47 @@ github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.8 h1:vfK6jLhs7OI4tAXkvkooviaE1JEPcw3mutyegLHHjmk= github.com/go-openapi/swag v0.19.8/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3 h1:PAH/2DylwWcIU1s0Y7k3yNmeAgWOcKrNE2Q7Ww/kCg4= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= github.com/go-openapi/validate v0.19.7 h1:fR4tP2xc+25pdo5Qvv4v6g+5QKFgNg8nrifTE7V8ibA= github.com/go-openapi/validate v0.19.7/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-openapi/validate v0.19.10 h1:tG3SZ5DC5KF4cyt7nqLVcQXGj5A7mpaYkAcNPlDK+Yk= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -192,17 +238,26 @@ github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= @@ -213,6 +268,10 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -237,15 +296,24 @@ github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9 github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/netbox-community/go-netbox v0.0.0-20200527232624-eea85738db88 h1:5POc5O33QEsHnb7BPlde7vlNlYNwGZ0mY1rAZsB4q6o= github.com/netbox-community/go-netbox v0.0.0-20200527232624-eea85738db88/go.mod h1:LvtLfQx0+TPD3sGqPgYfTj0Wet3+sDHt9RuKAG+68ZU= +github.com/netbox-community/go-netbox v0.0.0-20200916111521-9dc1ea8ff598 h1:n3EJ1j6Zg0ZWdZuEUNsi02PprrUB3oj3pGJXpPLajAE= +github.com/netbox-community/go-netbox v0.0.0-20200916111521-9dc1ea8ff598/go.mod h1:2BQHB87NQnl/KrnLLMKTKNNyUrE/GP7Vsa8EueN0bTY= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -254,10 +322,17 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI= github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -267,6 +342,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok= @@ -275,6 +351,8 @@ github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU= github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.1 h1:vGMsygfmeCl4Xb6OA5U5XVAaQZ69FvoG7X2jUtQujb8= @@ -286,12 +364,18 @@ go.mongodb.org/mongo-driver v1.1.1 h1:Sq1fR+0c58RME5EoqKdjkiQAmPjmfHlZOoRI6fTUOc go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4 h1:zs/dKNwX0gYUtzwrN9lLiR15hCO0nDwQj5xXx+vjCdE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -322,8 +406,11 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= @@ -332,23 +419,31 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -356,15 +451,20 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -399,11 +499,19 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/makefile b/makefile index 786642b16..0ae2e3f78 100644 --- a/makefile +++ b/makefile @@ -19,15 +19,15 @@ build: @go build -mod=vendor -o terraform-provider-netbox . build-all: clean - @echo "==> Building terraform-provider-netbox" - @for GOOS in darwin linux windows; do for GOARCH in 386 amd64; do env GOOS=$${GOOS} GOARCH=$${GOARCH} env VERSION=${VERSION} go build -mod=vendor -o terraform-provider-netbox_v${VERSION} . && tar zcf terraform-provider-netbox_v${VERSION}_$${GOOS}_$${GOARCH}.tar.gz terraform-provider-netbox_v${VERSION} && rm terraform-provider-netbox_v${VERSION}; done; done - @for file in *.tar.gz; do echo "$$(sha256sum $${file})" >> sha256sums.txt; done + @for GOOS in darwin linux windows; do for GOARCH in 386 amd64; do echo "==> Building terraform-provider-netbox ($${GOOS} / $${GOARCH})" && env GOOS=$${GOOS} GOARCH=$${GOARCH} env VERSION=${VERSION} go build -mod=vendor -o terraform-provider-netbox_v${VERSION} . && zip -q terraform-provider-netbox_${VERSION}_$${GOOS}_$${GOARCH}.zip terraform-provider-netbox_v${VERSION} && rm terraform-provider-netbox_v${VERSION}; done; done + @for file in *.zip; do echo "$$(sha256sum $${file})" >> terraform-provider-netbox_${VERSION}_SHA256SUMS; done + @gpg --detach-sign terraform-provider-netbox_${VERSION}_SHA256SUMS localinstall: - @echo "==> Creating folder terraform.d/plugins/linux_amd64" - @mkdir -p ~/.terraform.d/plugins/linux_amd64 + @echo "==> Creating folder ~/.terraform.d/plugins/registry.terraform.io/smutel/netbox/0.0.1/linux_amd64" + @mkdir -p ~/.terraform.d/plugins/registry.terraform.io/smutel/netbox/0.0.1/linux_amd64 @echo "==> Installing provider in this folder" - @cp terraform-provider-netbox ~/.terraform.d/plugins/linux_amd64 + @cp terraform-provider-netbox ~/.terraform.d/plugins/registry.terraform.io/smutel/netbox/0.0.1/linux_amd64/terraform-provider-netbox_v0.0.1 check: @echo "==> Checking terraform-provider-netbox" @@ -36,5 +36,5 @@ check: clean: @echo "==> Cleaning terraform-provider-netbox" @rm -f terraform-provider-netbox - @rm -rf *.tar.gz - @rm -f sha256sums.txt + @rm -rf *.zip + @rm -f *SHA256SUMS* diff --git a/netbox/data_netbox_dcim_site.go b/netbox/data_netbox_dcim_site.go index 4368623d1..e79c44ca7 100644 --- a/netbox/data_netbox_dcim_site.go +++ b/netbox/data_netbox_dcim_site.go @@ -1,6 +1,7 @@ package netbox import ( + "fmt" "regexp" "strconv" @@ -8,7 +9,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" netboxclient "github.com/netbox-community/go-netbox/netbox/client" "github.com/netbox-community/go-netbox/netbox/client/dcim" - pkgerrors "github.com/pkg/errors" ) func dataNetboxDcimSite() *schema.Resource { @@ -28,7 +28,7 @@ func dataNetboxDcimSite() *schema.Resource { } func dataNetboxDcimSiteRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) slug := d.Get("slug").(string) @@ -39,12 +39,15 @@ func dataNetboxDcimSiteRead(d *schema.ResourceData, m interface{}) error { return err } - if *list.Payload.Count == 1 { - d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) - } else { - return pkgerrors.New("Data results for netbox_dcim_site returns 0 or " + - "more than one result.") + if *list.Payload.Count < 1 { + return fmt.Errorf("Your query returned no results. " + + "Please change your search criteria and try again.") + } else if *list.Payload.Count > 1 { + return fmt.Errorf("Your query returned more than one result. " + + "Please try a more specific search criteria.") } + d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) + return nil } diff --git a/netbox/data_netbox_ipam_ip_addresses.go b/netbox/data_netbox_ipam_ip_addresses.go index 9442b2758..d4f2a1edf 100644 --- a/netbox/data_netbox_ipam_ip_addresses.go +++ b/netbox/data_netbox_ipam_ip_addresses.go @@ -1,6 +1,7 @@ package netbox import ( + "fmt" "regexp" "strconv" @@ -8,7 +9,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" netboxclient "github.com/netbox-community/go-netbox/netbox/client" "github.com/netbox-community/go-netbox/netbox/client/ipam" - pkgerrors "github.com/pkg/errors" ) func dataNetboxIpamIPAddresses() *schema.Resource { @@ -29,7 +29,7 @@ func dataNetboxIpamIPAddresses() *schema.Resource { func dataNetboxIpamIPAddressesRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) address := d.Get("address").(string) @@ -40,12 +40,15 @@ func dataNetboxIpamIPAddressesRead(d *schema.ResourceData, return err } - if *list.Payload.Count == 1 { - d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) - } else { - return pkgerrors.New("Data results for netbox_ipam_ip_addresses returns 0 or " + - "more than one result.") + if *list.Payload.Count < 1 { + return fmt.Errorf("Your query returned no results. " + + "Please change your search criteria and try again.") + } else if *list.Payload.Count > 1 { + return fmt.Errorf("Your query returned more than one result. " + + "Please try a more specific search criteria.") } + d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) + return nil } diff --git a/netbox/data_netbox_ipam_role.go b/netbox/data_netbox_ipam_role.go index 3a51f5491..0779bfaaf 100644 --- a/netbox/data_netbox_ipam_role.go +++ b/netbox/data_netbox_ipam_role.go @@ -1,6 +1,7 @@ package netbox import ( + "fmt" "regexp" "strconv" @@ -8,7 +9,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" netboxclient "github.com/netbox-community/go-netbox/netbox/client" "github.com/netbox-community/go-netbox/netbox/client/ipam" - pkgerrors "github.com/pkg/errors" ) func dataNetboxIpamRole() *schema.Resource { @@ -28,7 +28,7 @@ func dataNetboxIpamRole() *schema.Resource { } func dataNetboxIpamRoleRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) slug := d.Get("slug").(string) @@ -39,12 +39,15 @@ func dataNetboxIpamRoleRead(d *schema.ResourceData, m interface{}) error { return err } - if *list.Payload.Count == 1 { - d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) - } else { - return pkgerrors.New("Data results for netbox_ipam_role returns 0 or " + - "more than one result.") + if *list.Payload.Count < 1 { + return fmt.Errorf("Your query returned no results. " + + "Please change your search criteria and try again.") + } else if *list.Payload.Count > 1 { + return fmt.Errorf("Your query returned more than one result. " + + "Please try a more specific search criteria.") } + d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) + return nil } diff --git a/netbox/data_netbox_ipam_vlan.go b/netbox/data_netbox_ipam_vlan.go index 302686cf2..f3ae793b5 100644 --- a/netbox/data_netbox_ipam_vlan.go +++ b/netbox/data_netbox_ipam_vlan.go @@ -1,12 +1,12 @@ package netbox import ( + "fmt" "strconv" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" netboxclient "github.com/netbox-community/go-netbox/netbox/client" "github.com/netbox-community/go-netbox/netbox/client/ipam" - pkgerrors "github.com/pkg/errors" ) func dataNetboxIpamVlan() *schema.Resource { @@ -27,7 +27,7 @@ func dataNetboxIpamVlan() *schema.Resource { } func dataNetboxIpamVlanRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) id := int64(d.Get("vlan_id").(int)) idStr := strconv.FormatInt(id, 10) @@ -44,12 +44,15 @@ func dataNetboxIpamVlanRead(d *schema.ResourceData, m interface{}) error { return err } - if *list.Payload.Count == 1 { - d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) - } else { - return pkgerrors.New("Data results for netbox_ipam_vlan returns 0 or " + - "more than one result.") + if *list.Payload.Count < 1 { + return fmt.Errorf("Your query returned no results. " + + "Please change your search criteria and try again.") + } else if *list.Payload.Count > 1 { + return fmt.Errorf("Your query returned more than one result. " + + "Please try a more specific search criteria.") } + d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) + return nil } diff --git a/netbox/data_netbox_ipam_vlan_group.go b/netbox/data_netbox_ipam_vlan_group.go index ec6d44689..dd4d7db21 100644 --- a/netbox/data_netbox_ipam_vlan_group.go +++ b/netbox/data_netbox_ipam_vlan_group.go @@ -1,6 +1,7 @@ package netbox import ( + "fmt" "regexp" "strconv" @@ -8,7 +9,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" netboxclient "github.com/netbox-community/go-netbox/netbox/client" "github.com/netbox-community/go-netbox/netbox/client/ipam" - pkgerrors "github.com/pkg/errors" ) func dataNetboxIpamVlanGroup() *schema.Resource { @@ -32,7 +32,7 @@ func dataNetboxIpamVlanGroup() *schema.Resource { } func dataNetboxIpamVlanGroupRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) slug := d.Get("slug").(string) siteID := d.Get("site_id").(int) @@ -48,12 +48,15 @@ func dataNetboxIpamVlanGroupRead(d *schema.ResourceData, m interface{}) error { return err } - if *list.Payload.Count == 1 { - d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) - } else { - return pkgerrors.New("Data results for netbox_ipam_vlan_group returns 0 " + - "or more than one result.") + if *list.Payload.Count < 1 { + return fmt.Errorf("Your query returned no results. " + + "Please change your search criteria and try again.") + } else if *list.Payload.Count > 1 { + return fmt.Errorf("Your query returned more than one result. " + + "Please try a more specific search criteria.") } + d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) + return nil } diff --git a/netbox/data_netbox_tenancy_tenant.go b/netbox/data_netbox_tenancy_tenant.go index 1673564ee..152e3791f 100644 --- a/netbox/data_netbox_tenancy_tenant.go +++ b/netbox/data_netbox_tenancy_tenant.go @@ -1,6 +1,7 @@ package netbox import ( + "fmt" "regexp" "strconv" @@ -8,7 +9,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" netboxclient "github.com/netbox-community/go-netbox/netbox/client" "github.com/netbox-community/go-netbox/netbox/client/tenancy" - pkgerrors "github.com/pkg/errors" ) func dataNetboxTenancyTenant() *schema.Resource { @@ -28,7 +28,7 @@ func dataNetboxTenancyTenant() *schema.Resource { } func dataNetboxTenancyTenantRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) slug := d.Get("slug").(string) @@ -39,12 +39,15 @@ func dataNetboxTenancyTenantRead(d *schema.ResourceData, m interface{}) error { return err } - if *list.Payload.Count == 1 { - d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) - } else { - return pkgerrors.New("Data results for netbox_tenancy_tenant returns 0 " + - "or more than one result.") + if *list.Payload.Count < 1 { + return fmt.Errorf("Your query returned no results. " + + "Please change your search criteria and try again.") + } else if *list.Payload.Count > 1 { + return fmt.Errorf("Your query returned more than one result. " + + "Please try a more specific search criteria.") } + d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) + return nil } diff --git a/netbox/data_netbox_tenancy_tenant_group.go b/netbox/data_netbox_tenancy_tenant_group.go index c289960e8..c22395c2d 100644 --- a/netbox/data_netbox_tenancy_tenant_group.go +++ b/netbox/data_netbox_tenancy_tenant_group.go @@ -1,6 +1,7 @@ package netbox import ( + "fmt" "regexp" "strconv" @@ -8,7 +9,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/validation" netboxclient "github.com/netbox-community/go-netbox/netbox/client" "github.com/netbox-community/go-netbox/netbox/client/tenancy" - pkgerrors "github.com/pkg/errors" ) func dataNetboxTenancyTenantGroup() *schema.Resource { @@ -30,7 +30,7 @@ func dataNetboxTenancyTenantGroup() *schema.Resource { func dataNetboxTenancyTenantGroupRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) slug := d.Get("slug").(string) @@ -41,12 +41,15 @@ func dataNetboxTenancyTenantGroupRead(d *schema.ResourceData, return err } - if *list.Payload.Count == 1 { - d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) - } else { - return pkgerrors.New("Data results for netbox_tenancy_tenant_group " + - "returns 0 or more than one result.") + if *list.Payload.Count < 1 { + return fmt.Errorf("Your query returned no results. " + + "Please change your search criteria and try again.") + } else if *list.Payload.Count > 1 { + return fmt.Errorf("Your query returned more than one result. " + + "Please try a more specific search criteria.") } + d.SetId(strconv.FormatInt(list.Payload.Results[0].ID, 10)) + return nil } diff --git a/netbox/provider.go b/netbox/provider.go index 71bbbcfff..005d3f872 100644 --- a/netbox/provider.go +++ b/netbox/provider.go @@ -64,6 +64,7 @@ func configureProvider(d *schema.ResourceData) (interface{}, error) { defaultScheme := []string{scheme} t := runtimeclient.New(url, client.DefaultBasePath, defaultScheme) - t.DefaultAuthentication = runtimeclient.APIKeyAuth(authHeaderName, "header", fmt.Sprintf(authHeaderFormat, token)) + t.DefaultAuthentication = runtimeclient.APIKeyAuth(authHeaderName, "header", + fmt.Sprintf(authHeaderFormat, token)) return client.New(t, strfmt.Default), nil } diff --git a/netbox/resource_netbox_ipam_ip_addresses.go b/netbox/resource_netbox_ipam_ip_addresses.go index 7e19ba25a..f7e5c9d6b 100644 --- a/netbox/resource_netbox_ipam_ip_addresses.go +++ b/netbox/resource_netbox_ipam_ip_addresses.go @@ -41,10 +41,17 @@ func resourceNetboxIpamIPAddresses() *schema.Resource { regexp.MustCompile("^[-a-zA-Z0-9_.]{1,255}$"), "Must be like ^[-a-zA-Z0-9_.]{1,255}$"), }, - "interface_id": { + "object_id": { Type: schema.TypeInt, Optional: true, }, + "object_type": { + Type: schema.TypeString, + Optional: true, + Default: "", + ValidateFunc: validation.StringInSlice([]string{ + "virtualization.vminterface", "dcim.interface"}, false), + }, "nat_inside_id": { Type: schema.TypeInt, Optional: true, @@ -68,12 +75,21 @@ func resourceNetboxIpamIPAddresses() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"container", "active", "reserved", "deprecated", "dhcp"}, false), }, - "tags": { - Type: schema.TypeSet, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, + "tag": { + Type: schema.TypeSet, Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "slug": { + Type: schema.TypeString, + Required: true, + }, + }, + }, }, "tenant_id": { Type: schema.TypeInt, @@ -89,17 +105,18 @@ func resourceNetboxIpamIPAddresses() *schema.Resource { func resourceNetboxIpamIPAddressesCreate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) address := d.Get("address").(string) description := d.Get("description").(string) dnsName := d.Get("dns_name").(string) - interfaceID := int64(d.Get("interface_id").(int)) + objectID := int64(d.Get("object_id").(int)) + interfaceType := d.Get("object_type").(string) natInsideID := int64(d.Get("nat_inside_id").(int)) natOutsideID := int64(d.Get("nat_outside_id").(int)) role := d.Get("role").(string) status := d.Get("status").(string) - tags := d.Get("tags").(*schema.Set).List() + tags := d.Get("tag").(*schema.Set).List() tenantID := int64(d.Get("tenant_id").(int)) vrfID := int64(d.Get("vrf_id").(int)) @@ -109,11 +126,12 @@ func resourceNetboxIpamIPAddressesCreate(d *schema.ResourceData, DNSName: dnsName, Role: role, Status: status, - Tags: expandToStringSlice(tags), + Tags: convertTagsToNestedTags(tags), } - if interfaceID != 0 { - newResource.Interface = &interfaceID + if objectID != 0 { + newResource.AssignedObjectID = &objectID + newResource.AssignedObjectType = interfaceType } if natInsideID != 0 { @@ -146,7 +164,7 @@ func resourceNetboxIpamIPAddressesCreate(d *schema.ResourceData, func resourceNetboxIpamIPAddressesRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceID := d.Id() params := ipam.NewIpamIPAddressesListParams().WithID(&resourceID) @@ -169,16 +187,21 @@ func resourceNetboxIpamIPAddressesRead(d *schema.ResourceData, return err } - if resource.Interface == nil { - if err = d.Set("vrf_id", nil); err != nil { + if resource.AssignedObjectID == nil { + if err = d.Set("object_id", nil); err != nil { return err } } else { - if err = d.Set("interface_id", resource.Interface.ID); err != nil { + if err = d.Set("object_id", resource.AssignedObjectID); err != nil { return err } } + if err = d.Set("object_type", + resource.AssignedObjectType); err != nil { + return err + } + if resource.NatInside == nil { if err = d.Set("nat_inside_id", nil); err != nil { return err @@ -219,7 +242,7 @@ func resourceNetboxIpamIPAddressesRead(d *schema.ResourceData, } } - if err = d.Set("tags", resource.Tags); err != nil { + if err = d.Set("tag", convertNestedTagsToTags(resource.Tags)); err != nil { return err } @@ -254,9 +277,10 @@ func resourceNetboxIpamIPAddressesRead(d *schema.ResourceData, func resourceNetboxIpamIPAddressesUpdate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) params := &models.WritableIPAddress{} + // Required parameters address := d.Get("address").(string) params.Address = &address @@ -272,10 +296,14 @@ func resourceNetboxIpamIPAddressesUpdate(d *schema.ResourceData, params.DNSName = d.Get("dns_name").(string) } - if d.HasChange("interface_id") { - interfaceID := int64(d.Get("interface_id").(int)) - if interfaceID != 0 { - params.Interface = &interfaceID + if d.HasChange("object_type") { + params.AssignedObjectType = d.Get("object_type").(string) + } + + if d.HasChange("object_id") { + objectID := int64(d.Get("object_id").(int)) + if objectID != 0 { + params.AssignedObjectID = &objectID } } @@ -303,8 +331,8 @@ func resourceNetboxIpamIPAddressesUpdate(d *schema.ResourceData, params.Status = status } - tags := d.Get("tags").(*schema.Set).List() - params.Tags = expandToStringSlice(tags) + tags := d.Get("tag").(*schema.Set).List() + params.Tags = convertTagsToNestedTags(tags) if d.HasChange("tenant_id") { tenantID := int64(d.Get("tenant_id").(int)) @@ -340,7 +368,7 @@ func resourceNetboxIpamIPAddressesUpdate(d *schema.ResourceData, func resourceNetboxIpamIPAddressesDelete(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExists, err := resourceNetboxIpamIPAddressesExists(d, m) if err != nil { @@ -366,7 +394,7 @@ func resourceNetboxIpamIPAddressesDelete(d *schema.ResourceData, func resourceNetboxIpamIPAddressesExists(d *schema.ResourceData, m interface{}) (b bool, e error) { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExist := false resourceID := d.Id() diff --git a/netbox/resource_netbox_ipam_prefix.go b/netbox/resource_netbox_ipam_prefix.go index e75f54226..c5fb5a831 100644 --- a/netbox/resource_netbox_ipam_prefix.go +++ b/netbox/resource_netbox_ipam_prefix.go @@ -50,12 +50,21 @@ func resourceNetboxIpamPrefix() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"container", "active", "reserved", "deprecated"}, false), }, - "tags": { - Type: schema.TypeSet, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, + "tag": { + Type: schema.TypeSet, Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "slug": { + Type: schema.TypeString, + Required: true, + }, + }, + }, }, "tenant_id": { Type: schema.TypeInt, @@ -75,7 +84,7 @@ func resourceNetboxIpamPrefix() *schema.Resource { func resourceNetboxIpamPrefixCreate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) description := d.Get("description").(string) isPool := d.Get("is_pool").(bool) @@ -83,7 +92,7 @@ func resourceNetboxIpamPrefixCreate(d *schema.ResourceData, roleID := int64(d.Get("role_id").(int)) siteID := int64(d.Get("site_id").(int)) status := d.Get("status").(string) - tags := d.Get("tags").(*schema.Set).List() + tags := d.Get("tag").(*schema.Set).List() tenantID := int64(d.Get("tenant_id").(int)) vlanID := int64(d.Get("vlan_id").(int)) vrfID := int64(d.Get("vrf_id").(int)) @@ -93,7 +102,7 @@ func resourceNetboxIpamPrefixCreate(d *schema.ResourceData, IsPool: isPool, Prefix: &prefix, Status: status, - Tags: expandToStringSlice(tags), + Tags: convertTagsToNestedTags(tags), } if roleID != 0 { @@ -130,7 +139,7 @@ func resourceNetboxIpamPrefixCreate(d *schema.ResourceData, func resourceNetboxIpamPrefixRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceID := d.Id() params := ipam.NewIpamPrefixesListParams().WithID(&resourceID) @@ -183,7 +192,7 @@ func resourceNetboxIpamPrefixRead(d *schema.ResourceData, } } - if err = d.Set("tags", resource.Tags); err != nil { + if err = d.Set("tag", convertNestedTagsToTags(resource.Tags)); err != nil { return err } @@ -227,9 +236,13 @@ func resourceNetboxIpamPrefixRead(d *schema.ResourceData, func resourceNetboxIpamPrefixUpdate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) params := &models.WritablePrefix{} + // Required parameters + prefix := d.Get("prefix").(string) + params.Prefix = &prefix + if d.HasChange("description") { description := d.Get("description").(string) params.Description = description @@ -237,9 +250,6 @@ func resourceNetboxIpamPrefixUpdate(d *schema.ResourceData, params.IsPool = d.Get("is_pool").(bool) - prefix := d.Get("prefix").(string) - params.Prefix = &prefix - if d.HasChange("role_id") { roleID := int64(d.Get("role_id").(int)) if roleID != 0 { @@ -258,8 +268,8 @@ func resourceNetboxIpamPrefixUpdate(d *schema.ResourceData, params.Status = d.Get("status").(string) } - tags := d.Get("tags").(*schema.Set).List() - params.Tags = expandToStringSlice(tags) + tags := d.Get("tag").(*schema.Set).List() + params.Tags = convertTagsToNestedTags(tags) if d.HasChange("tenant_id") { tenantID := int64(d.Get("tenant_id").(int)) @@ -301,7 +311,7 @@ func resourceNetboxIpamPrefixUpdate(d *schema.ResourceData, func resourceNetboxIpamPrefixDelete(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExists, err := resourceNetboxIpamPrefixExists(d, m) if err != nil { @@ -327,7 +337,7 @@ func resourceNetboxIpamPrefixDelete(d *schema.ResourceData, func resourceNetboxIpamPrefixExists(d *schema.ResourceData, m interface{}) (b bool, e error) { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExist := false resourceID := d.Id() diff --git a/netbox/resource_netbox_ipam_vlan.go b/netbox/resource_netbox_ipam_vlan.go index fc8d6d4ef..95f7c18dd 100644 --- a/netbox/resource_netbox_ipam_vlan.go +++ b/netbox/resource_netbox_ipam_vlan.go @@ -49,12 +49,21 @@ func resourceNetboxIpamVlan() *schema.Resource { ValidateFunc: validation.StringInSlice([]string{"active", "reserved", "deprecated"}, false), }, - "tags": { - Type: schema.TypeSet, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, + "tag": { + Type: schema.TypeSet, Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "slug": { + Type: schema.TypeString, + Required: true, + }, + }, + }, }, "tenant_id": { Type: schema.TypeInt, @@ -70,7 +79,7 @@ func resourceNetboxIpamVlan() *schema.Resource { func resourceNetboxIpamVlanCreate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) description := d.Get("description").(string) groupID := int64(d.Get("vlan_group_id").(int)) @@ -78,7 +87,7 @@ func resourceNetboxIpamVlanCreate(d *schema.ResourceData, roleID := int64(d.Get("role_id").(int)) siteID := int64(d.Get("site_id").(int)) status := d.Get("status").(string) - tags := d.Get("tags").(*schema.Set).List() + tags := d.Get("tag").(*schema.Set).List() tenantID := int64(d.Get("tenant_id").(int)) vid := int64(d.Get("vlan_id").(int)) @@ -86,7 +95,7 @@ func resourceNetboxIpamVlanCreate(d *schema.ResourceData, Description: description, Name: &name, Status: status, - Tags: expandToStringSlice(tags), + Tags: convertTagsToNestedTags(tags), Vid: &vid, } @@ -119,7 +128,7 @@ func resourceNetboxIpamVlanCreate(d *schema.ResourceData, func resourceNetboxIpamVlanRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceID := d.Id() params := ipam.NewIpamVlansListParams().WithID(&resourceID) @@ -178,7 +187,7 @@ func resourceNetboxIpamVlanRead(d *schema.ResourceData, } } - if err = d.Set("tags", resource.Tags); err != nil { + if err = d.Set("tag", convertNestedTagsToTags(resource.Tags)); err != nil { return err } @@ -206,9 +215,16 @@ func resourceNetboxIpamVlanRead(d *schema.ResourceData, func resourceNetboxIpamVlanUpdate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) params := &models.WritableVLAN{} + // Required parameters + name := d.Get("name").(string) + params.Name = &name + + vid := int64(d.Get("vlan_id").(int)) + params.Vid = &vid + if d.HasChange("description") { description := d.Get("description").(string) params.Description = description @@ -221,11 +237,6 @@ func resourceNetboxIpamVlanUpdate(d *schema.ResourceData, } } - if d.HasChange("name") { - name := d.Get("name").(string) - params.Name = &name - } - if d.HasChange("role_id") { roleID := int64(d.Get("role_id").(int)) if roleID != 0 { @@ -244,8 +255,8 @@ func resourceNetboxIpamVlanUpdate(d *schema.ResourceData, params.Status = d.Get("status").(string) } - tags := d.Get("tags").(*schema.Set).List() - params.Tags = expandToStringSlice(tags) + tags := d.Get("tag").(*schema.Set).List() + params.Tags = convertTagsToNestedTags(tags) if d.HasChange("tenant_id") { tenantID := int64(d.Get("tenant_id").(int)) @@ -254,11 +265,6 @@ func resourceNetboxIpamVlanUpdate(d *schema.ResourceData, } } - if d.HasChange("vlan_id") { - vid := int64(d.Get("vlan_id").(int)) - params.Vid = &vid - } - resource := ipam.NewIpamVlansPartialUpdateParams().WithData( params) @@ -278,7 +284,7 @@ func resourceNetboxIpamVlanUpdate(d *schema.ResourceData, } func resourceNetboxIpamVlanDelete(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExists, err := resourceNetboxIpamVlanExists(d, m) if err != nil { @@ -304,7 +310,7 @@ func resourceNetboxIpamVlanDelete(d *schema.ResourceData, m interface{}) error { func resourceNetboxIpamVlanExists(d *schema.ResourceData, m interface{}) (b bool, e error) { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExist := false vlanID := d.Id() diff --git a/netbox/resource_netbox_ipam_vlan_group.go b/netbox/resource_netbox_ipam_vlan_group.go index 18888a7ea..a9be3817b 100644 --- a/netbox/resource_netbox_ipam_vlan_group.go +++ b/netbox/resource_netbox_ipam_vlan_group.go @@ -43,7 +43,7 @@ func resourceNetboxIpamVlanGroup() *schema.Resource { func resourceNetboxIpamVlanGroupCreate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) groupName := d.Get("name").(string) groupSiteID := int64(d.Get("site_id").(int)) @@ -71,7 +71,7 @@ func resourceNetboxIpamVlanGroupCreate(d *schema.ResourceData, func resourceNetboxIpamVlanGroupRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceID := d.Id() params := ipam.NewIpamVlanGroupsListParams().WithID(&resourceID) @@ -110,12 +110,16 @@ func resourceNetboxIpamVlanGroupRead(d *schema.ResourceData, func resourceNetboxIpamVlanGroupUpdate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) params := &models.WritableVLANGroup{} + // Required parameters name := d.Get("name").(string) params.Name = &name + slug := d.Get("slug").(string) + params.Slug = &slug + if d.HasChange("site_id") { siteID := int64(d.Get("site_id").(int)) if siteID != 0 { @@ -123,11 +127,6 @@ func resourceNetboxIpamVlanGroupUpdate(d *schema.ResourceData, } } - if d.HasChange("slug") { - slug := d.Get("slug").(string) - params.Slug = &slug - } - resource := ipam.NewIpamVlanGroupsPartialUpdateParams().WithData( params) @@ -147,7 +146,7 @@ func resourceNetboxIpamVlanGroupUpdate(d *schema.ResourceData, } func resourceNetboxIpamVlanGroupDelete(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExists, err := resourceNetboxIpamVlanGroupExists(d, m) if err != nil { @@ -173,7 +172,7 @@ func resourceNetboxIpamVlanGroupDelete(d *schema.ResourceData, m interface{}) er func resourceNetboxIpamVlanGroupExists(d *schema.ResourceData, m interface{}) (b bool, e error) { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExist := false resourceID := d.Id() diff --git a/netbox/resource_netbox_tenancy_tenant.go b/netbox/resource_netbox_tenancy_tenant.go index a027626ff..594942496 100644 --- a/netbox/resource_netbox_tenancy_tenant.go +++ b/netbox/resource_netbox_tenancy_tenant.go @@ -48,12 +48,21 @@ func resourceNetboxTenancyTenant() *schema.Resource { regexp.MustCompile("^[-a-zA-Z0-9_]{1,50}$"), "Must be like ^[-a-zA-Z0-9_]{1,50}$"), }, - "tags": { - Type: schema.TypeSet, - Elem: &schema.Schema{ - Type: schema.TypeString, - }, + "tag": { + Type: schema.TypeSet, Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "slug": { + Type: schema.TypeString, + Required: true, + }, + }, + }, }, }, } @@ -61,21 +70,21 @@ func resourceNetboxTenancyTenant() *schema.Resource { func resourceNetboxTenancyTenantCreate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) comments := d.Get("comments").(string) description := d.Get("description").(string) groupID := int64(d.Get("tenant_group_id").(int)) name := d.Get("name").(string) slug := d.Get("slug").(string) - tags := d.Get("tags").(*schema.Set).List() + tags := d.Get("tag").(*schema.Set).List() newResource := &models.WritableTenant{ Comments: comments, Description: description, Name: &name, Slug: &slug, - Tags: expandToStringSlice(tags), + Tags: convertTagsToNestedTags(tags), } if groupID != 0 { @@ -96,7 +105,7 @@ func resourceNetboxTenancyTenantCreate(d *schema.ResourceData, func resourceNetboxTenancyTenantRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceID := d.Id() params := tenancy.NewTenancyTenantsListParams().WithID(&resourceID) @@ -133,7 +142,7 @@ func resourceNetboxTenancyTenantRead(d *schema.ResourceData, return err } - if err = d.Set("tags", resource.Tags); err != nil { + if err = d.Set("tag", convertNestedTagsToTags(resource.Tags)); err != nil { return err } @@ -147,9 +156,16 @@ func resourceNetboxTenancyTenantRead(d *schema.ResourceData, func resourceNetboxTenancyTenantUpdate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) params := &models.WritableTenant{} + // Required parameters + name := d.Get("name").(string) + params.Name = &name + + slug := d.Get("slug").(string) + params.Slug = &slug + if d.HasChange("comments") { comments := d.Get("comments").(string) params.Comments = comments @@ -165,14 +181,8 @@ func resourceNetboxTenancyTenantUpdate(d *schema.ResourceData, params.Group = &groupID } - name := d.Get("name").(string) - params.Name = &name - - slug := d.Get("slug").(string) - params.Slug = &slug - - tags := d.Get("tags").(*schema.Set).List() - params.Tags = expandToStringSlice(tags) + tags := d.Get("tag").(*schema.Set).List() + params.Tags = convertTagsToNestedTags(tags) resource := tenancy.NewTenancyTenantsPartialUpdateParams().WithData(params) @@ -193,7 +203,7 @@ func resourceNetboxTenancyTenantUpdate(d *schema.ResourceData, func resourceNetboxTenancyTenantDelete(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExists, err := resourceNetboxTenancyTenantExists(d, m) if err != nil { @@ -220,7 +230,7 @@ func resourceNetboxTenancyTenantDelete(d *schema.ResourceData, func resourceNetboxTenancyTenantExists(d *schema.ResourceData, m interface{}) (b bool, e error) { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExist := false resourceID := d.Id() diff --git a/netbox/resource_netbox_tenancy_tenant_group.go b/netbox/resource_netbox_tenancy_tenant_group.go index 0784f6bf7..b1b909d4e 100644 --- a/netbox/resource_netbox_tenancy_tenant_group.go +++ b/netbox/resource_netbox_tenancy_tenant_group.go @@ -39,7 +39,7 @@ func resourceNetboxTenancyTenantGroup() *schema.Resource { func resourceNetboxTenancyTenantGroupCreate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) groupName := d.Get("name").(string) groupSlug := d.Get("slug").(string) @@ -63,7 +63,7 @@ func resourceNetboxTenancyTenantGroupCreate(d *schema.ResourceData, func resourceNetboxTenancyTenantGroupRead(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceID := d.Id() params := tenancy.NewTenancyTenantGroupsListParams().WithID(&resourceID) @@ -93,19 +93,18 @@ func resourceNetboxTenancyTenantGroupRead(d *schema.ResourceData, func resourceNetboxTenancyTenantGroupUpdate(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) params := &models.WritableTenantGroup{} + // Required parameters + slug := d.Get("slug").(string) + params.Slug = &slug + if d.HasChange("name") { name := d.Get("name").(string) params.Name = &name } - if d.HasChange("slug") { - slug := d.Get("slug").(string) - params.Slug = &slug - } - resource := tenancy.NewTenancyTenantGroupsPartialUpdateParams().WithData( params) @@ -126,7 +125,7 @@ func resourceNetboxTenancyTenantGroupUpdate(d *schema.ResourceData, func resourceNetboxTenancyTenantGroupDelete(d *schema.ResourceData, m interface{}) error { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExists, err := resourceNetboxTenancyTenantGroupExists(d, m) if err != nil { @@ -153,7 +152,7 @@ func resourceNetboxTenancyTenantGroupDelete(d *schema.ResourceData, func resourceNetboxTenancyTenantGroupExists(d *schema.ResourceData, m interface{}) (b bool, e error) { - client := m.(*netboxclient.NetBox) + client := m.(*netboxclient.NetBoxAPI) resourceExist := false resourceID := d.Id() diff --git a/netbox/util.go b/netbox/util.go index 98f402952..d99d455e5 100644 --- a/netbox/util.go +++ b/netbox/util.go @@ -1,5 +1,9 @@ package netbox +import ( + "github.com/netbox-community/go-netbox/netbox/models" +) + func expandToStringSlice(v []interface{}) []string { s := make([]string, len(v)) for i, val := range v { @@ -11,6 +15,36 @@ func expandToStringSlice(v []interface{}) []string { return s } +func convertTagsToNestedTags(tags []interface{}) []*models.NestedTag { + nestedTags := []*models.NestedTag{} + + for _, tag := range tags { + t := tag.(map[string]interface{}) + + tagName := t["name"].(string) + tagSlug := t["slug"].(string) + + nestedTag := models.NestedTag{Name: &tagName, Slug: &tagSlug} + nestedTags = append(nestedTags, &nestedTag) + } + + return nestedTags +} + +func convertNestedTagsToTags(tags []*models.NestedTag) []map[string]string { + var tfTags []map[string]string + + for _, t := range tags { + tag := map[string]string{} + tag["name"] = *t.Name + tag["slug"] = *t.Slug + + tfTags = append(tfTags, tag) + } + + return tfTags +} + /* * func diffSlices(oldSlice []string, newSlice []string) []string { * var diff []string diff --git a/vendor/github.com/asaskevich/govalidator/.gitignore b/vendor/github.com/asaskevich/govalidator/.gitignore new file mode 100644 index 000000000..8d69a9418 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/.gitignore @@ -0,0 +1,15 @@ +bin/ +.idea/ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + diff --git a/vendor/github.com/asaskevich/govalidator/.travis.yml b/vendor/github.com/asaskevich/govalidator/.travis.yml index e29f8eef5..17c4d0a71 100644 --- a/vendor/github.com/asaskevich/govalidator/.travis.yml +++ b/vendor/github.com/asaskevich/govalidator/.travis.yml @@ -1,14 +1,18 @@ +dist: bionic language: go +env: GO111MODULE=on GOFLAGS='-mod vendor' +install: true +email: false go: - - 1.1 - - 1.2 - - 1.3 - - 1.4 - - 1.5 - - 1.6 + - 1.10 + - 1.11 + - 1.12 + - 1.13 - tip -notifications: - email: - - bwatas@gmail.com +before_script: + - go install github.com/golangci/golangci-lint/cmd/golangci-lint +script: + - golangci-lint run # run a bunch of code checkers/linters in parallel + - go test -v -race ./... # Run all the tests with the race detector enabled diff --git a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md index f0f7e3a8a..7ed268a1e 100644 --- a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md +++ b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md @@ -11,7 +11,7 @@ If you don't know what to do, there are some features and functions that need to - [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) - [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new - [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc -- [ ] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) +- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) - [ ] Implement fuzzing testing - [ ] Implement some struct/map/array utilities - [ ] Implement map/array validation @@ -37,7 +37,7 @@ Anyone can file an expense. If the expense makes sense for the development of th ### Contributors Thank you to all the people who have already contributed to govalidator! - + ### Backers diff --git a/vendor/github.com/asaskevich/govalidator/README.md b/vendor/github.com/asaskevich/govalidator/README.md index 40f9a8781..78f999e83 100644 --- a/vendor/github.com/asaskevich/govalidator/README.md +++ b/vendor/github.com/asaskevich/govalidator/README.md @@ -13,7 +13,7 @@ Type the following command in your terminal: or you can get specified release of the package with `gopkg.in`: - go get gopkg.in/asaskevich/govalidator.v4 + go get gopkg.in/asaskevich/govalidator.v10 After it the package is ready to use. @@ -83,14 +83,14 @@ This was changed to prevent data races when accessing custom validators. import "github.com/asaskevich/govalidator" // before -govalidator.CustomTypeTagMap["customByteArrayValidator"] = CustomTypeValidator(func(i interface{}, o interface{}) bool { +govalidator.CustomTypeTagMap["customByteArrayValidator"] = func(i interface{}, o interface{}) bool { // ... -}) +} // after -govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator(func(i interface{}, o interface{}) bool { +govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, o interface{}) bool { // ... -})) +}) ``` #### List of functions: @@ -108,23 +108,34 @@ func Filter(array []interface{}, iterator ConditionIterator) []interface{} func Find(array []interface{}, iterator ConditionIterator) interface{} func GetLine(s string, index int) (string, error) func GetLines(s string) []string -func InRange(value, left, right float64) bool +func HasLowerCase(str string) bool +func HasUpperCase(str string) bool +func HasWhitespace(str string) bool +func HasWhitespaceOnly(str string) bool +func InRange(value interface{}, left interface{}, right interface{}) bool +func InRangeFloat32(value, left, right float32) bool +func InRangeFloat64(value, left, right float64) bool +func InRangeInt(value, left, right interface{}) bool func IsASCII(str string) bool func IsAlpha(str string) bool func IsAlphanumeric(str string) bool func IsBase64(str string) bool func IsByteLength(str string, min, max int) bool func IsCIDR(str string) bool +func IsCRC32(str string) bool +func IsCRC32b(str string) bool func IsCreditCard(str string) bool func IsDNSName(str string) bool func IsDataURI(str string) bool func IsDialString(str string) bool func IsDivisibleBy(str, num string) bool func IsEmail(str string) bool +func IsExistingEmail(email string) bool func IsFilePath(str string) (bool, int) func IsFloat(str string) bool func IsFullWidth(str string) bool func IsHalfWidth(str string) bool +func IsHash(str string, algorithm string) bool func IsHexadecimal(str string) bool func IsHexcolor(str string) bool func IsHost(str string) bool @@ -136,22 +147,27 @@ func IsISBN10(str string) bool func IsISBN13(str string) bool func IsISO3166Alpha2(str string) bool func IsISO3166Alpha3(str string) bool +func IsISO4217(str string) bool func IsISO693Alpha2(str string) bool func IsISO693Alpha3b(str string) bool -func IsISO4217(str string) bool func IsIn(str string, params ...string) bool +func IsInRaw(str string, params ...string) bool func IsInt(str string) bool func IsJSON(str string) bool func IsLatitude(str string) bool func IsLongitude(str string) bool func IsLowerCase(str string) bool func IsMAC(str string) bool +func IsMD4(str string) bool +func IsMD5(str string) bool +func IsMagnetURI(str string) bool func IsMongoID(str string) bool func IsMultibyte(str string) bool func IsNatural(value float64) bool func IsNegative(value float64) bool func IsNonNegative(value float64) bool func IsNonPositive(value float64) bool +func IsNotNull(str string) bool func IsNull(str string) bool func IsNumeric(str string) bool func IsPort(str string) bool @@ -162,9 +178,21 @@ func IsRFC3339WithoutZone(str string) bool func IsRGBcolor(str string) bool func IsRequestURI(rawurl string) bool func IsRequestURL(rawurl string) bool +func IsRipeMD128(str string) bool +func IsRipeMD160(str string) bool +func IsRsaPub(str string, params ...string) bool +func IsRsaPublicKey(str string, keylen int) bool +func IsSHA1(str string) bool +func IsSHA256(str string) bool +func IsSHA384(str string) bool +func IsSHA512(str string) bool func IsSSN(str string) bool func IsSemver(str string) bool +func IsTiger128(str string) bool +func IsTiger160(str string) bool +func IsTiger192(str string) bool func IsTime(str string, format string) bool +func IsType(v interface{}, params ...string) bool func IsURL(str string) bool func IsUTFDigit(str string) bool func IsUTFLetter(str string) bool @@ -174,16 +202,20 @@ func IsUUID(str string) bool func IsUUIDv3(str string) bool func IsUUIDv4(str string) bool func IsUUIDv5(str string) bool +func IsUnixTime(str string) bool func IsUpperCase(str string) bool func IsVariableWidth(str string) bool func IsWhole(value float64) bool func LeftTrim(str, chars string) string func Map(array []interface{}, iterator ResultIterator) []interface{} func Matches(str, pattern string) bool +func MaxStringLength(str string, params ...string) bool +func MinStringLength(str string, params ...string) bool func NormalizeEmail(str string) (string, error) func PadBoth(str string, padStr string, padLen int) string func PadLeft(str string, padStr string, padLen int) string func PadRight(str string, padStr string, padLen int) string +func PrependPathToErrors(err error, path string) error func Range(str string, params ...string) bool func RemoveTags(s string) string func ReplacePattern(str, pattern, replace string) string @@ -192,18 +224,21 @@ func RightTrim(str, chars string) string func RuneLength(str string, params ...string) bool func SafeFileName(str string) string func SetFieldsRequiredByDefault(value bool) +func SetNilPtrAllowedByRequired(value bool) func Sign(value float64) float64 func StringLength(str string, params ...string) bool func StringMatches(s string, params ...string) bool func StripLow(str string, keepNewLines bool) string func ToBoolean(str string) (bool, error) func ToFloat(str string) (float64, error) -func ToInt(str string) (int64, error) +func ToInt(value interface{}) (res int64, err error) func ToJSON(obj interface{}) (string, error) func ToString(obj interface{}) string func Trim(str, chars string) string func Truncate(str string, length int, ending string) string +func TruncatingErrorf(str string, args ...interface{}) error func UnderscoreToCamelCase(s string) string +func ValidateMap(inputMap map[string]interface{}, validationMap map[string]interface{}) (bool, error) func ValidateStruct(s interface{}) (bool, error) func WhiteList(str, chars string) string type ConditionIterator @@ -214,6 +249,8 @@ type Errors func (es Errors) Error() string func (es Errors) Errors() []error type ISO3166Entry +type ISO693Entry +type InterfaceParamValidator type Iterator type ParamValidator type ResultIterator @@ -227,6 +264,27 @@ type Validator ```go println(govalidator.IsURL(`http://user@pass:domain.com/path/page`)) ``` +###### IsType +```go +println(govalidator.IsType("Bob", "string")) +println(govalidator.IsType(1, "int")) +i := 1 +println(govalidator.IsType(&i, "*int")) +``` + +IsType can be used through the tag `type` which is essential for map validation: +```go +type User struct { + Name string `valid:"type(string)"` + Age int `valid:"type(int)"` + Meta interface{} `valid:"type(string)"` +} +result, err := govalidator.ValidateStruct(user{"Bob", 20, "meta"}) +if err != nil { + println("error: " + err.Error()) +} +println(result) +``` ###### ToString ```go type User struct { @@ -335,6 +393,11 @@ Validators with parameters "in(string1|string2|...|stringN)": IsIn, "rsapub(keylength)" : IsRsaPub, ``` +Validators with parameters for any type + +```go +"type(type)": IsType, +``` And here is small example of usage: ```go @@ -370,6 +433,41 @@ if err != nil { } println(result) ``` +###### ValidateMap [#2](https://github.com/asaskevich/govalidator/pull/338) +If you want to validate maps, you can use the map to be validated and a validation map that contain the same tags used in ValidateStruct, both maps have to be in the form `map[string]interface{}` + +So here is small example of usage: +```go +var mapTemplate = map[string]interface{}{ + "name":"required,alpha", + "family":"required,alpha", + "email":"required,email", + "cell-phone":"numeric", + "address":map[string]interface{}{ + "line1":"required,alphanum", + "line2":"alphanum", + "postal-code":"numeric", + }, +} + +var inputMap = map[string]interface{}{ + "name":"Bob", + "family":"Smith", + "email":"foo@bar.baz", + "address":map[string]interface{}{ + "line1":"", + "line2":"", + "postal-code":"", + }, +} + +result, err := govalidator.ValidateMap(inputMap, mapTemplate) +if err != nil { + println("error: " + err.Error()) +} +println(result) +``` + ###### WhiteList ```go // Remove all characters from string ignoring characters between "a" and "z" @@ -389,7 +487,7 @@ type StructWithCustomByteArray struct { CustomMinLength int `valid:"-"` } -govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator(func(i interface{}, context interface{}) bool { +govalidator.CustomTypeTagMap.Set("customByteArrayValidator", func(i interface{}, context interface{}) bool { switch v := context.(type) { // you can type switch on the context interface being validated case StructWithCustomByteArray: // you can check and validate against some other field in the context, @@ -409,14 +507,25 @@ govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator } } return false -})) -govalidator.CustomTypeTagMap.Set("customMinLengthValidator", CustomTypeValidator(func(i interface{}, context interface{}) bool { +}) +govalidator.CustomTypeTagMap.Set("customMinLengthValidator", func(i interface{}, context interface{}) bool { switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation case StructWithCustomByteArray: return len(v.ID) >= v.CustomMinLength } return false -})) +}) +``` + +###### Loop over Error() +By default .Error() returns all errors in a single String. To access each error you can do this: +```go + if err != nil { + errs := err.(govalidator.Errors).Errors() + for _, e := range errs { + fmt.Println(e.Error()) + } + } ``` ###### Custom error messages @@ -445,7 +554,7 @@ If you don't know what to do, there are some features and functions that need to - [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) - [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new - [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc -- [ ] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) +- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) - [ ] Implement fuzzing testing - [ ] Implement some struct/map/array utilities - [ ] Implement map/array validation @@ -475,7 +584,7 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR * [Matt Sanford](https://github.com/mzsanford) * [Simon ccl1115](https://github.com/ccl1115) - + ### Backers @@ -504,4 +613,4 @@ Support this project by becoming a sponsor. Your logo will show up here with a l ## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large) \ No newline at end of file +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large) diff --git a/vendor/github.com/asaskevich/govalidator/doc.go b/vendor/github.com/asaskevich/govalidator/doc.go new file mode 100644 index 000000000..55dce62dc --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/doc.go @@ -0,0 +1,3 @@ +package govalidator + +// A package of validators and sanitizers for strings, structures and collections. diff --git a/vendor/github.com/asaskevich/govalidator/error.go b/vendor/github.com/asaskevich/govalidator/error.go index 655b750cb..1da2336f4 100644 --- a/vendor/github.com/asaskevich/govalidator/error.go +++ b/vendor/github.com/asaskevich/govalidator/error.go @@ -1,6 +1,9 @@ package govalidator -import "strings" +import ( + "sort" + "strings" +) // Errors is an array of multiple errors and conforms to the error interface. type Errors []error @@ -15,6 +18,7 @@ func (es Errors) Error() string { for _, e := range es { errs = append(errs, e.Error()) } + sort.Strings(errs) return strings.Join(errs, ";") } diff --git a/vendor/github.com/asaskevich/govalidator/go.mod b/vendor/github.com/asaskevich/govalidator/go.mod new file mode 100644 index 000000000..c1ce891df --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/go.mod @@ -0,0 +1,3 @@ +module github.com/asaskevich/govalidator + +go 1.12 diff --git a/vendor/github.com/asaskevich/govalidator/patterns.go b/vendor/github.com/asaskevich/govalidator/patterns.go index 61a05d438..e55451cff 100644 --- a/vendor/github.com/asaskevich/govalidator/patterns.go +++ b/vendor/github.com/asaskevich/govalidator/patterns.go @@ -4,49 +4,51 @@ import "regexp" // Basic regular expressions for validating strings const ( - Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" - CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$" - ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$" - ISBN13 string = "^(?:[0-9]{13})$" - UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" - UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" - UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" - Alpha string = "^[a-zA-Z]+$" - Alphanumeric string = "^[a-zA-Z0-9]+$" - Numeric string = "^[0-9]+$" - Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$" - Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$" - Hexadecimal string = "^[0-9a-fA-F]+$" - Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" - RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$" - ASCII string = "^[\x00-\x7F]+$" - Multibyte string = "[^\x00-\x7F]" - FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" - HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" - Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" - PrintableASCII string = "^[\x20-\x7E]+$" - DataURI string = "^data:.+\\/(.+);base64$" - Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" - Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" - DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$` - IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))` - URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` - URLUsername string = `(\S+(:\S*)?@)` - URLPath string = `((\/|\?|#)[^\s]*)` - URLPort string = `(:(\d{1,5}))` - URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3])(\.(1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-4]))` - URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` - URL string = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` - SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` - WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` - UnixPath string = `^(/[^/\x00]*)+/?$` - Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$" - tagName string = "valid" - hasLowerCase string = ".*[[:lower:]]" - hasUpperCase string = ".*[[:upper:]]" - hasWhitespace string = ".*[[:space:]]" - hasWhitespaceOnly string = "^[[:space:]]+$" + Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" + CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$" + ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$" + ISBN13 string = "^(?:[0-9]{13})$" + UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" + UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" + UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" + UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" + Alpha string = "^[a-zA-Z]+$" + Alphanumeric string = "^[a-zA-Z0-9]+$" + Numeric string = "^[0-9]+$" + Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$" + Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$" + Hexadecimal string = "^[0-9a-fA-F]+$" + Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$" + ASCII string = "^[\x00-\x7F]+$" + Multibyte string = "[^\x00-\x7F]" + FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" + HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" + Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" + PrintableASCII string = "^[\x20-\x7E]+$" + DataURI string = "^data:.+\\/(.+);base64$" + MagnetURI string = "^magnet:\\?xt=urn:[a-zA-Z0-9]+:[a-zA-Z0-9]{32,40}&dn=.+&tr=.+$" + Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" + Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" + DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$` + IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))` + URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` + URLUsername string = `(\S+(:\S*)?@)` + URLPath string = `((\/|\?|#)[^\s]*)` + URLPort string = `(:(\d{1,5}))` + URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))` + URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` + URL string = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` + SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` + WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` + UnixPath string = `^(/[^/\x00]*)+/?$` + Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$" + tagName string = "valid" + hasLowerCase string = ".*[[:lower:]]" + hasUpperCase string = ".*[[:upper:]]" + hasWhitespace string = ".*[[:space:]]" + hasWhitespaceOnly string = "^[[:space:]]+$" + IMEI string = "^[0-9a-f]{14}$|^\\d{15}$|^\\d{18}$" ) // Used by IsFilePath func @@ -60,42 +62,44 @@ const ( ) var ( - userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$") - hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$") - userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})") - rxEmail = regexp.MustCompile(Email) - rxCreditCard = regexp.MustCompile(CreditCard) - rxISBN10 = regexp.MustCompile(ISBN10) - rxISBN13 = regexp.MustCompile(ISBN13) - rxUUID3 = regexp.MustCompile(UUID3) - rxUUID4 = regexp.MustCompile(UUID4) - rxUUID5 = regexp.MustCompile(UUID5) - rxUUID = regexp.MustCompile(UUID) - rxAlpha = regexp.MustCompile(Alpha) - rxAlphanumeric = regexp.MustCompile(Alphanumeric) - rxNumeric = regexp.MustCompile(Numeric) - rxInt = regexp.MustCompile(Int) - rxFloat = regexp.MustCompile(Float) - rxHexadecimal = regexp.MustCompile(Hexadecimal) - rxHexcolor = regexp.MustCompile(Hexcolor) - rxRGBcolor = regexp.MustCompile(RGBcolor) - rxASCII = regexp.MustCompile(ASCII) - rxPrintableASCII = regexp.MustCompile(PrintableASCII) - rxMultibyte = regexp.MustCompile(Multibyte) - rxFullWidth = regexp.MustCompile(FullWidth) - rxHalfWidth = regexp.MustCompile(HalfWidth) - rxBase64 = regexp.MustCompile(Base64) - rxDataURI = regexp.MustCompile(DataURI) - rxLatitude = regexp.MustCompile(Latitude) - rxLongitude = regexp.MustCompile(Longitude) - rxDNSName = regexp.MustCompile(DNSName) - rxURL = regexp.MustCompile(URL) - rxSSN = regexp.MustCompile(SSN) - rxWinPath = regexp.MustCompile(WinPath) - rxUnixPath = regexp.MustCompile(UnixPath) - rxSemver = regexp.MustCompile(Semver) - rxHasLowerCase = regexp.MustCompile(hasLowerCase) - rxHasUpperCase = regexp.MustCompile(hasUpperCase) - rxHasWhitespace = regexp.MustCompile(hasWhitespace) - rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly) + userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$") + hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$") + userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})") + rxEmail = regexp.MustCompile(Email) + rxCreditCard = regexp.MustCompile(CreditCard) + rxISBN10 = regexp.MustCompile(ISBN10) + rxISBN13 = regexp.MustCompile(ISBN13) + rxUUID3 = regexp.MustCompile(UUID3) + rxUUID4 = regexp.MustCompile(UUID4) + rxUUID5 = regexp.MustCompile(UUID5) + rxUUID = regexp.MustCompile(UUID) + rxAlpha = regexp.MustCompile(Alpha) + rxAlphanumeric = regexp.MustCompile(Alphanumeric) + rxNumeric = regexp.MustCompile(Numeric) + rxInt = regexp.MustCompile(Int) + rxFloat = regexp.MustCompile(Float) + rxHexadecimal = regexp.MustCompile(Hexadecimal) + rxHexcolor = regexp.MustCompile(Hexcolor) + rxRGBcolor = regexp.MustCompile(RGBcolor) + rxASCII = regexp.MustCompile(ASCII) + rxPrintableASCII = regexp.MustCompile(PrintableASCII) + rxMultibyte = regexp.MustCompile(Multibyte) + rxFullWidth = regexp.MustCompile(FullWidth) + rxHalfWidth = regexp.MustCompile(HalfWidth) + rxBase64 = regexp.MustCompile(Base64) + rxDataURI = regexp.MustCompile(DataURI) + rxMagnetURI = regexp.MustCompile(MagnetURI) + rxLatitude = regexp.MustCompile(Latitude) + rxLongitude = regexp.MustCompile(Longitude) + rxDNSName = regexp.MustCompile(DNSName) + rxURL = regexp.MustCompile(URL) + rxSSN = regexp.MustCompile(SSN) + rxWinPath = regexp.MustCompile(WinPath) + rxUnixPath = regexp.MustCompile(UnixPath) + rxSemver = regexp.MustCompile(Semver) + rxHasLowerCase = regexp.MustCompile(hasLowerCase) + rxHasUpperCase = regexp.MustCompile(hasUpperCase) + rxHasWhitespace = regexp.MustCompile(hasWhitespace) + rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly) + rxIMEI = regexp.MustCompile(IMEI) ) diff --git a/vendor/github.com/asaskevich/govalidator/types.go b/vendor/github.com/asaskevich/govalidator/types.go index 4f7e9274a..b57b666f5 100644 --- a/vendor/github.com/asaskevich/govalidator/types.go +++ b/vendor/github.com/asaskevich/govalidator/types.go @@ -16,6 +16,7 @@ type CustomTypeValidator func(i interface{}, o interface{}) bool // ParamValidator is a wrapper for validator functions that accepts additional parameters. type ParamValidator func(str string, params ...string) bool +type InterfaceParamValidator func(in interface{}, params ...string) bool type tagOptionsMap map[string]tagOption func (t tagOptionsMap) orderedKeys() []string { @@ -46,15 +47,27 @@ type UnsupportedTypeError struct { // It implements the methods to sort by string. type stringValues []reflect.Value +// InterfaceParamTagMap is a map of functions accept variants parameters for an interface value +var InterfaceParamTagMap = map[string]InterfaceParamValidator{ + "type": IsType, +} + +// InterfaceParamTagRegexMap maps interface param tags to their respective regexes. +var InterfaceParamTagRegexMap = map[string]*regexp.Regexp{ + "type": regexp.MustCompile(`^type\((.*)\)$`), +} + // ParamTagMap is a map of functions accept variants parameters var ParamTagMap = map[string]ParamValidator{ - "length": ByteLength, - "range": Range, - "runelength": RuneLength, - "stringlength": StringLength, - "matches": StringMatches, - "in": isInRaw, - "rsapub": IsRsaPub, + "length": ByteLength, + "range": Range, + "runelength": RuneLength, + "stringlength": StringLength, + "matches": StringMatches, + "in": IsInRaw, + "rsapub": IsRsaPub, + "minstringlength": MinStringLength, + "maxstringlength": MaxStringLength, } // ParamTagRegexMap maps param tags to their respective regexes. @@ -66,6 +79,8 @@ var ParamTagRegexMap = map[string]*regexp.Regexp{ "in": regexp.MustCompile(`^in\((.*)\)`), "matches": regexp.MustCompile(`^matches\((.+)\)$`), "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"), + "minstringlength": regexp.MustCompile("^minstringlength\\((\\d+)\\)$"), + "maxstringlength": regexp.MustCompile("^maxstringlength\\((\\d+)\\)$"), } type customTypeTagMap struct { @@ -114,6 +129,7 @@ var TagMap = map[string]Validator{ "int": IsInt, "float": IsFloat, "null": IsNull, + "notnull": IsNotNull, "uuid": IsUUID, "uuidv3": IsUUIDv3, "uuidv4": IsUUIDv4, @@ -146,6 +162,7 @@ var TagMap = map[string]Validator{ "ISO3166Alpha2": IsISO3166Alpha2, "ISO3166Alpha3": IsISO3166Alpha3, "ISO4217": IsISO4217, + "IMEI": IsIMEI, } // ISO3166Entry stores country codes diff --git a/vendor/github.com/asaskevich/govalidator/utils.go b/vendor/github.com/asaskevich/govalidator/utils.go index a0b706a74..f4c30f824 100644 --- a/vendor/github.com/asaskevich/govalidator/utils.go +++ b/vendor/github.com/asaskevich/govalidator/utils.go @@ -12,20 +12,20 @@ import ( "unicode/utf8" ) -// Contains check if the string contains the substring. +// Contains checks if the string contains the substring. func Contains(str, substring string) bool { return strings.Contains(str, substring) } -// Matches check if string matches the pattern (pattern is regular expression) +// Matches checks if string matches the pattern (pattern is regular expression) // In case of error return false func Matches(str, pattern string) bool { match, _ := regexp.MatchString(pattern, str) return match } -// LeftTrim trim characters from the left-side of the input. -// If second argument is empty, it's will be remove leading spaces. +// LeftTrim trims characters from the left side of the input. +// If second argument is empty, it will remove leading spaces. func LeftTrim(str, chars string) string { if chars == "" { return strings.TrimLeftFunc(str, unicode.IsSpace) @@ -34,8 +34,8 @@ func LeftTrim(str, chars string) string { return r.ReplaceAllString(str, "") } -// RightTrim trim characters from the right-side of the input. -// If second argument is empty, it's will be remove spaces. +// RightTrim trims characters from the right side of the input. +// If second argument is empty, it will remove trailing spaces. func RightTrim(str, chars string) string { if chars == "" { return strings.TrimRightFunc(str, unicode.IsSpace) @@ -44,27 +44,27 @@ func RightTrim(str, chars string) string { return r.ReplaceAllString(str, "") } -// Trim trim characters from both sides of the input. -// If second argument is empty, it's will be remove spaces. +// Trim trims characters from both sides of the input. +// If second argument is empty, it will remove spaces. func Trim(str, chars string) string { return LeftTrim(RightTrim(str, chars), chars) } -// WhiteList remove characters that do not appear in the whitelist. +// WhiteList removes characters that do not appear in the whitelist. func WhiteList(str, chars string) string { pattern := "[^" + chars + "]+" r, _ := regexp.Compile(pattern) return r.ReplaceAllString(str, "") } -// BlackList remove characters that appear in the blacklist. +// BlackList removes characters that appear in the blacklist. func BlackList(str, chars string) string { pattern := "[" + chars + "]+" r, _ := regexp.Compile(pattern) return r.ReplaceAllString(str, "") } -// StripLow remove characters with a numerical value < 32 and 127, mostly control characters. +// StripLow removes characters with a numerical value < 32 and 127, mostly control characters. // If keep_new_lines is true, newline characters are preserved (\n and \r, hex 0xA and 0xD). func StripLow(str string, keepNewLines bool) string { chars := "" @@ -76,13 +76,13 @@ func StripLow(str string, keepNewLines bool) string { return BlackList(str, chars) } -// ReplacePattern replace regular expression pattern in string +// ReplacePattern replaces regular expression pattern in string func ReplacePattern(str, pattern, replace string) string { r, _ := regexp.Compile(pattern) return r.ReplaceAllString(str, replace) } -// Escape replace <, >, & and " with HTML entities. +// Escape replaces <, >, & and " with HTML entities. var Escape = html.EscapeString func addSegment(inrune, segment []rune) []rune { @@ -120,7 +120,7 @@ func CamelCaseToUnderscore(str string) string { return string(output) } -// Reverse return reversed string +// Reverse returns reversed string func Reverse(s string) string { r := []rune(s) for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 { @@ -129,12 +129,12 @@ func Reverse(s string) string { return string(r) } -// GetLines split string by "\n" and return array of lines +// GetLines splits string by "\n" and return array of lines func GetLines(s string) []string { return strings.Split(s, "\n") } -// GetLine return specified line of multiline string +// GetLine returns specified line of multiline string func GetLine(s string, index int) (string, error) { lines := GetLines(s) if index < 0 || index >= len(lines) { @@ -143,12 +143,12 @@ func GetLine(s string, index int) (string, error) { return lines[index], nil } -// RemoveTags remove all tags from HTML string +// RemoveTags removes all tags from HTML string func RemoveTags(s string) string { return ReplacePattern(s, "<[^>]*>", "") } -// SafeFileName return safe string that can be used in file names +// SafeFileName returns safe string that can be used in file names func SafeFileName(str string) string { name := strings.ToLower(str) name = path.Clean(path.Base(name)) @@ -210,23 +210,23 @@ func Truncate(str string, length int, ending string) string { return str } -// PadLeft pad left side of string if size of string is less then indicated pad length +// PadLeft pads left side of a string if size of string is less then indicated pad length func PadLeft(str string, padStr string, padLen int) string { return buildPadStr(str, padStr, padLen, true, false) } -// PadRight pad right side of string if size of string is less then indicated pad length +// PadRight pads right side of a string if size of string is less then indicated pad length func PadRight(str string, padStr string, padLen int) string { return buildPadStr(str, padStr, padLen, false, true) } -// PadBoth pad sides of string if size of string is less then indicated pad length +// PadBoth pads both sides of a string if size of string is less then indicated pad length func PadBoth(str string, padStr string, padLen int) string { return buildPadStr(str, padStr, padLen, true, true) } -// PadString either left, right or both sides, not the padding string can be unicode and more then one -// character +// PadString either left, right or both sides. +// Note that padding string can be unicode and more then one character func buildPadStr(str string, padStr string, padLen int, padLeft bool, padRight bool) string { // When padded length is less then the current string size diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go index b18bbcb4c..298f9920d 100644 --- a/vendor/github.com/asaskevich/govalidator/validator.go +++ b/vendor/github.com/asaskevich/govalidator/validator.go @@ -282,7 +282,7 @@ func HasLowerCase(str string) bool { return rxHasLowerCase.MatchString(str) } -// HasUpperCase check if the string contians as least 1 uppercase. Empty string is valid. +// HasUpperCase check if the string contains as least 1 uppercase. Empty string is valid. func HasUpperCase(str string) bool { if IsNull(str) { return true @@ -321,14 +321,19 @@ func IsNull(str string) bool { return len(str) == 0 } +// IsNotNull check if the string is not null. +func IsNotNull(str string) bool { + return !IsNull(str) +} + // HasWhitespaceOnly checks the string only contains whitespace func HasWhitespaceOnly(str string) bool { - return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str) + return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str) } // HasWhitespace checks if the string contains any whitespace func HasWhitespace(str string) bool { - return len(str) > 0 && rxHasWhitespace.MatchString(str) + return len(str) > 0 && rxHasWhitespace.MatchString(str) } // IsByteLength check if the string's length (in bytes) falls in a range. @@ -513,6 +518,11 @@ func IsDataURI(str string) bool { return IsBase64(dataURI[1]) } +// IsMagnetURI checks if a string is valid magnet URI +func IsMagnetURI(str string) bool { + return rxMagnetURI.MatchString(str) +} + // IsISO3166Alpha2 checks if a string is valid two-letter country code func IsISO3166Alpha2(str string) bool { for _, entry := range ISO3166List { @@ -565,7 +575,7 @@ func IsDNSName(str string) bool { // IsHash checks if a string is a hash of type algorithm. // Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b'] func IsHash(str string, algorithm string) bool { - len := "0" + var len string algo := strings.ToLower(algorithm) if algo == "crc32" || algo == "crc32b" { @@ -589,9 +599,73 @@ func IsHash(str string, algorithm string) bool { return Matches(str, "^[a-f0-9]{"+len+"}$") } +// IsSHA512 checks is a string is a SHA512 hash. Alias for `IsHash(str, "sha512")` +func IsSHA512(str string) bool { + return IsHash(str, "sha512") +} + +// IsSHA384 checks is a string is a SHA384 hash. Alias for `IsHash(str, "sha384")` +func IsSHA384(str string) bool { + return IsHash(str, "sha384") +} + +// IsSHA256 checks is a string is a SHA256 hash. Alias for `IsHash(str, "sha256")` +func IsSHA256(str string) bool { + return IsHash(str, "sha256") +} + +// IsTiger192 checks is a string is a Tiger192 hash. Alias for `IsHash(str, "tiger192")` +func IsTiger192(str string) bool { + return IsHash(str, "tiger192") +} + +// IsTiger160 checks is a string is a Tiger160 hash. Alias for `IsHash(str, "tiger160")` +func IsTiger160(str string) bool { + return IsHash(str, "tiger160") +} + +// IsRipeMD160 checks is a string is a RipeMD160 hash. Alias for `IsHash(str, "ripemd160")` +func IsRipeMD160(str string) bool { + return IsHash(str, "ripemd160") +} + +// IsSHA1 checks is a string is a SHA-1 hash. Alias for `IsHash(str, "sha1")` +func IsSHA1(str string) bool { + return IsHash(str, "sha1") +} + +// IsTiger128 checks is a string is a Tiger128 hash. Alias for `IsHash(str, "tiger128")` +func IsTiger128(str string) bool { + return IsHash(str, "tiger128") +} + +// IsRipeMD128 checks is a string is a RipeMD128 hash. Alias for `IsHash(str, "ripemd128")` +func IsRipeMD128(str string) bool { + return IsHash(str, "ripemd128") +} + +// IsCRC32 checks is a string is a CRC32 hash. Alias for `IsHash(str, "crc32")` +func IsCRC32(str string) bool { + return IsHash(str, "crc32") +} + +// IsCRC32b checks is a string is a CRC32b hash. Alias for `IsHash(str, "crc32b")` +func IsCRC32b(str string) bool { + return IsHash(str, "crc32b") +} + +// IsMD5 checks is a string is a MD5 hash. Alias for `IsHash(str, "md5")` +func IsMD5(str string) bool { + return IsHash(str, "md5") +} + +// IsMD4 checks is a string is a MD4 hash. Alias for `IsHash(str, "md4")` +func IsMD4(str string) bool { + return IsHash(str, "md4") +} + // IsDialString validates the given string for usage with the various Dial() functions func IsDialString(str string) bool { - if h, p, err := net.SplitHostPort(str); err == nil && h != "" && p != "" && (IsDNSName(h) || IsIP(h)) && IsPort(p) { return true } @@ -599,7 +673,7 @@ func IsDialString(str string) bool { return false } -// IsIP checks if a string is either IP version 4 or 6. +// IsIP checks if a string is either IP version 4 or 6. Alias for `net.ParseIP` func IsIP(str string) bool { return net.ParseIP(str) != nil } @@ -663,6 +737,11 @@ func IsLongitude(str string) bool { return rxLongitude.MatchString(str) } +// IsIMEI check if a string is valid IMEI +func IsIMEI(str string) bool { + return rxIMEI.MatchString(str) +} + // IsRsaPublicKey check if a string is valid public key with provided length func IsRsaPublicKey(str string, keylen int) bool { bb := bytes.NewBufferString(str) @@ -729,12 +808,116 @@ func PrependPathToErrors(err error, path string) error { } return err2 } - fmt.Println(err) return err } +// ValidateMap use validation map for fields. +// result will be equal to `false` if there are any errors. +// s is the map containing the data to be validated. +// m is the validation map in the form: +// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}} +func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) { + if s == nil { + return true, nil + } + result := true + var err error + var errs Errors + var index int + val := reflect.ValueOf(s) + for key, value := range s { + presentResult := true + validator, ok := m[key] + if !ok { + presentResult = false + var err error + err = fmt.Errorf("all map keys has to be present in the validation map; got %s", key) + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } + valueField := reflect.ValueOf(value) + mapResult := true + typeResult := true + structResult := true + resultField := true + switch subValidator := validator.(type) { + case map[string]interface{}: + var err error + if v, ok := value.(map[string]interface{}); !ok { + mapResult = false + err = fmt.Errorf("map validator has to be for the map type only; got %s", valueField.Type().String()) + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } else { + mapResult, err = ValidateMap(v, subValidator) + if err != nil { + mapResult = false + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } + } + case string: + if (valueField.Kind() == reflect.Struct || + (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && + subValidator != "-" { + var err error + structResult, err = ValidateStruct(valueField.Interface()) + if err != nil { + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } + } + resultField, err = typeCheck(valueField, reflect.StructField{ + Name: key, + PkgPath: "", + Type: val.Type(), + Tag: reflect.StructTag(fmt.Sprintf("%s:%q", tagName, subValidator)), + Offset: 0, + Index: []int{index}, + Anonymous: false, + }, val, nil) + if err != nil { + errs = append(errs, err) + } + case nil: + // already handlerd when checked before + default: + typeResult = false + err = fmt.Errorf("map validator has to be either map[string]interface{} or string; got %s", valueField.Type().String()) + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } + result = result && presentResult && typeResult && resultField && structResult && mapResult + index++ + } + // check required keys + requiredResult := true + for key, value := range m { + if schema, ok := value.(string); ok { + tags := parseTagIntoMap(schema) + if required, ok := tags["required"]; ok { + if _, ok := s[key]; !ok { + requiredResult = false + if required.customErrorMessage != "" { + err = Error{key, fmt.Errorf(required.customErrorMessage), true, "required", []string{}} + } else { + err = Error{key, fmt.Errorf("required field missing"), false, "required", []string{}} + } + errs = append(errs, err) + } + } + } + } + + if len(errs) > 0 { + err = errs + } + return result && requiredResult, err +} + // ValidateStruct use tags for fields. // result will be equal to `false` if there are any errors. +// todo currently there is no guarantee that errors will be returned in predictable order (tests may to fail) func ValidateStruct(s interface{}) (bool, error) { if s == nil { return true, nil @@ -856,12 +1039,29 @@ func IsSemver(str string) bool { return rxSemver.MatchString(str) } +// IsType check if interface is of some type +func IsType(v interface{}, params ...string) bool { + if len(params) == 1 { + typ := params[0] + return strings.Replace(reflect.TypeOf(v).String(), " ", "", -1) == strings.Replace(typ, " ", "", -1) + } + return false +} + // IsTime check if string is valid according to given format func IsTime(str string, format string) bool { _, err := time.Parse(format, str) return err == nil } +// IsUnixTime check if string is valid unix timestamp value +func IsUnixTime(str string) bool { + if _, err := strconv.Atoi(str); err == nil { + return true + } + return false +} + // IsRFC3339 check if string is valid timestamp value according to RFC3339 func IsRFC3339(str string) bool { return IsTime(str, time.RFC3339) @@ -933,6 +1133,30 @@ func StringLength(str string, params ...string) bool { return false } +// MinStringLength check string's minimum length (including multi byte strings) +func MinStringLength(str string, params ...string) bool { + + if len(params) == 1 { + strLength := utf8.RuneCountInString(str) + min, _ := ToInt(params[0]) + return strLength >= int(min) + } + + return false +} + +// MaxStringLength check string's maximum length (including multi byte strings) +func MaxStringLength(str string, params ...string) bool { + + if len(params) == 1 { + strLength := utf8.RuneCountInString(str) + max, _ := ToInt(params[0]) + return strLength <= int(max) + } + + return false +} + // Range check string's length func Range(str string, params ...string) bool { if len(params) == 2 { @@ -945,7 +1169,7 @@ func Range(str string, params ...string) bool { return false } -func isInRaw(str string, params ...string) bool { +func IsInRaw(str string, params ...string) bool { if len(params) == 1 { rawParams := params[0] @@ -1014,7 +1238,7 @@ func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options options = parseTagIntoMap(tag) } - if isEmptyValue(v) { + if !isFieldSet(v) { // an empty value is not validated, check only required isValid, resultErr = checkRequired(v, t, options) for key := range options { @@ -1062,6 +1286,45 @@ func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options }() } + for _, validatorSpec := range optionsOrder { + validatorStruct := options[validatorSpec] + var negate bool + validator := validatorSpec + customMsgExists := len(validatorStruct.customErrorMessage) > 0 + + // Check whether the tag looks like '!something' or 'something' + if validator[0] == '!' { + validator = validator[1:] + negate = true + } + + // Check for interface param validators + for key, value := range InterfaceParamTagRegexMap { + ps := value.FindStringSubmatch(validator) + if len(ps) == 0 { + continue + } + + validatefunc, ok := InterfaceParamTagMap[key] + if !ok { + continue + } + + delete(options, validatorSpec) + + field := fmt.Sprint(v) + if result := validatefunc(v.Interface(), ps[1:]...); (!result && !negate) || (result && negate) { + if customMsgExists { + return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + if negate { + return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + } + } + switch v.Kind() { case reflect.Bool, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, @@ -1121,10 +1384,10 @@ func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options delete(options, validatorSpec) switch v.Kind() { - case reflect.String, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: + case reflect.String, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Float32, reflect.Float64: field := fmt.Sprint(v) // make value into string, then validate with regex if result := validatefunc(field); !result && !negate || result && negate { if customMsgExists { @@ -1202,7 +1465,7 @@ func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options } return typeCheck(v.Elem(), t, o, options) case reflect.Struct: - return ValidateStruct(v.Interface()) + return true, nil default: return false, &UnsupportedTypeError{v.Type()} } @@ -1212,25 +1475,14 @@ func stripParams(validatorString string) string { return paramsRegexp.ReplaceAllString(validatorString, "") } -func isEmptyValue(v reflect.Value) bool { +// isFieldSet returns false for nil pointers, interfaces, maps, and slices. For all other values, it returns true. +func isFieldSet(v reflect.Value) bool { switch v.Kind() { - case reflect.String, reflect.Array: - return v.Len() == 0 - case reflect.Map, reflect.Slice: - return v.Len() == 0 || v.IsNil() - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() + case reflect.Map, reflect.Slice, reflect.Interface, reflect.Ptr: + return !v.IsNil() } - return reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface()) + return true } // ErrorByField returns error for specified field of the struct @@ -1252,11 +1504,11 @@ func ErrorsByField(e error) map[string]string { } // prototype for ValidateStruct - switch e.(type) { + switch e := e.(type) { case Error: - m[e.(Error).Name] = e.(Error).Err.Error() + m[e.Name] = e.Err.Error() case Errors: - for _, item := range e.(Errors).Errors() { + for _, item := range e.Errors() { n := ErrorsByField(item) for k, v := range n { m[k] = v diff --git a/vendor/github.com/asaskevich/govalidator/wercker.yml b/vendor/github.com/asaskevich/govalidator/wercker.yml index cac7a5fcf..bc5f7b086 100644 --- a/vendor/github.com/asaskevich/govalidator/wercker.yml +++ b/vendor/github.com/asaskevich/govalidator/wercker.yml @@ -12,4 +12,4 @@ build: - script: name: go test code: | - go test -race ./... + go test -race -v ./... diff --git a/vendor/github.com/go-openapi/analysis/.golangci.yml b/vendor/github.com/go-openapi/analysis/.golangci.yml index 76af8ab1c..c3694fc6c 100644 --- a/vendor/github.com/go-openapi/analysis/.golangci.yml +++ b/vendor/github.com/go-openapi/analysis/.golangci.yml @@ -25,3 +25,8 @@ linters: # linter rather than changing code that works. # see: https://github.com/kyoh86/scopelint/issues/4 - scopelint + - godox + - gocognit + - whitespace + - wsl + - funlen diff --git a/vendor/github.com/go-openapi/analysis/.travis.yml b/vendor/github.com/go-openapi/analysis/.travis.yml index 7ecf865c2..c0196e12a 100644 --- a/vendor/github.com/go-openapi/analysis/.travis.yml +++ b/vendor/github.com/go-openapi/analysis/.travis.yml @@ -1,12 +1,10 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.11.x -- 1.12.x +- 1.13.x +- 1.14.x install: -- GO111MODULE=off go get -u gotest.tools/gotestsum -env: -- GO111MODULE=on +- go get -u gotest.tools/gotestsum language: go notifications: slack: diff --git a/vendor/github.com/go-openapi/analysis/analyzer.go b/vendor/github.com/go-openapi/analysis/analyzer.go index 4d98718c4..934100210 100644 --- a/vendor/github.com/go-openapi/analysis/analyzer.go +++ b/vendor/github.com/go-openapi/analysis/analyzer.go @@ -221,7 +221,7 @@ func (s *Spec) initialize() { s.analyzeItems("items", parameter.Items, refPref, "parameter") } if parameter.In == "body" && parameter.Schema != nil { - s.analyzeSchema("schema", *parameter.Schema, refPref) + s.analyzeSchema("schema", parameter.Schema, refPref) } if parameter.Pattern != "" { s.patterns.addParameterPattern(refPref, parameter.Pattern) @@ -246,12 +246,13 @@ func (s *Spec) initialize() { } } if response.Schema != nil { - s.analyzeSchema("schema", *response.Schema, refPref) + s.analyzeSchema("schema", response.Schema, refPref) } } - for name, schema := range s.spec.Definitions { - s.analyzeSchema(name, schema, "/definitions") + for name := range s.spec.Definitions { + schema := s.spec.Definitions[name] + s.analyzeSchema(name, &schema, "/definitions") } // TODO: after analyzing all things and flattening schemas etc // resolve all the collected references to their final representations @@ -288,7 +289,7 @@ func (s *Spec) analyzeOperations(path string, pi *spec.PathItem) { s.analyzeItems("items", param.Items, refPref, "parameter") } if param.Schema != nil { - s.analyzeSchema("schema", *param.Schema, refPref) + s.analyzeSchema("schema", param.Schema, refPref) } } } @@ -344,7 +345,7 @@ func (s *Spec) analyzeOperation(method, path string, op *spec.Operation) { } s.analyzeItems("items", param.Items, refPref, "parameter") if param.In == "body" && param.Schema != nil { - s.analyzeSchema("schema", *param.Schema, refPref) + s.analyzeSchema("schema", param.Schema, refPref) } } if op.Responses != nil { @@ -361,7 +362,7 @@ func (s *Spec) analyzeOperation(method, path string, op *spec.Operation) { } } if op.Responses.Default.Schema != nil { - s.analyzeSchema("schema", *op.Responses.Default.Schema, refPref) + s.analyzeSchema("schema", op.Responses.Default.Schema, refPref) } } for k, res := range op.Responses.StatusCodeResponses { @@ -380,17 +381,17 @@ func (s *Spec) analyzeOperation(method, path string, op *spec.Operation) { } } if res.Schema != nil { - s.analyzeSchema("schema", *res.Schema, refPref) + s.analyzeSchema("schema", res.Schema, refPref) } } } } -func (s *Spec) analyzeSchema(name string, schema spec.Schema, prefix string) { +func (s *Spec) analyzeSchema(name string, schema *spec.Schema, prefix string) { refURI := slashpath.Join(prefix, jsonpointer.Escape(name)) schRef := SchemaRef{ Name: name, - Schema: &schema, + Schema: schema, Ref: spec.MustCreateRef("#" + refURI), TopLevel: prefix == "/definitions", } @@ -408,28 +409,34 @@ func (s *Spec) analyzeSchema(name string, schema spec.Schema, prefix string) { } for k, v := range schema.Definitions { - s.analyzeSchema(k, v, slashpath.Join(refURI, "definitions")) + v := v + s.analyzeSchema(k, &v, slashpath.Join(refURI, "definitions")) } for k, v := range schema.Properties { - s.analyzeSchema(k, v, slashpath.Join(refURI, "properties")) + v := v + s.analyzeSchema(k, &v, slashpath.Join(refURI, "properties")) } for k, v := range schema.PatternProperties { + v := v // NOTE: swagger 2.0 does not support PatternProperties. // However it is possible to analyze this in a schema - s.analyzeSchema(k, v, slashpath.Join(refURI, "patternProperties")) + s.analyzeSchema(k, &v, slashpath.Join(refURI, "patternProperties")) } - for i, v := range schema.AllOf { + for i := range schema.AllOf { + v := &schema.AllOf[i] s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "allOf")) } if len(schema.AllOf) > 0 { s.allOfs["#"+refURI] = schRef } - for i, v := range schema.AnyOf { + for i := range schema.AnyOf { + v := &schema.AnyOf[i] // NOTE: swagger 2.0 does not support anyOf constructs. // However it is possible to analyze this in a schema s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "anyOf")) } - for i, v := range schema.OneOf { + for i := range schema.OneOf { + v := &schema.OneOf[i] // NOTE: swagger 2.0 does not support oneOf constructs. // However it is possible to analyze this in a schema s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "oneOf")) @@ -437,21 +444,22 @@ func (s *Spec) analyzeSchema(name string, schema spec.Schema, prefix string) { if schema.Not != nil { // NOTE: swagger 2.0 does not support "not" constructs. // However it is possible to analyze this in a schema - s.analyzeSchema("not", *schema.Not, refURI) + s.analyzeSchema("not", schema.Not, refURI) } if schema.AdditionalProperties != nil && schema.AdditionalProperties.Schema != nil { - s.analyzeSchema("additionalProperties", *schema.AdditionalProperties.Schema, refURI) + s.analyzeSchema("additionalProperties", schema.AdditionalProperties.Schema, refURI) } if schema.AdditionalItems != nil && schema.AdditionalItems.Schema != nil { // NOTE: swagger 2.0 does not support AdditionalItems. // However it is possible to analyze this in a schema - s.analyzeSchema("additionalItems", *schema.AdditionalItems.Schema, refURI) + s.analyzeSchema("additionalItems", schema.AdditionalItems.Schema, refURI) } if schema.Items != nil { if schema.Items.Schema != nil { - s.analyzeSchema("items", *schema.Items.Schema, refURI) + s.analyzeSchema("items", schema.Items.Schema, refURI) } - for i, sch := range schema.Items.Schemas { + for i := range schema.Items.Schemas { + sch := &schema.Items.Schemas[i] s.analyzeSchema(strconv.Itoa(i), sch, slashpath.Join(refURI, "items")) } } diff --git a/vendor/github.com/go-openapi/analysis/flatten.go b/vendor/github.com/go-openapi/analysis/flatten.go index ae1eef5d1..ab3f949c3 100644 --- a/vendor/github.com/go-openapi/analysis/flatten.go +++ b/vendor/github.com/go-openapi/analysis/flatten.go @@ -41,10 +41,11 @@ type FlattenOpts struct { BasePath string // Flattening options - Expand bool // If Expand is true, we skip flattening the spec and expand it instead - Minimal bool - Verbose bool - RemoveUnused bool + Expand bool // If Expand is true, we skip flattening the spec and expand it instead + Minimal bool + Verbose bool + RemoveUnused bool + ContinueOnError bool // Continues when facing some issues /* Extra keys */ _ struct{} // require keys @@ -135,6 +136,7 @@ func newContext() *context { // - ... // func Flatten(opts FlattenOpts) error { + debugLog("FlattenOpts: %#v", opts) // Make sure opts.BasePath is an absolute path if !filepath.IsAbs(opts.BasePath) { cwd, _ := os.Getwd() @@ -148,7 +150,9 @@ func Flatten(opts FlattenOpts) error { // recursively expand responses, parameters, path items and items in simple schemas. // This simplifies the spec and leaves $ref only into schema objects. - if err := swspec.ExpandSpec(opts.Swagger(), opts.ExpandOpts(!opts.Expand)); err != nil { + expandOpts := opts.ExpandOpts(!opts.Expand) + expandOpts.ContinueOnError = opts.ContinueOnError + if err := swspec.ExpandSpec(opts.Swagger(), expandOpts); err != nil { return err } @@ -846,7 +850,7 @@ func importExternalReferences(opts *FlattenOpts) (bool, error) { enums: enumAnalysis{}, } partialAnalyzer.reset() - partialAnalyzer.analyzeSchema("", *sch, "/") + partialAnalyzer.analyzeSchema("", sch, "/") // now rewrite those refs with rebase for key, ref := range partialAnalyzer.references.allRefs { @@ -874,6 +878,7 @@ func importExternalReferences(opts *FlattenOpts) (bool, error) { if _, ok := opts.flattenContext.newRefs[key]; ok { resolved = opts.flattenContext.newRefs[key].resolved } + debugLog("keeping track of ref: %s (%s), resolved: %t", key, newName, resolved) opts.flattenContext.newRefs[key] = &newRef{ key: key, newName: newName, @@ -1308,16 +1313,55 @@ func stripPointersAndOAIGen(opts *FlattenOpts) error { return err } - // restrip + // restrip and re-analyze if hasIntroducedPointerOrInline, ers = stripOAIGen(opts); ers != nil { return ers } - - opts.Spec.reload() // re-analyze } return nil } +func updateRefParents(opts *FlattenOpts, r *newRef) { + if !r.isOAIGen || r.resolved { // bail on already resolved entries (avoid looping) + return + } + for k, v := range opts.Spec.references.allRefs { + if r.path != v.String() { + continue + } + found := false + for _, p := range r.parents { + if p == k { + found = true + break + } + } + if !found { + r.parents = append(r.parents, k) + } + } +} + +// topMostRefs is able to sort refs by hierarchical then lexicographic order, +// yielding refs ordered breadth-first. +type topmostRefs []string + +func (k topmostRefs) Len() int { return len(k) } +func (k topmostRefs) Swap(i, j int) { k[i], k[j] = k[j], k[i] } +func (k topmostRefs) Less(i, j int) bool { + li, lj := len(strings.Split(k[i], "/")), len(strings.Split(k[j], "/")) + if li == lj { + return k[i] < k[j] + } + return li < lj +} + +func topmostFirst(refs []string) []string { + res := topmostRefs(refs) + sort.Sort(res) + return res +} + // stripOAIGen strips the spec from unnecessary OAIGen constructs, initially created to dedupe flattened definitions. // // A dedupe is deemed unnecessary whenever: @@ -1325,44 +1369,25 @@ func stripPointersAndOAIGen(opts *FlattenOpts) error { // - there is a conflict with multiple parents: merge OAIGen in first parent, the rewrite other parents to point to // the first parent. // -// This function returns a true bool whenever it re-inlined a complex schema, so the caller may chose to iterate +// This function returns true whenever it re-inlined a complex schema, so the caller may chose to iterate // pointer and name resolution again. func stripOAIGen(opts *FlattenOpts) (bool, error) { debugLog("stripOAIGen") replacedWithComplex := false - // figure out referers of OAIGen definitions + // figure out referers of OAIGen definitions (doing it before the ref start mutating) for _, r := range opts.flattenContext.newRefs { - if !r.isOAIGen || r.resolved { // bail on already resolved entries (avoid looping) - continue - } - for k, v := range opts.Spec.references.allRefs { - if r.path != v.String() { - continue - } - found := false - for _, p := range r.parents { - if p == k { - found = true - break - } - } - if !found { - r.parents = append(r.parents, k) - } - } + updateRefParents(opts, r) } - for k := range opts.flattenContext.newRefs { r := opts.flattenContext.newRefs[k] - //debugLog("newRefs[%s]: isOAIGen: %t, resolved: %t, name: %s, path:%s, #parents: %d, parents: %v, ref: %s", - // k, r.isOAIGen, r.resolved, r.newName, r.path, len(r.parents), r.parents, r.schema.Ref.String()) + debugLog("newRefs[%s]: isOAIGen: %t, resolved: %t, name: %s, path:%s, #parents: %d, parents: %v, ref: %s", + k, r.isOAIGen, r.resolved, r.newName, r.path, len(r.parents), r.parents, r.schema.Ref.String()) if r.isOAIGen && len(r.parents) >= 1 { - pr := r.parents - sort.Strings(pr) + pr := topmostFirst(r.parents) - // rewrite first parent schema in lexicographical order - debugLog("rewrite first parent in lex order %s with schema", pr[0]) + // rewrite first parent schema in hierarchical then lexicographical order + debugLog("rewrite first parent %s with schema", pr[0]) if err := updateRefWithSchema(opts.Swagger(), pr[0], r.schema); err != nil { return false, err } diff --git a/vendor/github.com/go-openapi/analysis/go.mod b/vendor/github.com/go-openapi/analysis/go.mod index 6c8e58577..8dea2d991 100644 --- a/vendor/github.com/go-openapi/analysis/go.mod +++ b/vendor/github.com/go-openapi/analysis/go.mod @@ -1,13 +1,23 @@ module github.com/go-openapi/analysis require ( + github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect + github.com/go-openapi/errors v0.19.3 // indirect github.com/go-openapi/jsonpointer v0.19.3 + github.com/go-openapi/jsonreference v0.19.3 // indirect github.com/go-openapi/loads v0.19.0 - github.com/go-openapi/spec v0.19.3 - github.com/go-openapi/strfmt v0.19.3 - github.com/go-openapi/swag v0.19.5 + github.com/go-openapi/spec v0.19.6 + github.com/go-openapi/strfmt v0.19.4 + github.com/go-openapi/swag v0.19.7 + github.com/kr/pty v1.1.5 // indirect + github.com/mailru/easyjson v0.7.1 // indirect github.com/stretchr/testify v1.3.0 - go.mongodb.org/mongo-driver v1.1.1 // indirect + go.mongodb.org/mongo-driver v1.3.0 // indirect + golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect + golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect + golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f // indirect + golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 // indirect + gopkg.in/yaml.v2 v2.2.8 // indirect ) go 1.13 diff --git a/vendor/github.com/go-openapi/analysis/go.sum b/vendor/github.com/go-openapi/analysis/go.sum index 8e8b5f9bc..82636eaeb 100644 --- a/vendor/github.com/go-openapi/analysis/go.sum +++ b/vendor/github.com/go-openapi/analysis/go.sum @@ -1,3 +1,4 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -6,6 +7,8 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdko github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -14,6 +17,8 @@ github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70t github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3 h1:7MGZI1ibQDLasvAz8HuhvYk9eNJbJkCOXWsSjjMS+Zc= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -22,28 +27,70 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.19.0 h1:wCOBNscACI8L93tt5tvB2zOMkJ098XCw3fP0BY2ybDA= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6 h1:rMMMj8cV38KVXK7SFc+I2MWClbEfbK705+j+dyqun5g= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.2 h1:clPGfBnJohokno0e+d7hs6Yocrzjlgz6EsQSDncCRnE= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4 h1:eRvaqAhpL0IL6Trh5fDsGnGhiXndzHFuA05w6sXH6/g= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7 h1:VRuXN2EnMSsZdauzdss6JBC29YotDqG59BZ+tdlIL1s= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -55,23 +102,47 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1 h1:Sq1fR+0c58RME5EoqKdjkiQAmPjmfHlZOoRI6fTUOcs= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0 h1:ew6uUIeJOo+qdUUv7LxFCUhtWmVv7ZV/Xuy4FAUsw2E= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -80,18 +151,36 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowK golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/analysis/mixin.go b/vendor/github.com/go-openapi/analysis/mixin.go index 625c46f8f..d5797042a 100644 --- a/vendor/github.com/go-openapi/analysis/mixin.go +++ b/vendor/github.com/go-openapi/analysis/mixin.go @@ -332,6 +332,9 @@ func mergeSwaggerProps(primary *spec.Swagger, m *spec.Swagger) []string { if primary.Info.Contact == nil { primary.Info.Contact = m.Info.Contact } else if m.Info.Contact != nil { + var csk []string + primary.Info.Contact.Extensions, csk = mergeExtensions(primary.Info.Contact.Extensions, m.Info.Contact.Extensions) + skipped = append(skipped, csk...) if primary.Info.Contact.Name == "" { primary.Info.Contact.Name = m.Info.Contact.Name } @@ -346,6 +349,9 @@ func mergeSwaggerProps(primary *spec.Swagger, m *spec.Swagger) []string { if primary.Info.License == nil { primary.Info.License = m.Info.License } else if m.Info.License != nil { + var lsk []string + primary.Info.License.Extensions, lsk = mergeExtensions(primary.Info.License.Extensions, m.Info.License.Extensions) + skipped = append(skipped, lsk...) if primary.Info.License.Name == "" { primary.Info.License.Name = m.Info.License.Name } diff --git a/vendor/github.com/go-openapi/errors/go.mod b/vendor/github.com/go-openapi/errors/go.mod index 084143001..d7a9030ab 100644 --- a/vendor/github.com/go-openapi/errors/go.mod +++ b/vendor/github.com/go-openapi/errors/go.mod @@ -1,6 +1,12 @@ module github.com/go-openapi/errors +go 1.14 + require ( - github.com/stretchr/objx v0.2.0 // indirect - github.com/stretchr/testify v1.3.0 + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/stretchr/testify v1.6.1 + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect + gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c // indirect ) diff --git a/vendor/github.com/go-openapi/errors/go.sum b/vendor/github.com/go-openapi/errors/go.sum index e7314e279..ecd91c75b 100644 --- a/vendor/github.com/go-openapi/errors/go.sum +++ b/vendor/github.com/go-openapi/errors/go.sum @@ -1,9 +1,26 @@ +github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/github.com/go-openapi/errors/schema.go b/vendor/github.com/go-openapi/errors/schema.go index bbf5c6c54..1c0be5f2a 100644 --- a/vendor/github.com/go-openapi/errors/schema.go +++ b/vendor/github.com/go-openapi/errors/schema.go @@ -268,7 +268,7 @@ func DuplicateItems(name, in string) *Validation { } // TooManyItems error for when an array contains too many items -func TooManyItems(name, in string, max int64) *Validation { +func TooManyItems(name, in string, max int64, value interface{}) *Validation { msg := fmt.Sprintf(maxItemsFail, name, in, max) if in == "" { msg = fmt.Sprintf(maxItemsFailNoIn, name, max) @@ -278,12 +278,13 @@ func TooManyItems(name, in string, max int64) *Validation { code: MaxItemsFailCode, Name: name, In: in, + Value: value, message: msg, } } // TooFewItems error for when an array contains too few items -func TooFewItems(name, in string, min int64) *Validation { +func TooFewItems(name, in string, min int64, value interface{}) *Validation { msg := fmt.Sprintf(minItemsFail, name, in, min) if in == "" { msg = fmt.Sprintf(minItemsFailNoIn, name, min) @@ -292,12 +293,13 @@ func TooFewItems(name, in string, min int64) *Validation { code: MinItemsFailCode, Name: name, In: in, + Value: value, message: msg, } } // ExceedsMaximumInt error for when maximum validation fails -func ExceedsMaximumInt(name, in string, max int64, exclusive bool) *Validation { +func ExceedsMaximumInt(name, in string, max int64, exclusive bool, value interface{}) *Validation { var message string if in == "" { m := maxIncFailNoIn @@ -316,13 +318,13 @@ func ExceedsMaximumInt(name, in string, max int64, exclusive bool) *Validation { code: MaxFailCode, Name: name, In: in, - Value: max, + Value: value, message: message, } } // ExceedsMaximumUint error for when maximum validation fails -func ExceedsMaximumUint(name, in string, max uint64, exclusive bool) *Validation { +func ExceedsMaximumUint(name, in string, max uint64, exclusive bool, value interface{}) *Validation { var message string if in == "" { m := maxIncFailNoIn @@ -341,13 +343,13 @@ func ExceedsMaximumUint(name, in string, max uint64, exclusive bool) *Validation code: MaxFailCode, Name: name, In: in, - Value: max, + Value: value, message: message, } } // ExceedsMaximum error for when maximum validation fails -func ExceedsMaximum(name, in string, max float64, exclusive bool) *Validation { +func ExceedsMaximum(name, in string, max float64, exclusive bool, value interface{}) *Validation { var message string if in == "" { m := maxIncFailNoIn @@ -366,13 +368,13 @@ func ExceedsMaximum(name, in string, max float64, exclusive bool) *Validation { code: MaxFailCode, Name: name, In: in, - Value: max, + Value: value, message: message, } } // ExceedsMinimumInt error for when minimum validation fails -func ExceedsMinimumInt(name, in string, min int64, exclusive bool) *Validation { +func ExceedsMinimumInt(name, in string, min int64, exclusive bool, value interface{}) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -391,13 +393,13 @@ func ExceedsMinimumInt(name, in string, min int64, exclusive bool) *Validation { code: MinFailCode, Name: name, In: in, - Value: min, + Value: value, message: message, } } // ExceedsMinimumUint error for when minimum validation fails -func ExceedsMinimumUint(name, in string, min uint64, exclusive bool) *Validation { +func ExceedsMinimumUint(name, in string, min uint64, exclusive bool, value interface{}) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -416,13 +418,13 @@ func ExceedsMinimumUint(name, in string, min uint64, exclusive bool) *Validation code: MinFailCode, Name: name, In: in, - Value: min, + Value: value, message: message, } } // ExceedsMinimum error for when minimum validation fails -func ExceedsMinimum(name, in string, min float64, exclusive bool) *Validation { +func ExceedsMinimum(name, in string, min float64, exclusive bool, value interface{}) *Validation { var message string if in == "" { m := minIncFailNoIn @@ -441,13 +443,13 @@ func ExceedsMinimum(name, in string, min float64, exclusive bool) *Validation { code: MinFailCode, Name: name, In: in, - Value: min, + Value: value, message: message, } } // NotMultipleOf error for when multiple of validation fails -func NotMultipleOf(name, in string, multiple interface{}) *Validation { +func NotMultipleOf(name, in string, multiple, value interface{}) *Validation { var msg string if in == "" { msg = fmt.Sprintf(multipleOfFailNoIn, name, multiple) @@ -458,7 +460,7 @@ func NotMultipleOf(name, in string, multiple interface{}) *Validation { code: MultipleOfFailCode, Name: name, In: in, - Value: multiple, + Value: value, message: msg, } } @@ -483,7 +485,7 @@ func EnumFail(name, in string, value interface{}, values []interface{}) *Validat } // Required error for when a value is missing -func Required(name, in string) *Validation { +func Required(name, in string, value interface{}) *Validation { var msg string if in == "" { msg = fmt.Sprintf(requiredFailNoIn, name) @@ -494,12 +496,13 @@ func Required(name, in string) *Validation { code: RequiredFailCode, Name: name, In: in, + Value: value, message: msg, } } // TooLong error for when a string is too long -func TooLong(name, in string, max int64) *Validation { +func TooLong(name, in string, max int64, value interface{}) *Validation { var msg string if in == "" { msg = fmt.Sprintf(tooLongMessageNoIn, name, max) @@ -510,12 +513,13 @@ func TooLong(name, in string, max int64) *Validation { code: TooLongFailCode, Name: name, In: in, + Value: value, message: msg, } } // TooShort error for when a string is too short -func TooShort(name, in string, min int64) *Validation { +func TooShort(name, in string, min int64, value interface{}) *Validation { var msg string if in == "" { msg = fmt.Sprintf(tooShortMessageNoIn, name, min) @@ -527,13 +531,14 @@ func TooShort(name, in string, min int64) *Validation { code: TooShortFailCode, Name: name, In: in, + Value: value, message: msg, } } // FailedPattern error for when a string fails a regex pattern match // the pattern that is returned is the ECMA syntax version of the pattern not the golang version. -func FailedPattern(name, in, pattern string) *Validation { +func FailedPattern(name, in, pattern string, value interface{}) *Validation { var msg string if in == "" { msg = fmt.Sprintf(patternFailNoIn, name, pattern) @@ -545,6 +550,7 @@ func FailedPattern(name, in, pattern string) *Validation { code: PatternFailCode, Name: name, In: in, + Value: value, message: msg, } } diff --git a/vendor/github.com/go-openapi/loads/.travis.yml b/vendor/github.com/go-openapi/loads/.travis.yml index 8a7e05d91..6bf906ec0 100644 --- a/vendor/github.com/go-openapi/loads/.travis.yml +++ b/vendor/github.com/go-openapi/loads/.travis.yml @@ -1,12 +1,10 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.11.x -- 1.12.x +- 1.13.x +- 1.14.x install: -- GO111MODULE=off go get -u gotest.tools/gotestsum -env: -- GO111MODULE=on +- go get -u gotest.tools/gotestsum language: go notifications: slack: diff --git a/vendor/github.com/go-openapi/loads/go.mod b/vendor/github.com/go-openapi/loads/go.mod index 8cf62326f..54e5d98c9 100644 --- a/vendor/github.com/go-openapi/loads/go.mod +++ b/vendor/github.com/go-openapi/loads/go.mod @@ -1,11 +1,11 @@ module github.com/go-openapi/loads require ( - github.com/go-openapi/analysis v0.19.5 - github.com/go-openapi/spec v0.19.3 - github.com/go-openapi/swag v0.19.5 + github.com/go-openapi/analysis v0.19.10 + github.com/go-openapi/spec v0.19.6 + github.com/go-openapi/swag v0.19.7 github.com/stretchr/testify v1.3.0 - gopkg.in/yaml.v2 v2.2.4 + gopkg.in/yaml.v2 v2.2.8 ) go 1.13 diff --git a/vendor/github.com/go-openapi/loads/go.sum b/vendor/github.com/go-openapi/loads/go.sum index 6eebff99d..ec9a40102 100644 --- a/vendor/github.com/go-openapi/loads/go.sum +++ b/vendor/github.com/go-openapi/loads/go.sum @@ -1,3 +1,4 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -6,16 +7,20 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdko github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3 h1:7MGZI1ibQDLasvAz8HuhvYk9eNJbJkCOXWsSjjMS+Zc= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -24,25 +29,63 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6 h1:rMMMj8cV38KVXK7SFc+I2MWClbEfbK705+j+dyqun5g= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4 h1:eRvaqAhpL0IL6Trh5fDsGnGhiXndzHFuA05w6sXH6/g= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7 h1:VRuXN2EnMSsZdauzdss6JBC29YotDqG59BZ+tdlIL1s= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -54,23 +97,45 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1 h1:Sq1fR+0c58RME5EoqKdjkiQAmPjmfHlZOoRI6fTUOcs= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0 h1:ew6uUIeJOo+qdUUv7LxFCUhtWmVv7ZV/Xuy4FAUsw2E= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -79,20 +144,37 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowK golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/runtime/client_response.go b/vendor/github.com/go-openapi/runtime/client_response.go index 729e18b22..d97e0ac64 100644 --- a/vendor/github.com/go-openapi/runtime/client_response.go +++ b/vendor/github.com/go-openapi/runtime/client_response.go @@ -17,6 +17,8 @@ package runtime import ( "fmt" "io" + + "encoding/json" ) // A ClientResponse represents a client response @@ -59,5 +61,10 @@ type APIError struct { } func (a *APIError) Error() string { - return fmt.Sprintf("%s (status %d): %+v ", a.OperationName, a.Code, a.Response) + resp, _ := json.Marshal(a.Response) + return fmt.Sprintf("%s (status %d): %s", a.OperationName, a.Code, resp) +} + +func (a *APIError) String() string { + return a.Error() } diff --git a/vendor/github.com/go-openapi/runtime/go.mod b/vendor/github.com/go-openapi/runtime/go.mod index f5f9d16be..3effc2817 100644 --- a/vendor/github.com/go-openapi/runtime/go.mod +++ b/vendor/github.com/go-openapi/runtime/go.mod @@ -2,15 +2,16 @@ module github.com/go-openapi/runtime require ( github.com/docker/go-units v0.4.0 - github.com/go-openapi/analysis v0.19.5 - github.com/go-openapi/errors v0.19.2 - github.com/go-openapi/loads v0.19.3 - github.com/go-openapi/spec v0.19.3 - github.com/go-openapi/strfmt v0.19.3 - github.com/go-openapi/swag v0.19.5 - github.com/go-openapi/validate v0.19.3 - github.com/stretchr/testify v1.4.0 - gopkg.in/yaml.v2 v2.2.4 + github.com/go-openapi/analysis v0.19.10 + github.com/go-openapi/errors v0.19.6 + github.com/go-openapi/loads v0.19.5 + github.com/go-openapi/spec v0.19.8 + github.com/go-openapi/strfmt v0.19.5 + github.com/go-openapi/swag v0.19.9 + github.com/go-openapi/validate v0.19.10 + github.com/stretchr/testify v1.6.1 + gopkg.in/yaml.v2 v2.3.0 + gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect ) go 1.13 diff --git a/vendor/github.com/go-openapi/runtime/go.sum b/vendor/github.com/go-openapi/runtime/go.sum index c24bb9865..5cadebb49 100644 --- a/vendor/github.com/go-openapi/runtime/go.sum +++ b/vendor/github.com/go-openapi/runtime/go.sum @@ -1,3 +1,4 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= @@ -8,6 +9,10 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzs github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -26,10 +31,15 @@ github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9sn github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6 h1:xZMThgv5SQ7SMbWtKFkCf9bBdvR2iEyw9k3zGZONuys= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= @@ -40,6 +50,8 @@ github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3Hfo github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -47,15 +59,21 @@ github.com/go-openapi/loads v0.19.2 h1:rf5ArTHmIJxyV5Oiks+Su0mUens1+AjpkPoWr5xFR github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= github.com/go-openapi/loads v0.19.3 h1:jwIoahqCmaA5OBoc/B+1+Mu2L0Gr8xYQnbeyQEo/7b0= github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5 h1:jZVYWawIQiA1NBnHla28ktg6hrcfTHsCE+3QLVRBIls= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0 h1:0Dn9qy1G9+UJfRU7TR8bmdGxb4uifB7HNrJjOnV0yPk= @@ -63,30 +81,74 @@ github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+Z github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2 h1:ky5l57HjyVRrsJfd2+Ro5Z9PjGuKbsmftwyMtk8H7js= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3 h1:PAH/2DylwWcIU1s0Y7k3yNmeAgWOcKrNE2Q7Ww/kCg4= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10 h1:tG3SZ5DC5KF4cyt7nqLVcQXGj5A7mpaYkAcNPlDK+Yk= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe h1:W/GaMY0y69G4cFlmsC6B9sbuo2fP8OFP1ABjt4kPz+w= @@ -95,11 +157,31 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -109,13 +191,23 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1 h1:Sq1fR+0c58RME5EoqKdjkiQAmPjmfHlZOoRI6fTUOcs= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4 h1:zs/dKNwX0gYUtzwrN9lLiR15hCO0nDwQj5xXx+vjCdE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -127,23 +219,50 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowK golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/github.com/go-openapi/runtime/middleware/context.go b/vendor/github.com/go-openapi/runtime/middleware/context.go index ca3e32832..fba5748db 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/context.go +++ b/vendor/github.com/go-openapi/runtime/middleware/context.go @@ -567,6 +567,26 @@ func (c *Context) Respond(rw http.ResponseWriter, r *http.Request, produces []st c.api.ServeErrorFor(route.Operation.ID)(rw, r, errors.New(http.StatusInternalServerError, "can't produce response")) } +func (c *Context) APIHandlerSwaggerUI(builder Builder) http.Handler { + b := builder + if b == nil { + b = PassthroughBuilder + } + + var title string + sp := c.spec.Spec() + if sp != nil && sp.Info != nil && sp.Info.Title != "" { + title = sp.Info.Title + } + + swaggerUIOpts := SwaggerUIOpts{ + BasePath: c.BasePath(), + Title: title, + } + + return Spec("", c.spec.Raw(), SwaggerUI(swaggerUIOpts, c.RoutesHandler(b))) +} + // APIHandler returns a handler to serve the API, this includes a swagger spec, router and the contract defined in the swagger spec func (c *Context) APIHandler(builder Builder) http.Handler { b := builder diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/router.go b/vendor/github.com/go-openapi/runtime/middleware/denco/router.go index ecacc31ff..5d2691ec3 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/denco/router.go +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/router.go @@ -20,6 +20,9 @@ const ( // SeparatorCharacter separates path segments. SeparatorCharacter = '/' + // PathParamCharacter indicates a RESTCONF path param + PathParamCharacter = '=' + // MaxSize is max size of records and internal slice. MaxSize = (1 << 22) - 1 ) @@ -426,8 +429,9 @@ func makeRecords(srcs []Record) (statics, params []*record) { termChar := string(TerminationCharacter) paramPrefix := string(SeparatorCharacter) + string(ParamCharacter) wildcardPrefix := string(SeparatorCharacter) + string(WildcardCharacter) + restconfPrefix := string(PathParamCharacter) + string(ParamCharacter) for _, r := range srcs { - if strings.Contains(r.Key, paramPrefix) || strings.Contains(r.Key, wildcardPrefix) { + if strings.Contains(r.Key, paramPrefix) || strings.Contains(r.Key, wildcardPrefix) ||strings.Contains(r.Key, restconfPrefix){ r.Key += termChar params = append(params, &record{Record: r}) } else { diff --git a/vendor/github.com/go-openapi/runtime/middleware/parameter.go b/vendor/github.com/go-openapi/runtime/middleware/parameter.go index 2088605f9..8fa0cf4e4 100644 --- a/vendor/github.com/go-openapi/runtime/middleware/parameter.go +++ b/vendor/github.com/go-openapi/runtime/middleware/parameter.go @@ -276,7 +276,7 @@ func (p *untypedParamBinder) setFieldValue(target reflect.Value, defaultValue in } if (!hasKey || (!p.parameter.AllowEmptyValue && data == "")) && p.parameter.Required && p.parameter.Default == nil { - return errors.Required(p.Name, p.parameter.In) + return errors.Required(p.Name, p.parameter.In, data) } ok, err := p.tryUnmarshaler(target, defaultValue, data) @@ -451,7 +451,7 @@ func (p *untypedParamBinder) readFormattedSliceFieldValue(data string, target re func (p *untypedParamBinder) setSliceFieldValue(target reflect.Value, defaultValue interface{}, data []string, hasKey bool) error { sz := len(data) if (!hasKey || (!p.parameter.AllowEmptyValue && (sz == 0 || (sz == 1 && data[0] == "")))) && p.parameter.Required && defaultValue == nil { - return errors.Required(p.Name, p.parameter.In) + return errors.Required(p.Name, p.parameter.In, data) } defVal := reflect.Zero(target.Type()) diff --git a/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go new file mode 100644 index 000000000..2c92f5c91 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/swaggerui.go @@ -0,0 +1,162 @@ +package middleware + +import ( + "bytes" + "fmt" + "html/template" + "net/http" + "path" +) + +// SwaggerUIOpts configures the Swaggerui middlewares +type SwaggerUIOpts struct { + // BasePath for the UI path, defaults to: / + BasePath string + // Path combines with BasePath for the full UI path, defaults to: docs + Path string + // SpecURL the url to find the spec for + SpecURL string + + // The three components needed to embed swagger-ui + SwaggerURL string + SwaggerPresetURL string + SwaggerStylesURL string + + Favicon32 string + Favicon16 string + + // Title for the documentation site, default to: API documentation + Title string +} + +// EnsureDefaults in case some options are missing +func (r *SwaggerUIOpts) EnsureDefaults() { + if r.BasePath == "" { + r.BasePath = "/" + } + if r.Path == "" { + r.Path = "docs" + } + if r.SpecURL == "" { + r.SpecURL = "/swagger.json" + } + if r.SwaggerURL == "" { + r.SwaggerURL = swaggerLatest + } + if r.SwaggerPresetURL == "" { + r.SwaggerPresetURL = swaggerPresetLatest + } + if r.SwaggerStylesURL == "" { + r.SwaggerStylesURL = swaggerStylesLatest + } + if r.Favicon16 == "" { + r.Favicon16 = swaggerFavicon16Latest + } + if r.Favicon32 == "" { + r.Favicon32 = swaggerFavicon32Latest + } + if r.Title == "" { + r.Title = "API documentation" + } +} + +// SwaggerUI creates a middleware to serve a documentation site for a swagger spec. +// This allows for altering the spec before starting the http listener. +func SwaggerUI(opts SwaggerUIOpts, next http.Handler) http.Handler { + opts.EnsureDefaults() + + pth := path.Join(opts.BasePath, opts.Path) + tmpl := template.Must(template.New("swaggerui").Parse(swaggeruiTemplate)) + + buf := bytes.NewBuffer(nil) + _ = tmpl.Execute(buf, &opts) + b := buf.Bytes() + + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + if r.URL.Path == pth { + rw.Header().Set("Content-Type", "text/html; charset=utf-8") + rw.WriteHeader(http.StatusOK) + + _, _ = rw.Write(b) + return + } + + if next == nil { + rw.Header().Set("Content-Type", "text/plain") + rw.WriteHeader(http.StatusNotFound) + _, _ = rw.Write([]byte(fmt.Sprintf("%q not found", pth))) + return + } + next.ServeHTTP(rw, r) + }) +} + +const ( + swaggerLatest = "https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js" + swaggerPresetLatest = "https://unpkg.com/swagger-ui-dist/swagger-ui-standalone-preset.js" + swaggerStylesLatest = "https://unpkg.com/swagger-ui-dist/swagger-ui.css" + swaggerFavicon32Latest = "https://unpkg.com/swagger-ui-dist/favicon-32x32.png" + swaggerFavicon16Latest = "https://unpkg.com/swagger-ui-dist/favicon-16x16.png" + swaggeruiTemplate = ` + + + + + {{ .Title }} + + + + + + + + +
+ + + + + + +` +) diff --git a/vendor/github.com/go-openapi/spec/.golangci.yml b/vendor/github.com/go-openapi/spec/.golangci.yml index 3e33f9f2e..4e17ed497 100644 --- a/vendor/github.com/go-openapi/spec/.golangci.yml +++ b/vendor/github.com/go-openapi/spec/.golangci.yml @@ -21,3 +21,8 @@ linters: - lll - gochecknoinits - gochecknoglobals + - funlen + - godox + - gocognit + - whitespace + - wsl diff --git a/vendor/github.com/go-openapi/spec/.travis.yml b/vendor/github.com/go-openapi/spec/.travis.yml index aa26d8763..f1a3f80b3 100644 --- a/vendor/github.com/go-openapi/spec/.travis.yml +++ b/vendor/github.com/go-openapi/spec/.travis.yml @@ -1,12 +1,10 @@ after_success: - bash <(curl -s https://codecov.io/bash) go: -- 1.11.x -- 1.12.x +- 1.13.x +- 1.14.x install: - GO111MODULE=off go get -u gotest.tools/gotestsum -env: -- GO111MODULE=on language: go notifications: slack: diff --git a/vendor/github.com/go-openapi/spec/bindata.go b/vendor/github.com/go-openapi/spec/bindata.go index c67e2d877..66b1f3263 100644 --- a/vendor/github.com/go-openapi/spec/bindata.go +++ b/vendor/github.com/go-openapi/spec/bindata.go @@ -1,7 +1,7 @@ // Code generated by go-bindata. DO NOT EDIT. // sources: // schemas/jsonschema-draft-04.json (4.357kB) -// schemas/v2/schema.json (40.249kB) +// schemas/v2/schema.json (40.248kB) package spec @@ -70,43 +70,43 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _jsonschemaDraft04JSON = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x57\x3d\x6f\xdb\x3c\x10\xde\xf3\x2b\x08\x26\x63\xf2\x2a\x2f\xd0\xc9\x5b\xd1\x2e\x01\x5a\x34\x43\x37\x23\x03\x6d\x9d\x6c\x06\x14\xa9\x50\x54\x60\xc3\xd0\x7f\x2f\x28\x4a\x14\x29\x91\x92\x2d\xa7\x8d\x97\x28\xbc\xaf\xe7\x8e\xf7\xc5\xd3\x0d\x42\x08\x61\x9a\xe2\x15\xc2\x7b\xa5\x8a\x55\x92\xbc\x96\x82\x3f\x94\xdb\x3d\xe4\xe4\x3f\x21\x77\x49\x2a\x49\xa6\x1e\x1e\xbf\x24\xe6\xec\x16\xdf\x1b\xa1\x3b\xf3\xff\x02\xc9\x14\xca\xad\xa4\x85\xa2\x82\x6b\xe9\x6f\x42\x02\x32\x2c\x28\x07\x45\x5a\x15\x3d\x77\x46\x39\xd5\xcc\x25\x5e\x21\x83\xb8\x21\x18\xb6\xaf\x52\x92\xa3\x47\x68\x88\xea\x58\x80\x56\x4e\x1a\xf2\xbd\x4f\xcc\x29\x7f\x52\x90\x6b\x7d\xff\x0f\x48\xb4\x3d\x3f\x21\x7c\x27\x21\xd3\x2a\x6e\x31\xaa\x2d\x53\xdd\xf3\xe3\x42\x94\x54\xd1\x77\x78\xe2\x0a\x76\x20\xe3\x20\x68\xcb\x30\x86\x41\xf3\x2a\xc7\x2b\xf4\x78\x8e\xfe\xef\x90\x91\x8a\xa9\xc7\xb1\x1d\xc2\xd8\x2f\x0d\x75\xed\xc1\x4e\x9c\xc8\x25\x43\xac\xa8\xbe\xd7\xcc\xa9\xd1\xa9\x21\xa0\x1a\xbd\x04\x61\x94\x34\x2f\x18\xfc\x3e\x16\x50\x8e\x4d\x03\x6f\x1c\x58\xdb\x48\x23\xbc\x11\x82\x01\xe1\xfa\xd3\x3a\x8e\x30\xaf\x18\x33\x7f\xf3\x8d\x39\x11\x9b\x57\xd8\x2a\xfd\x55\x2a\x49\xf9\x0e\xc7\xec\x37\xd4\x25\xf7\xec\x5c\x66\xc7\xd7\x99\xaa\xcf\x4f\x89\x8a\xd3\xb7\x0a\x3a\xaa\x92\x15\xf4\x30\x6f\x1c\xb0\xd6\x46\xe7\x98\x39\x2d\xa4\x28\x40\x2a\x3a\x88\x9e\x29\xba\x88\x37\x2d\xca\x60\x38\xfa\xba\x5b\x20\xac\xa8\x62\xb0\x4c\xd4\xaf\xda\x45\x0a\xba\x5c\x3b\xb9\xc7\x79\xc5\x14\x2d\x18\x34\x19\x1c\x51\xdb\x25\x4d\xb4\x7e\x06\x14\x38\x6c\x59\x55\xd2\x77\xf8\x69\x59\xfc\x7b\x73\xed\x93\x43\xcb\x32\x6d\x3c\x28\xdc\x1b\x9a\xd3\x62\xab\xc2\x27\xf7\x41\xc9\x08\x2b\x23\x08\xad\x13\x57\x21\x9c\xd3\x72\x0d\x42\x72\xf8\x01\x7c\xa7\xf6\x83\xce\x39\xd7\x82\x3c\x1f\x2f\xd6\x60\x1b\xa2\xdf\x35\x89\x52\x20\xe7\x73\x74\xe0\x66\x26\x64\x4e\xb4\x97\x58\xc2\x0e\x0e\xe1\x60\x92\x34\x6d\xa0\x10\xd6\xb5\x83\x61\x27\xe6\x47\xd3\x89\xbd\x63\xfd\x3b\x8d\x03\x3d\x6c\x42\x2d\x5b\x70\xee\xe8\xdf\x4b\xf4\x66\x4e\xe1\x01\x45\x17\x80\x74\xad\x4f\xc3\xf3\xae\xc6\x1d\xc6\xd7\xc2\xce\xc9\xe1\x29\x30\x86\x2f\x4a\xa6\x4b\x15\x84\x73\xc9\x6f\xfd\x7f\xa5\x6e\x9e\xbd\xf1\xb0\xd4\xdd\x45\x5a\xc2\x3e\x4b\x78\xab\xa8\x84\x74\x4a\x91\x3b\x92\x23\x05\xf2\x1c\x1e\x7b\xf3\x09\xf8\xcf\xab\x24\xb6\x60\xa2\xe8\x4c\x9f\x75\x77\xaa\x8c\xe6\x01\x45\x36\x86\xcf\xc3\x63\x3a\xea\xd4\x8d\x7e\x06\xac\x14\x0a\xe0\x29\xf0\xed\x07\x22\x1a\x65\xda\x44\xae\xa2\x73\x1a\xe6\x90\x69\xa2\x8c\x46\xb2\x2f\xde\x49\x38\x08\xed\xfe\xfd\x41\xaf\x9f\xa9\x55\xd7\xdd\x22\x8d\xfa\x45\x63\xc5\x0f\x80\xf3\xb4\x08\xd6\x79\x30\x9e\x93\xee\x59\xa6\xd0\x4b\xee\x22\xe3\x33\xc1\x3a\x27\x68\x36\x78\x7e\x87\x0a\x06\xd5\x2e\x20\xd3\xaf\x15\xfb\xd8\x3b\x73\x14\xbb\x92\xed\x05\x5d\x2e\x29\x38\x2c\x94\xe4\x42\x45\x5e\xd3\xb5\x7d\xdf\x47\xca\x38\xb4\x5c\xaf\xfb\x7d\xdd\x6d\xf4\xa1\x2d\x77\xdd\x2f\xce\x6d\xc4\x7b\x8b\x4e\x67\xa9\x6f\xfe\x04\x00\x00\xff\xff\xb1\xd1\x27\x78\x05\x11\x00\x00") +var _jsonschemaDraft04Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x57\x3d\x6f\xdb\x3c\x10\xde\xf3\x2b\x08\x26\x63\xf2\x2a\x2f\xd0\xc9\x5b\xd1\x2e\x01\x5a\x34\x43\x37\x23\x03\x6d\x9d\x6c\x06\x14\xa9\x50\x54\x60\xc3\xd0\x7f\x2f\x28\x4a\x14\x29\x91\x92\x2d\xa7\x8d\x97\x28\xbc\xaf\xe7\x8e\xf7\xc5\xd3\x0d\x42\x08\x61\x9a\xe2\x15\xc2\x7b\xa5\x8a\x55\x92\xbc\x96\x82\x3f\x94\xdb\x3d\xe4\xe4\x3f\x21\x77\x49\x2a\x49\xa6\x1e\x1e\xbf\x24\xe6\xec\x16\xdf\x1b\xa1\x3b\xf3\xff\x02\xc9\x14\xca\xad\xa4\x85\xa2\x82\x6b\xe9\x6f\x42\x02\x32\x2c\x28\x07\x45\x5a\x15\x3d\x77\x46\x39\xd5\xcc\x25\x5e\x21\x83\xb8\x21\x18\xb6\xaf\x52\x92\xa3\x47\x68\x88\xea\x58\x80\x56\x4e\x1a\xf2\xbd\x4f\xcc\x29\x7f\x52\x90\x6b\x7d\xff\x0f\x48\xb4\x3d\x3f\x21\x7c\x27\x21\xd3\x2a\x6e\x31\xaa\x2d\x53\xdd\xf3\xe3\x42\x94\x54\xd1\x77\x78\xe2\x0a\x76\x20\xe3\x20\x68\xcb\x30\x86\x41\xf3\x2a\xc7\x2b\xf4\x78\x8e\xfe\xef\x90\x91\x8a\xa9\xc7\xb1\x1d\xc2\xd8\x2f\x0d\x75\xed\xc1\x4e\x9c\xc8\x25\x43\xac\xa8\xbe\xd7\xcc\xa9\xd1\xa9\x21\xa0\x1a\xbd\x04\x61\x94\x34\x2f\x18\xfc\x3e\x16\x50\x8e\x4d\x03\x6f\x1c\x58\xdb\x48\x23\xbc\x11\x82\x01\xe1\xfa\xd3\x3a\x8e\x30\xaf\x18\x33\x7f\xf3\x8d\x39\x11\x9b\x57\xd8\x2a\xfd\x55\x2a\x49\xf9\x0e\xc7\xec\x37\xd4\x25\xf7\xec\x5c\x66\xc7\xd7\x99\xaa\xcf\x4f\x89\x8a\xd3\xb7\x0a\x3a\xaa\x92\x15\xf4\x30\x6f\x1c\xb0\xd6\x46\xe7\x98\x39\x2d\xa4\x28\x40\x2a\x3a\x88\x9e\x29\xba\x88\x37\x2d\xca\x60\x38\xfa\xba\x5b\x20\xac\xa8\x62\xb0\x4c\xd4\xaf\xda\x45\x0a\xba\x5c\x3b\xb9\xc7\x79\xc5\x14\x2d\x18\x34\x19\x1c\x51\xdb\x25\x4d\xb4\x7e\x06\x14\x38\x6c\x59\x55\xd2\x77\xf8\x69\x59\xfc\x7b\x73\xed\x93\x43\xcb\x32\x6d\x3c\x28\xdc\x1b\x9a\xd3\x62\xab\xc2\x27\xf7\x41\xc9\x08\x2b\x23\x08\xad\x13\x57\x21\x9c\xd3\x72\x0d\x42\x72\xf8\x01\x7c\xa7\xf6\x83\xce\x39\xd7\x82\x3c\x1f\x2f\xd6\x60\x1b\xa2\xdf\x35\x89\x52\x20\xe7\x73\x74\xe0\x66\x26\x64\x4e\xb4\x97\x58\xc2\x0e\x0e\xe1\x60\x92\x34\x6d\xa0\x10\xd6\xb5\x83\x61\x27\xe6\x47\xd3\x89\xbd\x63\xfd\x3b\x8d\x03\x3d\x6c\x42\x2d\x5b\x70\xee\xe8\xdf\x4b\xf4\x66\x4e\xe1\x01\x45\x17\x80\x74\xad\x4f\xc3\xf3\xae\xc6\x1d\xc6\xd7\xc2\xce\xc9\xe1\x29\x30\x86\x2f\x4a\xa6\x4b\x15\x84\x73\xc9\x6f\xfd\x7f\xa5\x6e\x9e\xbd\xf1\xb0\xd4\xdd\x45\x5a\xc2\x3e\x4b\x78\xab\xa8\x84\x74\x4a\x91\x3b\x92\x23\x05\xf2\x1c\x1e\x7b\xf3\x09\xf8\xcf\xab\x24\xb6\x60\xa2\xe8\x4c\x9f\x75\x77\xaa\x8c\xe6\x01\x45\x36\x86\xcf\xc3\x63\x3a\xea\xd4\x8d\x7e\x06\xac\x14\x0a\xe0\x29\xf0\xed\x07\x22\x1a\x65\xda\x44\xae\xa2\x73\x1a\xe6\x90\x69\xa2\x8c\x46\xb2\x2f\xde\x49\x38\x08\xed\xfe\xfd\x41\xaf\x9f\xa9\x55\xd7\xdd\x22\x8d\xfa\x45\x63\xc5\x0f\x80\xf3\xb4\x08\xd6\x79\x30\x9e\x93\xee\x59\xa6\xd0\x4b\xee\x22\xe3\x33\xc1\x3a\x27\x68\x36\x78\x7e\x87\x0a\x06\xd5\x2e\x20\xd3\xaf\x15\xfb\xd8\x3b\x73\x14\xbb\x92\xed\x05\x5d\x2e\x29\x38\x2c\x94\xe4\x42\x45\x5e\xd3\xb5\x7d\xdf\x47\xca\x38\xb4\x5c\xaf\xfb\x7d\xdd\x6d\xf4\xa1\x2d\x77\xdd\x2f\xce\x6d\xc4\x7b\x8b\x4e\x67\xa9\x6f\xfe\x04\x00\x00\xff\xff\xb1\xd1\x27\x78\x05\x11\x00\x00") -func jsonschemaDraft04JSONBytes() ([]byte, error) { +func jsonschemaDraft04JsonBytes() ([]byte, error) { return bindataRead( - _jsonschemaDraft04JSON, + _jsonschemaDraft04Json, "jsonschema-draft-04.json", ) } -func jsonschemaDraft04JSON() (*asset, error) { - bytes, err := jsonschemaDraft04JSONBytes() +func jsonschemaDraft04Json() (*asset, error) { + bytes, err := jsonschemaDraft04JsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(0644), modTime: time.Unix(1567900649, 0)} + info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(0640), modTime: time.Unix(1568963823, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe1, 0x48, 0x9d, 0xb, 0x47, 0x55, 0xf0, 0x27, 0x93, 0x30, 0x25, 0x91, 0xd3, 0xfc, 0xb8, 0xf0, 0x7b, 0x68, 0x93, 0xa8, 0x2a, 0x94, 0xf2, 0x48, 0x95, 0xf8, 0xe4, 0xed, 0xf1, 0x1b, 0x82, 0xe2}} return a, nil } -var _v2SchemaJSON = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5d\x4f\x93\xdb\x36\xb2\xbf\xfb\x53\xa0\x14\x57\xd9\xae\xd8\x92\xe3\xf7\x2e\xcf\x97\xd4\xbc\xd8\x49\x66\x37\x5e\x4f\x79\x26\xbb\x87\x78\x5c\x05\x91\x2d\x09\x09\x09\x30\x00\x38\x33\x5a\xef\x7c\xf7\x2d\xf0\x9f\x08\x02\x20\x41\x8a\xd2\xc8\x0e\x0f\xa9\x78\x28\xa0\xd1\xdd\x68\x34\x7e\xdd\xf8\xf7\xf9\x11\x42\x33\x49\x64\x04\xb3\xd7\x68\x76\x86\xfe\x76\xf9\xfe\x1f\xe8\x32\xd8\x40\x8c\xd1\x8a\x71\x74\x79\x8b\xd7\x6b\xe0\xe8\xd5\xfc\x25\x3a\xbb\x38\x9f\xcf\x9e\xab\x0a\x24\x54\xa5\x37\x52\x26\xaf\x17\x0b\x91\x17\x99\x13\xb6\xb8\x79\xb5\x10\x59\xdd\xf9\xef\x82\xd1\x6f\xf2\xc2\x8f\xf3\x4f\xb5\x1a\xea\xc7\x17\x45\x41\xc6\xd7\x8b\x90\xe3\x95\x7c\xf1\xf2\x7f\x8b\xca\x45\x3d\xb9\x4d\x32\xa6\xd8\xf2\x77\x08\x64\xfe\x8d\xc3\x9f\x29\xe1\xa0\x9a\xff\xed\x11\x42\x08\xcd\x8a\xd6\xb3\x9f\x15\x67\x74\xc5\xca\x7f\x27\x58\x6e\xc4\xec\x11\x42\xd7\x59\x5d\x1c\x86\x44\x12\x46\x71\x74\xc1\x59\x02\x5c\x12\x10\xb3\xd7\x68\x85\x23\x01\x59\x81\x04\x4b\x09\x9c\x6a\xbf\x7e\xce\x49\x7d\xba\x7b\x51\xfd\xa1\x44\xe2\xb0\x52\xac\x7d\xb3\x08\x61\x45\x68\x46\x56\x2c\x6e\x80\x86\x8c\xbf\xbd\x93\x40\x05\x61\x74\x96\x95\xbe\x7f\x84\xd0\x7d\x4e\xde\x42\xb7\xe4\xbe\x46\xbb\x14\x5b\x48\x4e\xe8\xba\x90\x05\xa1\x19\xd0\x34\xae\xc4\xce\xbe\xbc\x9a\xbf\x9c\x15\x7f\x5d\x57\xc5\x42\x10\x01\x27\x89\xe2\x48\x51\xb9\xda\x40\xd5\x87\x37\xc0\x15\x5f\x88\xad\x90\xdc\x10\x81\x42\x16\xa4\x31\x50\x39\x2f\x38\xad\xab\xb0\x53\xd8\xac\x94\x56\x6f\xc3\x84\xf4\x11\xa4\x50\xb3\xfa\xe9\xd3\x6f\x9f\x3e\xdf\x2f\xd0\xeb\x8f\x1f\x3f\x7e\xbc\xfe\xf6\xe9\xf7\xaf\x5f\x7f\xfc\x18\x7e\xfb\xec\xfb\xc7\xb3\x36\x79\x54\x43\xe8\x29\xc5\x31\x20\xc6\x11\x49\x9e\xe5\x12\x41\x66\xa0\xe8\xed\x1d\x8e\x93\x08\x5e\xa3\x27\x3b\xc3\x7c\xa2\x73\xba\xc4\x02\x2e\xb0\xdc\xf4\xe5\x76\xd1\xca\x96\xa2\x8a\x94\xcd\x21\xc9\x6c\xec\x2c\x70\x42\x9e\x34\x74\x9d\x19\x7c\xcd\x20\x9c\xea\x2e\x0a\xfe\x42\x84\xd4\x29\x04\x8c\x8a\xb4\x41\xa2\xc1\xdc\x19\x8a\x88\x90\x4a\x49\xef\xce\xdf\xbd\x45\x4a\x52\x81\x70\x10\x40\x22\x21\x44\xcb\x6d\xc5\xec\x4e\x3c\x1c\x45\xef\x57\x9a\xb5\x7d\xae\xfe\xe5\xe4\x31\x86\x90\xe0\xab\x6d\x02\x3b\x2e\xcb\x11\x90\xd9\xa8\xc6\x77\xc2\x59\x98\x06\xfd\xf9\x2e\x78\x45\x01\xa6\xa8\xa0\x71\x5c\xbe\x33\xa7\xd2\xd9\x5f\x95\xef\xd9\xd5\xac\xfd\xdc\x5d\xbf\x5e\xb8\xd1\x3e\xc7\x31\x48\xe0\x5e\x4c\x14\x65\xdf\xb8\xa8\x71\x10\x09\xa3\xc2\xc7\x02\xcb\xa2\x4e\x5a\x02\x82\x94\x13\xb9\xf5\x30\xe6\xb2\xa4\xb5\xfe\x9b\x3e\x7a\xb2\x55\xd2\xa8\x4a\xbc\x16\xb6\x71\x8e\x39\xc7\xdb\x9d\xe1\x10\x09\x71\xbd\x9c\xb3\x41\x89\xd7\xa5\x89\xdc\x57\xb5\x53\x4a\xfe\x4c\xe1\xbc\xa0\x21\x79\x0a\x1a\x0f\x70\xa7\x5c\x08\x8e\xde\xb0\xc0\x43\x24\xad\x74\x63\x0e\xb1\xd9\x90\xe1\xb0\x2d\x13\xa7\x6d\x78\xfd\x04\x14\x38\x8e\x90\xaa\xce\x63\xac\x3e\x23\xbc\x64\xa9\xb4\xf8\x03\x63\xde\xcd\xbe\x16\x13\x4a\x55\xac\x82\x12\xc6\xac\xd4\x35\xf7\x22\xd4\x3a\xff\x22\x73\x0e\x6e\x51\xa0\x75\x1e\xae\x8f\xe8\x5d\xc7\x59\xe6\xe4\x9a\x18\x8d\xd6\x1c\x53\x84\x4d\xb7\x67\x28\x37\x09\x84\x69\x88\x12\x0e\x01\x11\x80\x32\xa2\xf5\xb9\xaa\xc6\xd9\x73\x53\xab\xfb\xb4\x2e\x20\xc6\x54\x92\xa0\x9a\xf3\x69\x1a\x2f\x81\x77\x37\xae\x53\x1a\xce\x40\xc4\xa8\x82\x1c\xb5\xef\xda\x24\x7d\xb9\x61\x69\x14\xa2\x25\xa0\x90\xac\x56\xc0\x81\x4a\xb4\xe2\x2c\xce\x4a\x64\x7a\x9a\x23\xf4\x13\x91\x3f\xa7\x4b\xf4\x63\x84\x6f\x18\x87\x10\xbd\xc3\xfc\x8f\x90\xdd\x52\x44\x04\xc2\x51\xc4\x6e\x21\x74\x48\x21\x81\xc7\xe2\xfd\xea\x12\xf8\x0d\x09\xf6\xe9\x47\x35\xaf\x67\xc4\x14\xf7\x22\x27\x97\xe1\xe2\x76\x2d\x06\x8c\x4a\x1c\x48\x3f\x73\x2d\x0b\x5b\x29\x45\x24\x00\x2a\x0c\x11\xec\x94\xca\xc2\xa6\xc1\x37\x21\x43\x83\x3b\x5f\x97\xf1\x43\x5e\x53\x73\x19\xa5\x36\xd8\x2d\x05\x2e\x34\x0b\xeb\x39\xfc\x1d\x63\x51\x01\xbd\x3d\xbb\x90\x84\x40\x25\x59\x6d\x09\x5d\xa3\x1c\x37\xe6\x5c\x16\x9a\x40\x09\x70\xc1\xe8\x82\xf1\x35\xa6\xe4\xdf\x99\x5c\x8e\x9e\x4d\x79\xb4\x27\x2f\xbf\x7e\xf8\x05\x25\x8c\x50\xa9\x98\x29\x90\x62\x60\xea\x75\xae\x13\xca\xbf\x2b\x1a\x29\x27\x76\xd6\x20\xc6\x64\x5f\xe6\x32\x1a\x08\x87\x21\x07\x21\xbc\xb4\xe4\xe0\x32\x67\xa6\xcd\xf3\x1e\xcd\xd9\x6b\xb6\x6f\x8e\x27\xa7\xed\xdb\xe7\xbc\xcc\x1a\x07\xce\x6f\x87\x33\xf0\xba\x51\x17\x22\x66\x78\x79\x8e\xce\xe5\x13\x81\x80\x06\x2c\xe5\x78\x0d\xa1\xb2\xb8\x54\xa8\x79\x09\xbd\xbf\x3c\x47\x01\x8b\x13\x2c\xc9\x32\xaa\xaa\x1d\xd5\xee\xab\x36\xbd\x6c\xfd\x54\x6c\xc8\x08\x01\x3c\xbd\xe7\x07\x88\xb0\x24\x37\x79\x90\x28\x4a\x1d\x10\x1a\x92\x1b\x12\xa6\x38\x42\x40\xc3\x4c\x43\x62\x8e\xae\x36\xb0\x45\x71\x2a\xa4\x9a\x23\x79\x59\xb1\xa8\xf2\xa4\x0c\x60\x9f\xcc\x8d\x40\xf5\x80\xca\xa8\x99\xc3\xa7\x85\x1f\x31\x25\xa9\x82\xc5\x6d\xbd\xd8\x36\x76\x7c\x02\x28\x97\xf6\x1d\x74\x3b\x11\x7e\x91\xae\x32\xf8\x6c\xf4\xe6\x7b\x9a\xa5\x1f\x62\xc6\x21\xcf\x9a\xe5\xed\x8b\x02\xf3\x2c\x33\x33\xdf\x00\xca\xc9\x09\xb4\x04\xf5\xa5\x08\xd7\xc3\x02\x18\x66\xf1\xab\x1e\x83\x37\x4c\xcd\x12\xc1\x1d\x50\xf6\xaa\xbd\xfe\xe2\x73\x48\x38\x08\xa0\x32\x9b\x18\x44\x86\x0b\x6a\xc1\xaa\x26\x96\x2d\x96\x3c\xa0\x54\x65\x73\x87\x15\xca\x15\xe5\xf5\x94\x46\x9f\x33\x1a\x0c\x9a\xb1\x5a\xd9\x6a\x95\xcd\xcb\x7e\xec\x9a\xc5\x94\x3b\x37\x26\x31\xd7\xfc\xe4\x1f\x13\x8c\x31\x75\x9c\xba\xf7\x87\x3c\xa1\xb7\x4f\x17\x1b\x09\x82\x98\xc4\x70\x95\xd3\xe8\x4c\x48\x5a\xa6\xd6\x2a\x3d\x56\x42\x80\x9f\xaf\xae\x2e\x50\x0c\x42\xe0\x35\x34\x3c\x8a\x62\x03\x37\xba\xb2\x27\x04\xda\x25\x8d\x06\xe2\xa0\x13\x8a\xf3\xf5\xec\x10\x72\x67\x88\x90\x3d\x4b\x64\xeb\xaa\xda\x8f\xf7\x5a\x75\x47\x9a\xa8\x51\x70\x26\xd2\x38\xc6\x7c\xbb\x57\xfc\xbd\xe4\x04\x56\xa8\xa0\x54\x9a\x45\xd5\xf7\x0f\x16\xfc\x57\x1c\x3c\xdf\x23\xba\x77\x38\xda\x16\x4b\x31\x53\x6a\x4d\x9a\x15\x63\xe7\xe1\x18\x69\x9f\x22\xe0\x24\xbb\x94\x4b\x97\xee\x2d\xf9\x70\x87\x72\x7b\xe6\xc4\x33\x2a\x66\x5e\x1c\x35\x72\xe3\x2d\xda\x73\xe4\xc7\x51\x6d\xa4\xa1\x2a\x4f\xde\x94\xcb\xb2\x3e\x31\x48\xae\x82\xce\xc9\xc8\x65\xcd\xc3\xb7\x34\xb6\x2b\xdf\x58\x65\x78\x6e\x73\xac\x5e\x24\x0d\x3f\xdc\x70\x23\xc6\xda\x52\x0b\x2d\x63\x7d\xa9\x49\x2d\x54\x48\x28\xc0\x12\x9c\xe3\x63\xc9\x58\x04\x98\x36\x07\xc8\x0a\xa7\x91\xd4\xf0\xbc\xc1\xa8\xb9\x70\xd0\xc6\xa9\xb6\x78\x80\x5a\xa3\xb4\x2c\xf4\x18\x0b\x8a\x9d\xd0\xb4\x55\x10\xee\x0d\xc5\xd6\xe0\x99\x93\xdc\xa1\x04\xbb\xf1\xa7\x23\xd1\xd1\x97\x8c\x87\x13\x0a\x21\x02\xe9\x99\x25\xed\x20\xc5\x92\x66\x3c\x32\x9c\xd6\x06\xb0\x31\x5c\x86\x29\x0a\xcb\x60\x33\x12\xa5\x91\xfc\x96\x75\xd0\x59\xd7\x13\xbd\xd3\x23\x79\xdd\x2a\x90\xa6\x38\x06\x91\x39\x7f\x20\x72\x03\x1c\x2d\x01\x61\xba\x45\x37\x38\x22\x61\x8e\x71\x85\xc4\x32\x15\x28\x60\x61\x16\xb8\x3d\x29\xdc\x4d\x3d\x2f\x12\x13\x7d\xc8\x7e\x37\xee\xa8\x7f\xfa\xdb\xcb\x17\xff\x77\xfd\xf9\x7f\xee\x9f\x3d\xfe\xcf\xa7\xa7\x45\xfb\xcf\x1e\xf7\xf3\xe0\xff\xc4\x51\x0a\x8e\x4c\xcb\x01\xdc\x0a\x65\xb2\x01\x83\xed\x3d\xe4\xa9\xa3\x4e\x2d\x59\xc5\xe8\x2f\x48\x7d\x5a\x6e\x37\xbf\x5c\x9f\x35\x13\x64\x14\xfa\xef\x0b\x68\xa6\x0d\xb4\x8e\xf1\xa8\xff\xbb\x60\xf4\x03\x64\xab\x5b\x81\x65\x51\xe6\xda\xca\xfa\xf0\xb0\xac\x3e\x9c\xca\x26\x0e\x1d\xdb\x57\x5b\xbb\xb4\x9a\xa6\xb6\x9b\x1a\x6b\xd1\x9a\x9e\x7e\x33\x9a\xec\x41\x69\x45\x22\xb8\xb4\x51\xeb\x04\x77\xca\x6f\x7b\x7b\xc8\xb2\xb0\x95\x92\x25\x5b\xd0\x42\xaa\x2a\xdd\x32\x78\x4f\x0c\xab\x68\x46\x6c\xea\x6d\xf4\x5c\x5e\xde\xc4\xac\xa5\xf9\xd1\x00\x9f\x7d\x98\x65\x24\xbd\xc7\x97\xd4\xb3\x3a\xa8\x2b\xa0\x34\x76\xf9\x65\x5f\x2d\x25\x95\x1b\xcf\xd6\xf4\x9b\x5f\x09\x95\xb0\x36\x3f\xdb\xd0\x39\x2a\x93\x1c\x9d\x03\xa2\x4a\xca\xf5\xf6\x10\xb6\x94\x89\x0b\x6a\x70\x12\x13\x49\x6e\x40\xe4\x29\x12\x2b\xbd\x80\x45\x11\x04\xaa\xc2\x8f\x56\x9e\x5c\x6b\xec\x8d\x5a\x0e\x14\x59\x06\x2b\x1e\x24\xcb\xc2\x56\x4a\x31\xbe\x23\x71\x1a\xfb\x51\x2a\x0b\x3b\x1c\x48\x10\xa5\x82\xdc\xc0\xbb\x3e\x24\x8d\x5a\x76\x2e\x09\xed\xc1\x65\x51\xb8\x83\xcb\x3e\x24\x8d\x5a\x2e\x5d\xfe\x02\x74\x2d\x3d\xf1\xef\xae\xb8\x4b\xe6\x5e\xd4\xaa\xe2\x2e\x5c\x5e\xec\x0e\xf5\x5b\x0c\xcb\x0a\xbb\xa4\x3c\xf7\x1f\x2a\x55\x69\x97\x8c\x7d\x68\x95\xa5\xad\xb4\xf4\x9c\xa5\x07\xb9\x7a\x05\xbb\xad\x50\x6f\xfb\xa0\x4e\x9b\x48\x23\x49\x92\x28\x87\x19\x3e\x32\xee\xca\x3b\x46\x7e\x7f\x18\x64\xcc\xcc\x0f\x34\xe9\x36\x8b\xb7\x6c\xa8\xa5\x5b\x54\x4c\x54\x5b\x15\x3a\xf1\x6c\x2d\xfe\x96\xc8\x0d\xba\x7b\x81\x88\xc8\x23\xab\xee\x7d\x3b\x92\xa7\x60\x29\xe3\xdc\xff\xb8\x64\xe1\xf6\xa2\x5a\x59\xdc\x6f\xeb\x45\x7d\x6a\xd1\x76\x1e\xea\xb8\xf1\xfa\x14\xd3\x36\x63\xe5\xd7\xf3\xe4\xbe\x25\xbd\x5e\x05\xeb\x73\x74\xb5\x21\x2a\x2e\x4e\xa3\x30\xdf\xbf\x43\x28\x2a\xd1\xa5\x2a\x9d\x8a\xfd\x76\xd8\x8d\xbc\x67\x65\xc7\xb8\x03\x45\xec\xa3\xb0\x37\x8a\x70\x4c\x68\x91\x51\x8e\x58\x80\xed\x4a\xf3\x81\x62\xca\x96\xbb\xf1\x52\xcd\x80\xfb\xe4\x4a\x5d\x6c\xdf\x6e\x20\x4b\x80\x30\x8e\x28\x93\xf9\xe9\x8d\x8a\x6d\xd5\x59\x65\x7b\xaa\x44\x9e\xc0\xc2\xd1\x7c\x40\x26\xd6\x1a\xce\xf9\xc5\x69\x7b\x6c\xec\xc8\x71\x7b\xe5\x21\x2e\xd3\xe5\x65\x93\x91\x53\x0b\x7b\x3a\xc7\xfa\x17\x6a\x01\xa7\x33\xd0\xf4\x40\x0f\x39\x87\xda\xe4\x54\x87\x3a\xd5\xe3\xc7\xa6\x8e\x20\xd4\x11\xb2\x4e\xb1\xe9\x14\x9b\x4e\xb1\xe9\x14\x9b\xfe\x15\x63\xd3\x47\xf5\xff\x97\x38\xe9\xcf\x14\xf8\x76\x82\x49\x13\x4c\xaa\x7d\xcd\x6c\x62\x42\x49\x87\x43\x49\x19\x33\x6f\xe3\x44\x6e\x9b\xab\x8a\x3e\x86\xaa\x99\x52\x1b\x5b\x59\x33\x02\x09\xa0\x21\xa1\x6b\x84\x6b\x66\xbb\xdc\x16\x0c\xd3\x68\xab\xec\x36\x4b\xd8\x60\x8a\x40\x31\x85\x6e\x14\x57\x13\xc2\xfb\x92\x10\xde\xbf\x88\xdc\xbc\x53\x5e\x7f\x82\x7a\x13\xd4\x9b\xa0\xde\x04\xf5\x90\x01\xf5\x94\xcb\x7b\x83\x25\x9e\xd0\xde\x84\xf6\x6a\x5f\x4b\xb3\x98\x00\xdf\x04\xf8\x6c\xbc\x7f\x19\x80\xaf\xf1\x71\x45\x22\x98\x40\xe0\x04\x02\x27\x10\xd8\x29\xf5\x04\x02\xff\x4a\x20\x30\xc1\x72\xf3\x65\x02\x40\xd7\xc1\xd1\xe2\x6b\xf1\xa9\x7b\xfb\xe4\x20\xc0\x68\x9d\xd4\xb4\xd3\x96\xb5\xa6\xd1\x41\x20\xe6\x89\xc3\x48\x65\x58\x13\x84\x9c\x56\x56\x3b\x0c\xe0\x6b\x83\x5c\x13\xd2\x9a\x90\xd6\x84\xb4\x26\xa4\x85\x0c\xa4\x45\x19\xfd\xff\x63\x6c\x52\xb5\x1f\x1e\x19\x74\x3a\xcd\xb9\x69\xce\xa6\x3a\x0f\x7a\x2d\x19\xc7\x81\x14\x5d\xcb\xd5\x03\xc9\x39\xd0\xb0\xd1\xb3\xcd\xfb\x7a\x2d\x5d\x3a\x48\xe1\xfa\x2e\xe6\x81\x42\x18\x86\xd6\xc1\xbe\xb1\x23\xd3\xf7\x34\xed\x19\x0a\x0b\xc4\x48\x44\xfd\x22\x50\xb6\x42\x58\xbb\xe5\x3d\xa7\x73\xd4\x8b\xc4\x8c\x70\x61\xec\x73\xee\xc3\x81\x8b\xf5\xe2\xd7\x52\x3e\xcf\xeb\xeb\x17\x3b\x71\x16\xda\x7d\xb8\xde\xf0\x7a\x8f\x06\x2d\xa7\x40\x7b\xc1\x9d\x41\x4d\xb6\x61\xa2\x4e\x9f\x3d\xa0\xc5\xae\xe3\x1c\x1d\x40\x6c\x48\x8b\x63\xa0\xb5\x01\xed\x8e\x02\xe9\x86\xc8\x3b\x06\xee\xdb\x4b\xde\xbd\xc0\xa1\x6f\xcb\xda\xfc\xc2\x44\x16\x87\x9c\x17\x31\xd3\x30\x20\x39\x42\xcb\x6f\xf2\xf1\xf4\x72\x10\xf8\x1c\xa0\xf3\xbd\x10\xea\x21\x35\x7d\xe8\x86\xdb\x15\xed\x81\x81\x07\x28\xbb\x13\x28\xc7\xf8\xce\x7d\x8d\xc2\x31\xb4\x7e\x94\xd6\xdb\x55\xef\x4a\xfb\xed\xc3\x40\x3e\xeb\x9f\xe9\x99\x0f\xdf\x08\x65\x88\x27\x73\x86\x31\x9d\x47\xdf\x55\x19\xba\x3d\xee\x15\x0a\xcd\x8c\xaa\x5e\xb9\xf6\x57\x33\x73\x5a\xa1\x89\x7b\x3b\xa0\xb2\xa4\xc2\xf6\xc1\x53\xb5\x00\xca\x23\xe5\xf4\x60\x6a\xb4\x2d\x74\xea\x4e\xed\x3b\xe3\x47\xfb\xed\x82\x3d\x19\xd4\x3b\x6b\xaf\xae\x2b\x2f\x57\xb3\x82\x68\xcb\xed\x88\x2e\xe1\x5c\xd7\x26\xfa\x0a\x65\xe7\xce\x11\x33\xb4\xdd\x66\xe3\x37\xf6\xfa\x70\xd6\x4f\xa1\x21\x51\xd8\x3c\x26\x14\x4b\xc6\x87\x44\x27\x1c\x70\xf8\x9e\x46\xce\xab\x21\x07\x5f\xc1\x76\x17\x1b\x77\xb4\xda\x75\xa0\x0a\x3a\x30\xe1\xf8\x97\x32\x16\x2b\x00\x75\x85\xee\x62\x46\xef\xd3\x85\xb5\x6b\x60\xbe\xf2\x30\x7a\x8c\x0b\x4b\xa6\xd0\xf9\x64\x42\xe7\x07\x41\x41\xe3\x2c\x5d\xf9\x6d\xe9\x39\x98\x3b\x3b\x5d\x67\xd4\x5c\xed\xf2\xf0\x48\x7b\xbd\x2d\x31\xdd\x3f\x34\xad\x44\x76\x51\x9a\x56\x22\xa7\x95\xc8\x69\x25\xf2\xe1\x56\x22\x1f\x00\x32\x6a\x73\x92\xed\xe1\xc6\x7d\x9f\x49\x2c\x69\x7e\xc8\x31\x4c\x0c\xb4\xf2\x54\x3b\x79\x3b\x9e\x4d\xb4\xd1\x18\x3e\x5f\x9a\x93\xa2\x11\xc3\xda\x27\x0b\xaf\x37\x2e\x5c\x37\xfb\xeb\x9a\xd6\xc3\xac\xc3\xcc\xf8\x1e\x5b\x9d\xac\x22\x64\xb7\xed\x26\xb8\xf3\xb9\x3c\xbb\x1f\xe2\xb0\x22\x77\x43\x6a\x62\x29\x39\x59\xa6\xe6\xe5\xcd\x7b\x83\xc0\x5b\x8e\x93\x64\xac\xeb\xca\x4f\x65\xac\x4a\xbc\x1e\xcd\x82\xfa\x3c\x70\x36\xb6\xb5\xed\x79\xef\xec\x68\x00\xff\x54\xfa\xb5\xe3\xf1\xdb\xe1\xbe\xce\x76\x17\xaf\x57\xb6\x6b\x89\x05\x09\xce\x52\xb9\x01\x2a\x49\xbe\xd9\xf4\xd2\xb8\x7a\xbf\x91\x02\xf3\x22\x8c\x13\xf2\x77\xd8\x8e\x43\x8b\xe1\x54\x6e\x5e\x9d\xc7\x49\x44\x02\x22\xc7\xa4\x79\x81\x85\xb8\x65\x3c\x1c\x93\xe6\x59\xa2\xf8\x1c\x51\x95\x05\xd9\x20\x00\x21\x7e\x60\x21\x58\xa9\x56\xff\xbe\xb6\x5a\x5e\x5b\x3f\x1f\xd6\xd3\x3c\xc4\x4d\xba\x99\xb4\x63\x6e\x7d\x3e\x3d\x57\xd2\x18\x5f\x47\xe8\xc3\x06\x8a\x68\x6c\x7f\x3b\x72\x0f\xe7\xe2\x77\x77\xf1\xd0\x99\xab\xdf\x2e\xfe\xd6\xbb\xcd\x1a\xb9\x90\xd1\xaf\xf2\x38\x3d\xdb\x74\xf8\xeb\xe3\xda\xe8\x2a\x62\xb7\xda\x1b\x07\xa9\xdc\x30\x5e\xbc\x68\xfb\x6b\x9f\x97\xf1\xc6\xb1\xd8\x5c\x29\x1e\x49\x30\xc5\xf7\xde\xad\x91\x42\xf9\xdd\xed\x89\x80\x25\xbe\x37\xd7\xe7\x32\x5c\xe6\x35\xac\xd4\x0c\x2d\xf7\x90\xc4\xe3\xf5\xe3\x2f\x7f\x54\x18\x88\xe3\x61\x47\x85\x64\x7f\xc0\xd7\x3f\x1a\x92\x42\xe9\xc7\x1e\x0d\x95\x76\xa7\x51\xa0\x8f\x02\x1b\x46\x9e\x06\x42\xd1\xf2\x01\x07\x02\xde\xe9\x7d\x1a\x0b\xa7\x32\x16\xcc\xc0\xee\xc4\x90\xd2\x5f\x6f\x98\x54\x5d\xf2\x95\xe1\xa7\x69\x10\x3a\x06\xe1\x65\xb3\x17\x47\x58\x78\xd0\x45\xd6\x5b\xd5\x5f\x25\x1d\x71\x49\xa6\x7a\x64\xda\xd0\x6f\xc7\x3a\x4c\xe3\x09\xc0\x6e\x96\x2c\xa7\xa7\x77\x34\x10\x05\x08\x21\x44\x92\x65\x77\xdf\x20\x5c\xbc\xe7\x97\x3f\xf4\x1a\x45\xd6\xe7\x27\x4a\xde\x74\x27\x66\x11\x7d\x70\xba\xd3\x78\xf9\x1e\x0d\xca\xc8\x39\xde\x7c\xb3\xa6\xe1\xbc\xd7\xc1\x6a\x6f\xb3\x0e\x52\xbe\xe4\x98\x8a\x15\x70\x94\x70\x26\x59\xc0\xa2\xf2\x1c\xfb\xd9\xc5\xf9\xbc\xd5\x92\x9c\xa3\xdf\xe6\x1e\xb3\x0d\x49\xba\x87\x50\x5f\x84\xfe\xe9\xd6\xf8\xbb\xe6\xf0\x7a\xeb\xa6\x65\x3b\x86\x8b\x79\x93\xf5\x59\x20\x6e\xb4\xa7\x44\xf4\x3f\xa5\xfe\x67\x42\x12\xdb\xd3\xe7\xbb\xa5\xa3\x8c\x5c\x2b\x97\xbb\xbb\x7f\x8e\xc5\x6e\xed\x43\x5c\xbf\x74\xc8\x8f\xff\xe6\xd6\xbe\x91\xb6\xf5\x95\xe4\xed\x93\xc4\xa8\x5b\xf9\x76\x4d\x35\xb7\xd8\x8c\xb6\x7d\xaf\x72\xe0\xb6\xbd\x01\x63\x9e\x76\xab\x1a\x32\x76\xe4\x8c\x76\xc2\xad\x6c\xa2\x65\xf7\xcf\xf8\xa7\xda\x2a\xb9\x8c\x3d\x3c\xa3\x9d\x64\x33\xe5\x1a\xb5\x2d\xfb\x86\xa2\x5a\x7f\x19\x5b\x7f\xc6\x3f\xd1\x53\xd3\xe2\x41\x5b\xd3\x4f\xf0\xec\xb0\x42\x73\x43\xd2\x68\x27\xd3\x6a\x6a\x34\xf6\x4e\x1e\x52\x8b\x87\x6c\xcc\xae\x44\xfb\x9e\xa7\x51\x4f\x9d\x55\x03\x81\x8e\x67\xfc\xb4\x69\xf0\x3a\x18\xf2\x40\xd0\xf6\xa8\x34\xe3\xc9\x98\xaf\xf6\xda\x24\xd3\xeb\x60\xb9\x0e\xd3\x1f\xa9\xff\xee\x1f\xfd\x37\x00\x00\xff\xff\x69\x5d\x0a\x6a\x39\x9d\x00\x00") +var _v2SchemaJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5d\x4f\x93\xdb\x36\xb2\xbf\xfb\x53\xa0\x14\x57\xd9\xae\xd8\x92\xe3\xf7\x2e\xcf\x97\xd4\xbc\xd8\x49\x66\x37\x5e\x4f\x79\x26\xbb\x87\x78\x5c\x05\x91\x2d\x09\x09\x09\x30\x00\x38\x33\x5a\xef\x7c\xf7\x2d\xf0\x9f\x08\x02\x20\x41\x8a\xd2\xc8\x0e\x0f\xa9\x78\x28\xa0\xd1\xdd\x68\x34\x7e\xdd\xf8\xf7\xf9\x11\x42\x33\x49\x64\x04\xb3\xd7\x68\x76\x86\xfe\x76\xf9\xfe\x1f\xe8\x32\xd8\x40\x8c\xd1\x8a\x71\x74\x79\x8b\xd7\x6b\xe0\xe8\xd5\xfc\x25\x3a\xbb\x38\x9f\xcf\x9e\xab\x0a\x24\x54\xa5\x37\x52\x26\xaf\x17\x0b\x91\x17\x99\x13\xb6\xb8\x79\xb5\x10\x59\xdd\xf9\xef\x82\xd1\x6f\xf2\xc2\x8f\xf3\x4f\xb5\x1a\xea\xc7\x17\x45\x41\xc6\xd7\x8b\x90\xe3\x95\x7c\xf1\xf2\x7f\x8b\xca\x45\x3d\xb9\x4d\x32\xa6\xd8\xf2\x77\x08\x64\xfe\x8d\xc3\x9f\x29\xe1\xa0\x9a\xff\xed\x11\x42\x08\xcd\x8a\xd6\xb3\x9f\x15\x67\x74\xc5\xca\x7f\x27\x58\x6e\xc4\xec\x11\x42\xd7\x59\x5d\x1c\x86\x44\x12\x46\x71\x74\xc1\x59\x02\x5c\x12\x10\xb3\xd7\x68\x85\x23\x01\x59\x81\x04\x4b\x09\x9c\x6a\xbf\x7e\xce\x49\x7d\xba\x7b\x51\xfd\xa1\x44\xe2\xb0\x52\xac\x7d\xb3\x08\x61\x45\x68\x46\x56\x2c\x6e\x80\x86\x8c\xbf\xbd\x93\x40\x05\x61\x74\x96\x95\xbe\x7f\x84\xd0\x7d\x4e\xde\x42\xb7\xe4\xbe\x46\xbb\x14\x5b\x48\x4e\xe8\xba\x90\x05\xa1\x19\xd0\x34\xae\xc4\xce\xbe\xbc\x9a\xbf\x9c\x15\x7f\x5d\x57\xc5\x42\x10\x01\x27\x89\xe2\x48\x51\xb9\xda\x40\xd5\x87\x37\xc0\x15\x5f\x88\xad\x90\xdc\x10\x81\x42\x16\xa4\x31\x50\x39\x2f\x38\xad\xab\xb0\x53\xd8\xac\x94\x56\x6f\xc3\x84\xf4\x11\xa4\x50\xb3\xfa\xe9\xd3\x6f\x9f\x3e\xdf\x2f\xd0\xeb\x8f\x1f\x3f\x7e\xbc\xfe\xf6\xe9\xf7\xaf\x5f\x7f\xfc\x18\x7e\xfb\xec\xfb\xc7\xb3\x36\x79\x54\x43\xe8\x29\xc5\x31\x20\xc6\x11\x49\x9e\xe5\x12\x41\x66\xa0\xe8\xed\x1d\x8e\x93\x08\x5e\xa3\x27\x3b\xc3\x7c\xa2\x73\xba\xc4\x02\x2e\xb0\xdc\xf4\xe5\x76\xd1\xca\x96\xa2\x8a\x94\xcd\x21\xc9\x6c\xec\x2c\x70\x42\x9e\x34\x74\x9d\x19\x7c\xcd\x20\x9c\xea\x2e\x0a\xfe\x42\x84\xd4\x29\x04\x8c\x8a\xb4\x41\xa2\xc1\xdc\x19\x8a\x88\x90\x4a\x49\xef\xce\xdf\xbd\x45\x4a\x52\x81\x70\x10\x40\x22\x21\x44\xcb\x6d\xc5\xec\x4e\x3c\x1c\x45\xef\x57\x9a\xb5\x7d\xae\xfe\xe5\xe4\x31\x86\x90\xe0\xab\x6d\x02\x3b\x2e\xcb\x11\x90\xd9\xa8\xc6\x77\xc2\x59\x98\x06\xfd\xf9\x2e\x78\x45\x01\xa6\xa8\xa0\x71\x5c\xbe\x33\xa7\xd2\xd9\x5f\x95\xef\xd9\xd5\xac\xfd\xdc\x5d\xbf\x5e\xb8\xd1\x3e\xc7\x31\x48\xe0\x5e\x4c\x14\x65\xdf\xb8\xa8\x71\x10\x09\xa3\xc2\xc7\x02\xcb\xa2\x4e\x5a\x02\x82\x94\x13\xb9\xf5\x30\xe6\xb2\xa4\xb5\xfe\x9b\x3e\x7a\xb2\x55\xd2\xa8\x4a\xbc\x16\xb6\x71\x8e\x39\xc7\xdb\x9d\xe1\x10\x09\x71\xbd\x9c\xb3\x41\x89\xd7\xa5\x89\xdc\x57\xb5\x53\x4a\xfe\x4c\xe1\xbc\xa0\x21\x79\x0a\x1a\x0f\x70\xa7\x5c\x08\x8e\xde\xb0\xc0\x43\x24\xad\x74\x63\x0e\xb1\xd9\x90\xe1\xb0\x2d\x13\xa7\x6d\x78\xfd\x04\x14\x38\x8e\x90\xaa\xce\x63\xac\x3e\x23\xbc\x64\xa9\xb4\xf8\x03\x63\xde\xcd\xbe\x16\x13\x4a\x55\xac\x82\x12\xc6\xac\xd4\x35\xf7\x22\xd4\x3a\xff\x22\x73\x0e\x6e\x51\xa0\x75\x1e\xae\x8f\xe8\x5d\xc7\x59\xe6\xe4\x9a\x18\x8d\xd6\x1c\x53\x84\x4d\xb7\x67\x28\x37\x09\x84\x69\x88\x12\x0e\x01\x11\x80\x32\xa2\xf5\xb9\xaa\xc6\xd9\x73\x53\xab\xfb\xb4\x2e\x20\xc6\x54\x92\xa0\x9a\xf3\x69\x1a\x2f\x81\x77\x37\xae\x53\x1a\xce\x40\xc4\xa8\x82\x1c\xb5\xef\xda\x24\x7d\xb9\x61\x69\x14\xa2\x25\xa0\x90\xac\x56\xc0\x81\x4a\xb4\xe2\x2c\xce\x4a\x64\x7a\x9a\x23\xf4\x13\x91\x3f\xa7\x4b\xf4\x63\x84\x6f\x18\x87\x10\xbd\xc3\xfc\x8f\x90\xdd\x52\x44\x04\xc2\x51\xc4\x6e\x21\x74\x48\x21\x81\xc7\xe2\xfd\xea\x12\xf8\x0d\x09\xf6\xe9\x47\x35\xaf\x67\xc4\x14\xf7\x22\x27\x97\xe1\xe2\x76\x2d\x06\x8c\x4a\x1c\x48\x3f\x73\x2d\x0b\x5b\x29\x45\x24\x00\x2a\x0c\x11\xec\x94\xca\xc2\xa6\xc1\x37\x21\x43\x83\x3b\x5f\x97\xf1\x43\x5e\x53\x73\x19\xa5\x36\xd8\x2d\x05\x2e\x34\x0b\xeb\x39\xfc\x1d\x63\x51\x01\xbd\x3d\xbb\x90\x84\x40\x25\x59\x6d\x09\x5d\xa3\x1c\x37\xe6\x5c\x16\x9a\x40\x09\x70\xc1\xe8\x82\xf1\x35\xa6\xe4\xdf\x99\x5c\x8e\x9e\x4d\x79\xb4\x27\x2f\xbf\x7e\xf8\x05\x25\x8c\x50\xa9\x98\x29\x90\x62\x60\xea\x75\xae\x13\xca\xbf\x2b\x1a\x29\x27\x76\xd6\x20\xc6\x64\x5f\xe6\x32\x1a\x08\x87\x21\x07\x21\xbc\xb4\xe4\xe0\x32\x67\xa6\xcd\xf3\x1e\xcd\xd9\x6b\xb6\x6f\x8e\x27\xa7\xed\xdb\xe7\xbc\xcc\x1a\x07\xce\x6f\x87\x33\xf0\xba\x51\x17\x22\x66\x78\x79\x8e\xce\xe5\x13\x81\x80\x06\x2c\xe5\x78\x0d\xa1\xb2\xb8\x54\xa8\x79\x09\xbd\xbf\x3c\x47\x01\x8b\x13\x2c\xc9\x32\xaa\xaa\x1d\xd5\xee\xab\x36\xbd\x6c\xfd\x54\x6c\xc8\x08\x01\x3c\xbd\xe7\x07\x88\xb0\x24\x37\x79\x90\x28\x4a\x1d\x10\x1a\x92\x1b\x12\xa6\x38\x42\x40\xc3\x4c\x43\x62\x8e\xae\x36\xb0\x45\x71\x2a\xa4\x9a\x23\x79\x59\xb1\xa8\xf2\xa4\x0c\x60\x9f\xcc\x8d\x40\xf5\x80\xca\xa8\x99\xc3\xa7\x85\x1f\x31\x25\xa9\x82\xc5\x6d\xbd\xd8\x36\x76\x7c\x02\x28\x97\xf6\x1d\x74\x3b\x11\x7e\x91\xae\x32\xf8\x6c\xf4\xe6\x7b\x9a\xa5\x1f\x62\xc6\x21\xcf\x9a\xe5\xed\x8b\x02\xf3\x2c\x33\x33\xdf\x00\xca\xc9\x09\xb4\x04\xf5\xa5\x08\xd7\xc3\x02\x18\x66\xf1\xab\x1e\x83\x37\x4c\xcd\x12\xc1\x1d\x50\xf6\xaa\xbd\xfe\xe2\x73\x48\x38\x08\xa0\x32\x9b\x18\x44\x86\x0b\x6a\xc1\xaa\x26\x96\x2d\x96\x3c\xa0\x54\x65\x73\xe3\x08\xb5\x8b\x99\xbd\x82\xbc\x9e\xc2\xe8\x53\x46\x83\x3f\x33\x54\x2b\x5b\xad\x92\x79\xd9\x8f\x5d\x93\x98\xf2\xe6\xc6\x1c\xe6\x9a\x9e\xfc\x43\x82\x31\x66\x8e\x53\x77\xfe\x90\xe7\xf3\xf6\xe9\x62\x23\x3f\x10\x93\x18\xae\x72\x1a\x9d\xf9\x48\xcb\xcc\x5a\x65\xc7\x4a\x04\xf0\xf3\xd5\xd5\x05\x8a\x41\x08\xbc\x86\x86\x43\x51\x6c\xe0\x46\x57\xf6\x44\x40\x0d\xfb\xff\xa2\xc3\x7c\x3d\x39\x84\xdc\x09\x22\x64\x4f\x12\xd9\xba\xaa\xf6\xe3\xbd\x56\xdd\x91\x25\x6a\x14\x9c\x89\x34\x8e\x31\xdf\xee\x15\x7e\x2f\x39\x81\x15\x2a\x28\x95\x66\x51\xf5\xfd\x83\xc5\xfe\x15\x07\xcf\xf7\x08\xee\x1d\x8e\xb6\xc5\x52\xcc\x8c\x5a\x93\x66\xc5\xd8\x79\x38\x46\xd6\xa7\x88\x37\xc9\x2e\xe3\xd2\xa5\x7b\x4b\x3a\xdc\xa1\xdc\x9e\x29\xf1\x8c\x8a\x99\x16\x47\x8d\xd4\x78\x8b\xf6\x1c\xe9\x71\x54\x1b\x69\xa8\x4a\x93\x37\xe5\xb2\x2c\x4f\x0c\x92\xab\xa0\x73\x32\x72\x59\xd3\xf0\x2d\x8d\xed\xca\x37\x16\x19\x9e\xdb\x1c\xab\x17\x49\xc3\x0f\x37\xdc\x88\xb1\xb4\xd4\x42\xcb\x58\x5e\x6a\x52\x0b\x15\x10\x0a\xb0\x04\xe7\xf8\x58\x32\x16\x01\xa6\xcd\x01\xb2\xc2\x69\x24\x35\x38\x6f\x30\x6a\xae\x1b\xb4\x71\xaa\xad\x1d\xa0\xd6\x20\x2d\x8b\x3c\xc6\x82\x62\x27\x34\x6d\x15\x84\x7b\x43\xb1\x35\x78\xa6\x24\x77\x28\xc1\x6e\xfc\xe9\x48\x74\xf4\x15\xe3\xe1\x84\x42\x88\x40\x7a\x26\x49\x3b\x48\xb1\xa4\x19\x8e\x0c\xa7\xb5\x01\x6c\x0c\x97\x61\x8a\xc2\x32\xd8\x8c\x44\x69\x24\xbf\x65\x1d\x74\xd6\xe5\x44\xef\xec\x48\x5e\xb7\x8a\xa3\x29\x8e\x41\x64\xce\x1f\x88\xdc\x00\x47\x4b\x40\x98\x6e\xd1\x0d\x8e\x48\x98\x63\x5c\x21\xb1\x4c\x05\x0a\x58\x98\xc5\x6d\x4f\x0a\x77\x53\x4f\x8b\xc4\x44\x1f\xb2\xdf\x8d\x3b\xea\x9f\xfe\xf6\xf2\xc5\xff\x5d\x7f\xfe\x9f\xfb\x67\x8f\xff\xf3\xe9\x69\xd1\xfe\xb3\xc7\xfd\x3c\xf8\x3f\x71\x94\x82\x23\xd1\x72\x00\xb7\x42\x99\x6c\xc0\x60\x7b\x0f\x79\xea\xa8\x53\x4b\x56\x31\xfa\x0b\x52\x9f\x96\xdb\xcd\x2f\xd7\x67\xcd\x04\x19\x85\xfe\xdb\x02\x9a\x59\x03\xad\x63\x3c\xea\xff\x2e\x18\xfd\x00\xd9\xe2\x56\x60\x59\x93\xb9\xb6\xb2\x3e\x3c\x2c\xab\x0f\xa7\xb2\x89\x43\xc7\xf6\xd5\xce\x2e\xad\xa6\xa9\xed\xa6\xc6\x5a\xb4\xa6\x67\xdf\x8c\x26\x7b\x50\x5a\x91\x08\x2e\x6d\xd4\x3a\xc1\x9d\xf2\xdb\xde\x1e\xb2\x2c\x6c\xa5\x64\xc9\x16\xb4\x90\xaa\x4a\xb7\x0c\xde\x13\xc3\x2a\x9a\x11\x9b\x7a\x1b\x3d\x95\x97\x37\x31\x6b\x69\x7e\x34\xc0\x67\x1f\x66\x19\x49\xef\xf1\x25\xf5\xac\x0e\xea\x0a\x28\x8d\x4d\x7e\xd9\x57\x4b\x49\xe5\xc6\xb3\x25\xfd\xe6\x57\x42\x25\xac\xcd\xcf\x36\x74\x8e\xca\x24\x47\xe7\x80\xa8\x92\x72\xbd\x3d\x84\x2d\x65\xe2\x82\x1a\x9c\xc4\x44\x92\x1b\x10\x79\x8a\xc4\x4a\x2f\x60\x51\x04\x81\xaa\xf0\xa3\x95\x27\xd7\x12\x7b\xa3\x96\x03\x45\x96\xc1\x8a\x07\xc9\xb2\xb0\x95\x52\x8c\xef\x48\x9c\xc6\x7e\x94\xca\xc2\x0e\x07\x12\x44\xa9\x20\x37\xf0\xae\x0f\x49\xa3\x96\x9d\x4b\x42\x7b\x70\x59\x14\xee\xe0\xb2\x0f\x49\xa3\x96\x4b\x97\xbf\x00\x5d\x4b\x4f\xfc\xbb\x2b\xee\x92\xb9\x17\xb5\xaa\xb8\x0b\x97\x17\x9b\x43\xfd\xd6\xc2\xb2\xc2\x2e\x29\xcf\xfd\x87\x4a\x55\xda\x25\x63\x1f\x5a\x65\x69\x2b\x2d\x3d\x67\xe9\x41\xae\x5e\xc1\x6e\x2b\xd4\xdb\x3e\xa8\xd3\x26\xd2\x48\x92\x24\xca\x61\x86\x8f\x8c\xbb\xf2\x8e\x91\xdf\x1f\x06\x19\x33\xf3\x03\x4d\xba\xcd\xe2\x2d\xfb\x69\xe9\x16\x15\x13\xd5\x56\x85\x4e\x3c\x5b\x8a\xbf\x25\x72\x83\xee\x5e\x20\x22\xf2\xc8\xaa\x7b\xdb\x8e\xe4\x29\x58\xca\x38\xb7\x3f\x2e\x59\xb8\xbd\xa8\x16\x16\xf7\xdb\x79\x51\x9f\x5a\xb4\x8d\x87\x3a\x6e\xbc\x3e\xc5\xb4\xcd\x58\xf9\xf5\x3c\xb9\x6f\x49\xaf\x57\xc1\xfa\x1c\x5d\x6d\x88\x8a\x8b\xd3\x28\xcc\xb7\xef\x10\x8a\x4a\x74\xa9\x4a\xa7\x62\xbf\x0d\x76\x23\x6f\x59\xd9\x31\xee\x40\x11\xfb\x28\xec\x8d\x22\x1c\x13\x5a\x64\x94\x23\x16\x60\xbb\xd2\x7c\xa0\x98\xb2\xe5\x6e\xbc\x54\x33\xe0\x3e\xb9\x52\x17\xdb\xb7\x1b\xc8\x12\x20\x8c\x23\xca\x64\x7e\x78\xa3\x62\x5b\x75\x56\xd9\x9e\x2a\x91\x27\xb0\x70\x34\x1f\x90\x89\xb5\x86\x73\x7e\x71\xda\x1e\xfb\x3a\x72\xdc\x5e\x79\x88\xcb\x74\x79\xd9\x64\xe4\xd4\xc2\x9e\xce\xb1\xfe\x85\x5a\xc0\xe9\x0c\x34\x3d\xd0\x43\xce\xa1\x36\x39\xd5\xa1\x4e\xf5\xf8\xb1\xa9\x23\x08\x75\x84\xac\x53\x6c\x3a\xc5\xa6\x53\x6c\x3a\xc5\xa6\x7f\xc5\xd8\xf4\x51\xfd\xff\x25\x4e\xfa\x33\x05\xbe\x9d\x60\xd2\x04\x93\x6a\x5f\x33\x9b\x98\x50\xd2\xe1\x50\x52\xc6\xcc\xdb\x38\x91\xdb\xe6\xaa\xa2\x8f\xa1\x6a\xa6\xd4\xc6\x56\xd6\x8c\x40\x02\x68\x48\xe8\x1a\xe1\x9a\xd9\x2e\xb7\x05\xc3\x34\xda\x2a\xbb\xcd\x12\x36\x98\x22\x50\x4c\xa1\x1b\xc5\xd5\x84\xf0\xbe\x24\x84\xf7\x2f\x22\x37\xef\x94\xd7\x9f\xa0\xde\x04\xf5\x26\xa8\x37\x41\x3d\x64\x40\x3d\xe5\xf2\xde\x60\x89\x27\xb4\x37\xa1\xbd\xda\xd7\xd2\x2c\x26\xc0\x37\x01\x3e\x1b\xef\x5f\x06\xe0\x6b\x7c\x5c\x91\x08\x26\x10\x38\x81\xc0\x09\x04\x76\x4a\x3d\x81\xc0\xbf\x12\x08\x4c\xb0\xdc\x7c\x99\x00\xd0\x75\x70\xb4\xf8\x5a\x7c\xea\xde\x3e\x39\x08\x30\x5a\x27\x35\xed\xb4\x65\xad\x69\x74\x10\x88\x79\xe2\x30\x52\x19\xd6\x04\x21\xa7\x95\xd5\x0e\x03\xf8\xda\x20\xd7\x84\xb4\x26\xa4\x35\x21\xad\x09\x69\x21\x03\x69\x51\x46\xff\xff\x18\x9b\x54\xed\x87\x47\x06\x9d\x4e\x73\x6e\x9a\xb3\xa9\xce\x83\x5e\x4b\xc6\x71\x20\x45\xd7\x72\xf5\x40\x72\x0e\x34\x6c\xf4\x6c\xf3\xba\x5e\x4b\x97\x0e\x52\xb8\xbe\x8b\x79\xa0\x10\x86\xa1\x75\xb0\x6f\xec\xc8\xf4\x3d\x4d\x7b\x86\xc2\x02\x31\x12\x51\xbf\x07\x94\xad\x10\xd6\x2e\x79\xcf\xe9\x1c\xf5\x1e\x31\x23\x5c\x18\xfb\x9c\xfb\x70\xe0\x62\xbd\xf7\xb5\x94\xcf\xf3\xf6\xfa\xc5\x4e\x9c\x85\x76\x1d\xae\x37\xbc\xde\xa3\x41\xcb\x29\xd0\x5e\x70\x67\x50\x93\x6d\x98\xa8\xd3\x67\x0f\x68\xb1\xeb\x38\x47\x07\x10\x1b\xd2\xe2\x18\x68\x6d\x40\xbb\xa3\x40\xba\x21\xf2\x8e\x81\xfb\xf6\x92\x77\x2f\x70\xe8\xdb\xb2\x36\xbf\x30\x91\xc5\x21\xe7\x45\xcc\x34\x0c\x48\x8e\xd0\xf2\x9b\x7c\x3c\xbd\x1c\x04\x3e\x07\xe8\x7c\x2f\x84\x7a\x48\x4d\x1f\xba\xe1\x76\x45\x7b\x60\xe0\x01\xca\xee\x04\xca\x31\xbe\x73\x5f\xa3\x70\x0c\xad\x1f\xa5\xf5\x76\xd5\xbb\xd2\x7e\xfb\x30\x90\xcf\xfa\x67\x7a\xe6\xc3\x37\x42\x19\xe2\xc9\x9c\x61\x4c\xe7\xd1\x77\x55\x86\x6e\x8f\x7b\x85\x42\x33\xa3\xaa\x57\xae\xfd\xd5\xcc\x9c\x56\x68\xe2\xde\x0e\xa8\x2c\xa9\xb0\x7d\xf0\x54\x2d\x80\xf2\x48\x39\x3d\x98\x1a\x6d\x0b\x9d\xba\x53\xfb\xce\xf8\xd1\x7e\xbb\x60\x4f\x06\xf5\xce\xda\xab\xeb\xca\xcb\xd5\xac\x20\xda\x72\x3b\xa2\x4b\x38\xd7\xb5\x89\xbe\x42\xd9\xb9\x73\xc4\x0c\x6d\xb7\xd9\xf8\x8d\xbd\x3e\x9c\xf5\x53\x68\x48\x14\x36\x8f\x09\xc5\x92\xf1\x21\xd1\x09\x07\x1c\xbe\xa7\x91\xf3\x6a\xc8\xc1\x57\xb0\xdd\xc5\xc6\x1d\xad\x76\x1d\xa8\x82\x0e\x4c\x38\xfe\xa5\x8c\xc5\x0a\x40\x5d\xa1\xbb\x98\xd1\xfb\x74\x61\xed\x1a\x98\xaf\x3c\x8c\x1e\xe3\xc2\x92\x29\x74\x3e\x99\xd0\xf9\x41\x50\xd0\x38\x4b\x57\x7e\x5b\x7a\x0e\xe6\xce\x4e\xd7\x19\x35\x57\xbb\x3c\x3c\xd2\x5e\x4f\x4b\x4c\xf7\x0f\x4d\x2b\x91\x5d\x94\xa6\x95\xc8\x69\x25\x72\x5a\x89\x7c\xb8\x95\xc8\x07\x80\x8c\xda\x9c\x64\x7b\xb7\x71\xdf\x57\x12\x4b\x9a\x1f\x72\x0c\x13\x03\xad\x3c\xd5\x4e\xde\x8e\x57\x13\x6d\x34\x86\xcf\x97\xe6\xa4\x68\xc4\xb0\xf6\xc9\xc2\xeb\x8d\x0b\xd7\xcd\xfe\xba\xa6\xf5\x30\xeb\x30\x33\xbe\xc7\x56\x27\xab\x08\xd9\x6d\xbb\x09\xee\x7c\x2d\xcf\xee\x87\x38\xac\xc8\xdd\x90\x9a\x58\x4a\x4e\x96\xa9\x79\x79\xf3\xde\x20\xf0\x96\xe3\x24\x19\xeb\xba\xf2\x53\x19\xab\x12\xaf\x47\xb3\xa0\x3e\xef\x9b\x8d\x6d\x6d\x7b\xde\x3b\x3b\x1a\xc0\x3f\x95\x7e\xed\x78\xfb\x76\xb8\xaf\xb3\xdd\xc5\xeb\x95\xed\x5a\x62\x41\x82\xb3\x54\x6e\x80\x4a\x92\x6f\x36\xbd\x34\xae\xde\x6f\xa4\xc0\xbc\x08\xe3\x84\xfc\x1d\xb6\xe3\xd0\x62\x38\x95\x9b\x57\xe7\x71\x12\x91\x80\xc8\x31\x69\x5e\x60\x21\x6e\x19\x0f\xc7\xa4\x79\x96\x28\x3e\x47\x54\x65\x41\x36\x08\x40\x88\x1f\x58\x08\x56\xaa\xd5\xbf\xaf\xad\x96\xd7\xd6\xcf\x87\xf5\x34\x0f\x71\x93\x6e\x26\xed\x98\x5b\x9f\x4f\xcf\x95\x34\xc6\xd7\x11\xfa\xb0\x81\x22\x1a\xdb\xdf\x8e\xdc\xc3\xb9\xf8\xdd\x5d\x3c\x74\xe6\xea\xb7\x8b\xbf\xf5\x6e\xb3\x46\x2e\x64\xf4\xab\x3c\x4e\xcf\x36\x1d\xfe\xfa\xb8\x36\xba\x8a\xd8\xad\xf6\xc6\x41\x2a\x37\x8c\x17\x0f\xda\xfe\xda\xe7\x65\xbc\x71\x2c\x36\x57\x8a\x47\x12\x4c\xf1\xbd\x77\x6b\xa4\x50\x7e\x77\x7b\x22\x60\x89\xef\xcd\xf5\xb9\x0c\x97\x79\x0d\x2b\x35\x43\xcb\x3d\x24\xf1\x78\xfc\xf8\xcb\x1f\x15\x06\xe2\x78\xd8\x51\x21\xd9\x1f\xf0\xf5\x8f\x86\xa4\x50\xfa\xb1\x47\x43\xa5\xdd\x69\x14\xe8\xa3\xc0\x86\x91\xa7\x81\x50\xb4\x7c\xc0\x81\x80\x77\x7a\x9f\xc6\xc2\xa9\x8c\x05\x33\xb0\x3b\x31\xa4\xf4\xd7\x1b\x26\x55\x97\x7c\x65\xf8\x69\x1a\x84\x8e\x41\x78\xd9\xec\xc5\x11\x16\x1e\x74\x91\xf5\x56\xf5\x57\x49\x47\x5c\x92\xa9\x1e\x99\x36\xf4\xdb\xb1\x0e\xd3\x78\x02\xb0\x9b\x25\xcb\xe9\xe9\x1d\x0d\x44\x01\x42\x08\x91\x64\xd9\xdd\x37\x08\x17\xef\xf9\xe5\x0f\xbd\x46\x91\xf5\xf9\x89\x92\x37\xdd\x89\x59\x44\x1f\x9c\xee\x34\x1e\xbe\x47\x83\x32\x72\x8e\x37\xdf\xac\x69\x38\xef\x75\xb0\xda\xdb\xac\x83\x94\x2f\x39\xa6\x62\x05\x1c\x25\x9c\x49\x16\xb0\xa8\x3c\xc7\x7e\x76\x71\x3e\x6f\xb5\x24\xe7\xe8\xb7\xb9\xc7\x6c\x43\x92\xee\x21\xd4\x17\xa1\x7f\xba\x35\xfe\xae\x39\xbc\xde\xba\x69\xd9\x8e\xe1\x62\xde\x64\x7d\x16\x88\x1b\xed\x29\x11\xfd\x4f\xa9\xff\x99\x90\xc4\xf6\xf4\xf9\x6e\xe9\x28\x23\xd7\xca\xe5\xee\xee\x9f\x63\xb1\x5b\xfb\x10\xd7\x2f\x1d\xf2\xe3\xbf\xb9\xb5\x6f\xa4\x6d\x7d\x25\x79\xfb\x24\x31\xea\x56\xbe\x5d\x53\xcd\x2d\x36\xa3\x6d\xdf\xab\x1c\xb8\x6d\x6f\xc0\x98\xa7\xdd\xaa\x86\x8c\x1d\x39\xa3\x9d\x70\x2b\x9b\x68\xd9\xfd\x33\xfe\xa9\xb6\x4a\x2e\x63\x0f\xcf\x68\x27\xd9\x4c\xb9\x46\x6d\xcb\xbe\xa1\xa8\xd6\x5f\xc6\xd6\x9f\xf1\x4f\xf4\xd4\xb4\x78\xd0\xd6\xf4\x13\x3c\x3b\xac\xd0\xdc\x90\x34\xda\xc9\xb4\x9a\x1a\x8d\xbd\x93\x87\xd4\xe2\x21\x1b\xb3\x2b\xd1\xbe\xe7\x69\xd4\x53\x67\xd5\x40\xa0\xe3\x19\x3f\x6d\x1a\xbc\x0e\x86\x3c\x10\xb4\x3d\x2a\xcd\x78\x32\xe6\xab\xbd\x36\xc9\xf4\x3a\x58\xae\xc3\xf4\x47\xea\xbf\xfb\x47\xff\x0d\x00\x00\xff\xff\xd2\x32\x5a\x28\x38\x9d\x00\x00") -func v2SchemaJSONBytes() ([]byte, error) { +func v2SchemaJsonBytes() ([]byte, error) { return bindataRead( - _v2SchemaJSON, + _v2SchemaJson, "v2/schema.json", ) } -func v2SchemaJSON() (*asset, error) { - bytes, err := v2SchemaJSONBytes() +func v2SchemaJson() (*asset, error) { + bytes, err := v2SchemaJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "v2/schema.json", size: 40249, mode: os.FileMode(0644), modTime: time.Unix(1567900649, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcb, 0x25, 0x27, 0xe8, 0x46, 0xae, 0x22, 0xc4, 0xf4, 0x8b, 0x1, 0x32, 0x4d, 0x1f, 0xf8, 0xdf, 0x75, 0x15, 0xc8, 0x2d, 0xc7, 0xed, 0xe, 0x7e, 0x0, 0x75, 0xc0, 0xf9, 0xd2, 0x1f, 0x75, 0x57}} + info := bindataFileInfo{name: "v2/schema.json", size: 40248, mode: os.FileMode(0640), modTime: time.Unix(1568964748, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xab, 0x88, 0x5e, 0xf, 0xbf, 0x17, 0x74, 0x0, 0xb2, 0x5a, 0x7f, 0xbc, 0x58, 0xcd, 0xc, 0x25, 0x73, 0xd5, 0x29, 0x1c, 0x7a, 0xd0, 0xce, 0x79, 0xd4, 0x89, 0x31, 0x27, 0x90, 0xf2, 0xff, 0xe6}} return a, nil } @@ -201,9 +201,9 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "jsonschema-draft-04.json": jsonschemaDraft04JSON, + "jsonschema-draft-04.json": jsonschemaDraft04Json, - "v2/schema.json": v2SchemaJSON, + "v2/schema.json": v2SchemaJson, } // AssetDir returns the file names below a certain @@ -247,9 +247,9 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "jsonschema-draft-04.json": &bintree{jsonschemaDraft04JSON, map[string]*bintree{}}, + "jsonschema-draft-04.json": &bintree{jsonschemaDraft04Json, map[string]*bintree{}}, "v2": &bintree{nil, map[string]*bintree{ - "schema.json": &bintree{v2SchemaJSON, map[string]*bintree{}}, + "schema.json": &bintree{v2SchemaJson, map[string]*bintree{}}, }}, }} diff --git a/vendor/github.com/go-openapi/spec/contact_info.go b/vendor/github.com/go-openapi/spec/contact_info.go index f285970aa..f9bf42e8d 100644 --- a/vendor/github.com/go-openapi/spec/contact_info.go +++ b/vendor/github.com/go-openapi/spec/contact_info.go @@ -14,11 +14,41 @@ package spec +import ( + "encoding/json" + + "github.com/go-openapi/swag" +) + // ContactInfo contact information for the exposed API. // // For more information: http://goo.gl/8us55a#contactObject type ContactInfo struct { + ContactInfoProps + VendorExtensible +} + +type ContactInfoProps struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` Email string `json:"email,omitempty"` } + +func (c *ContactInfo) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &c.ContactInfoProps); err != nil { + return err + } + return json.Unmarshal(data, &c.VendorExtensible) +} + +func (c ContactInfo) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(c.ContactInfoProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(c.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2), nil +} diff --git a/vendor/github.com/go-openapi/spec/expander.go b/vendor/github.com/go-openapi/spec/expander.go index 1e7fc8c49..1f30e7f8b 100644 --- a/vendor/github.com/go-openapi/spec/expander.go +++ b/vendor/github.com/go-openapi/spec/expander.go @@ -200,11 +200,11 @@ func ExpandSpec(spec *Swagger, options *ExpandOptions) error { return nil } +const rootBase = "root" // baseForRoot loads in the cache the root document and produces a fake "root" base path entry // for further $ref resolution func baseForRoot(root interface{}, cache ResolutionCache) string { // cache the root document to resolve $ref's - const rootBase = "root" if root != nil { base, _ := absPath(rootBase) normalizedBase := normalizeAbsPath(base) @@ -452,11 +452,12 @@ func expandPathItem(pathItem *PathItem, resolver *schemaLoader, basePath string) return err } if pathItem.Ref.String() != "" { - var err error - resolver, err = resolver.transitiveResolver(basePath, pathItem.Ref) - if resolver.shouldStopOnError(err) { + transitiveResolver, err := resolver.transitiveResolver(basePath, pathItem.Ref) + if transitiveResolver.shouldStopOnError(err) { return err } + basePath = transitiveResolver.updateBasePath(resolver, basePath) + resolver = transitiveResolver } pathItem.Ref = Ref{} diff --git a/vendor/github.com/go-openapi/spec/go.mod b/vendor/github.com/go-openapi/spec/go.mod index 02a142c03..14e5f2dac 100644 --- a/vendor/github.com/go-openapi/spec/go.mod +++ b/vendor/github.com/go-openapi/spec/go.mod @@ -4,14 +4,9 @@ require ( github.com/go-openapi/jsonpointer v0.19.3 github.com/go-openapi/jsonreference v0.19.2 github.com/go-openapi/swag v0.19.5 - github.com/kr/pty v1.1.5 // indirect - github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.3.0 - golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect - golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f // indirect - golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 // indirect - gopkg.in/yaml.v2 v2.2.2 + gopkg.in/yaml.v2 v2.2.4 ) go 1.13 diff --git a/vendor/github.com/go-openapi/spec/go.sum b/vendor/github.com/go-openapi/spec/go.sum index 86db601c9..c209ff971 100644 --- a/vendor/github.com/go-openapi/spec/go.sum +++ b/vendor/github.com/go-openapi/spec/go.sum @@ -1,5 +1,3 @@ -github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= @@ -7,20 +5,12 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdko github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-openapi/jsonpointer v0.17.0 h1:nH6xp8XdXHx8dqveo0ZuJBluCO2qGrPbDNZ0dwoRHP0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8= -github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk= -github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/swag v0.17.0 h1:iqrgMg7Q7SvtbWLlltPrkMs0UBJI6oTSs79JFRUi880= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= @@ -28,11 +18,8 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= @@ -40,35 +27,23 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58 h1:otZG8yDCO4LVps5+9bxOeNiCvgmOyt96J3roHTYs7oE= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/spec/license.go b/vendor/github.com/go-openapi/spec/license.go index f20961b4f..e1529b401 100644 --- a/vendor/github.com/go-openapi/spec/license.go +++ b/vendor/github.com/go-openapi/spec/license.go @@ -14,10 +14,40 @@ package spec +import ( + "encoding/json" + + "github.com/go-openapi/swag" +) + // License information for the exposed API. // // For more information: http://goo.gl/8us55a#licenseObject type License struct { + LicenseProps + VendorExtensible +} + +type LicenseProps struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` } + +func (l *License) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &l.LicenseProps); err != nil { + return err + } + return json.Unmarshal(data, &l.VendorExtensible) +} + +func (l License) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(l.LicenseProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(l.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2), nil +} diff --git a/vendor/github.com/go-openapi/spec/ref.go b/vendor/github.com/go-openapi/spec/ref.go index 08ff869b2..1f31a9ead 100644 --- a/vendor/github.com/go-openapi/spec/ref.go +++ b/vendor/github.com/go-openapi/spec/ref.go @@ -68,10 +68,12 @@ func (r *Ref) IsValidURI(basepaths ...string) bool { } if r.HasFullURL { + //#nosec rr, err := http.Get(v) if err != nil { return false } + defer rr.Body.Close() return rr.StatusCode/100 == 2 } diff --git a/vendor/github.com/go-openapi/spec/schema_loader.go b/vendor/github.com/go-openapi/spec/schema_loader.go index 9e20e96c2..02d9966c1 100644 --- a/vendor/github.com/go-openapi/spec/schema_loader.go +++ b/vendor/github.com/go-openapi/spec/schema_loader.go @@ -86,12 +86,7 @@ func (r *schemaLoader) transitiveResolver(basePath string, ref Ref) (*schemaLoad newOptions := r.options newOptions.RelativeBase = rootURL.String() debugLog("setting new root: %s", newOptions.RelativeBase) - resolver, err := defaultSchemaLoader(root, newOptions, r.cache, r.context) - if err != nil { - return nil, err - } - - return resolver, nil + return defaultSchemaLoader(root, newOptions, r.cache, r.context) } func (r *schemaLoader) updateBasePath(transitive *schemaLoader, basePath string) string { @@ -154,7 +149,15 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) toFetch := *refURL toFetch.Fragment = "" - normalized := normalizeAbsPath(toFetch.String()) + var err error + path := toFetch.String() + if path == rootBase { + path, err = absPath(rootBase) + if err != nil { + return nil, url.URL{}, false, err + } + } + normalized := normalizeAbsPath(path) data, fromCache := r.cache.Get(normalized) if !fromCache { diff --git a/vendor/github.com/go-openapi/swag/convert_types.go b/vendor/github.com/go-openapi/swag/convert_types.go index bfba82346..c49cc473a 100644 --- a/vendor/github.com/go-openapi/swag/convert_types.go +++ b/vendor/github.com/go-openapi/swag/convert_types.go @@ -299,6 +299,73 @@ func Int64ValueMap(src map[string]*int64) map[string]int64 { return dst } +// Uint16 returns a pointer to of the uint16 value passed in. +func Uint16(v uint16) *uint16 { + return &v +} + +// Uint16Value returns the value of the uint16 pointer passed in or +// 0 if the pointer is nil. +func Uint16Value(v *uint16) uint16 { + if v != nil { + return *v + } + + return 0 +} + +// Uint16Slice converts a slice of uint16 values into a slice of +// uint16 pointers +func Uint16Slice(src []uint16) []*uint16 { + dst := make([]*uint16, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + + return dst +} + +// Uint16ValueSlice converts a slice of uint16 pointers into a slice of +// uint16 values +func Uint16ValueSlice(src []*uint16) []uint16 { + dst := make([]uint16, len(src)) + + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + + return dst +} + +// Uint16Map converts a string map of uint16 values into a string +// map of uint16 pointers +func Uint16Map(src map[string]uint16) map[string]*uint16 { + dst := make(map[string]*uint16) + + for k, val := range src { + v := val + dst[k] = &v + } + + return dst +} + +// Uint16ValueMap converts a string map of uint16 pointers into a string +// map of uint16 values +func Uint16ValueMap(src map[string]*uint16) map[string]uint16 { + dst := make(map[string]uint16) + + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + + return dst +} + // Uint returns a pointer to of the uint value passed in. func Uint(v uint) *uint { return &v @@ -476,6 +543,74 @@ func Uint64ValueMap(src map[string]*uint64) map[string]uint64 { return dst } +// Float32 returns a pointer to of the float32 value passed in. +func Float32(v float32) *float32 { + return &v +} + +// Float32Value returns the value of the float32 pointer passed in or +// 0 if the pointer is nil. +func Float32Value(v *float32) float32 { + if v != nil { + return *v + } + + return 0 +} + +// Float32Slice converts a slice of float32 values into a slice of +// float32 pointers +func Float32Slice(src []float32) []*float32 { + dst := make([]*float32, len(src)) + + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + + return dst +} + +// Float32ValueSlice converts a slice of float32 pointers into a slice of +// float32 values +func Float32ValueSlice(src []*float32) []float32 { + dst := make([]float32, len(src)) + + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + + return dst +} + +// Float32Map converts a string map of float32 values into a string +// map of float32 pointers +func Float32Map(src map[string]float32) map[string]*float32 { + dst := make(map[string]*float32) + + for k, val := range src { + v := val + dst[k] = &v + } + + return dst +} + +// Float32ValueMap converts a string map of float32 pointers into a string +// map of float32 values +func Float32ValueMap(src map[string]*float32) map[string]float32 { + dst := make(map[string]float32) + + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + + return dst +} + // Float64 returns a pointer to of the float64 value passed in. func Float64(v float64) *float64 { return &v diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go index 70f4fb361..04160b89b 100644 --- a/vendor/github.com/go-openapi/swag/loading.go +++ b/vendor/github.com/go-openapi/swag/loading.go @@ -27,6 +27,15 @@ import ( // LoadHTTPTimeout the default timeout for load requests var LoadHTTPTimeout = 30 * time.Second +// LoadHTTPBasicAuthUsername the username to use when load requests require basic auth +var LoadHTTPBasicAuthUsername = "" + +// LoadHTTPBasicAuthPassword the password to use when load requests require basic auth +var LoadHTTPBasicAuthPassword = "" + +// LoadHTTPCustomHeaders an optional collection of custom HTTP headers for load requests +var LoadHTTPCustomHeaders = map[string]string{} + // LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in func LoadFromFileOrHTTP(path string) ([]byte, error) { return LoadStrategy(path, ioutil.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path) @@ -59,6 +68,15 @@ func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) { if err != nil { return nil, err } + + if LoadHTTPBasicAuthUsername != "" && LoadHTTPBasicAuthPassword != "" { + req.SetBasicAuth(LoadHTTPBasicAuthUsername, LoadHTTPBasicAuthPassword) + } + + for key, val := range LoadHTTPCustomHeaders { + req.Header.Set(key, val) + } + resp, err := client.Do(req) defer func() { if resp != nil { diff --git a/vendor/github.com/go-openapi/validate/go.mod b/vendor/github.com/go-openapi/validate/go.mod index 2d59ddbaf..76b705283 100644 --- a/vendor/github.com/go-openapi/validate/go.mod +++ b/vendor/github.com/go-openapi/validate/go.mod @@ -1,20 +1,21 @@ module github.com/go-openapi/validate +go 1.14 + require ( - github.com/go-openapi/analysis v0.19.5 - github.com/go-openapi/errors v0.19.2 + github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect + github.com/go-openapi/analysis v0.19.10 + github.com/go-openapi/errors v0.19.6 github.com/go-openapi/jsonpointer v0.19.3 - github.com/go-openapi/jsonreference v0.19.3 // indirect - github.com/go-openapi/loads v0.19.4 - github.com/go-openapi/runtime v0.19.4 - github.com/go-openapi/spec v0.19.3 - github.com/go-openapi/strfmt v0.19.3 - github.com/go-openapi/swag v0.19.5 - github.com/mailru/easyjson v0.7.0 // indirect - github.com/stretchr/testify v1.4.0 - github.com/vektah/gqlparser v1.1.2 - go.mongodb.org/mongo-driver v1.1.2 // indirect - gopkg.in/yaml.v2 v2.2.4 + github.com/go-openapi/loads v0.19.5 + github.com/go-openapi/runtime v0.19.15 + github.com/go-openapi/spec v0.19.8 + github.com/go-openapi/strfmt v0.19.5 + github.com/go-openapi/swag v0.19.9 + github.com/mitchellh/mapstructure v1.3.2 // indirect + github.com/stretchr/testify v1.6.1 + go.mongodb.org/mongo-driver v1.3.4 // indirect + golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect + gopkg.in/yaml.v2 v2.3.0 ) -go 1.13 diff --git a/vendor/github.com/go-openapi/validate/go.sum b/vendor/github.com/go-openapi/validate/go.sum index 0e9c75c1f..a52271927 100644 --- a/vendor/github.com/go-openapi/validate/go.sum +++ b/vendor/github.com/go-openapi/validate/go.sum @@ -1,156 +1,239 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1 h1:3oJU7J3FGFmyhn8KHjmVaZCN5hxTr7GxgRue+sxIXdQ= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2 h1:ophLETFestFZHk3ji7niPEL4d466QjW+0Tdg5VyDq7E= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6 h1:xZMThgv5SQ7SMbWtKFkCf9bBdvR2iEyw9k3zGZONuys= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0 h1:wCOBNscACI8L93tt5tvB2zOMkJ098XCw3fP0BY2ybDA= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2 h1:rf5ArTHmIJxyV5Oiks+Su0mUens1+AjpkPoWr5xFRcI= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.3 h1:jwIoahqCmaA5OBoc/B+1+Mu2L0Gr8xYQnbeyQEo/7b0= github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= -github.com/go-openapi/loads v0.19.4 h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/loads v0.19.5 h1:jZVYWawIQiA1NBnHla28ktg6hrcfTHsCE+3QLVRBIls= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0 h1:sU6pp4dSV2sGlNKKyHxZzi1m1kG4WnYtWcJ+HYbygjE= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15 h1:2GIefxs9Rx1vCDNghRtypRq+ig8KSLrjHbAYI/gCLCM= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0 h1:0Dn9qy1G9+UJfRU7TR8bmdGxb4uifB7HNrJjOnV0yPk= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/vektah/gqlparser v1.1.2 h1:ZsyLGn7/7jDNI+y4SEhI4yAxRChlv15pUHMjijT+e68= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1 h1:Sq1fR+0c58RME5EoqKdjkiQAmPjmfHlZOoRI6fTUOcs= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4 h1:zs/dKNwX0gYUtzwrN9lLiR15hCO0nDwQj5xXx+vjCdE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582 h1:p9xBe/w/OzkeYVKm234g55gMdD1nSIooTir5kV11kfA= -golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/github.com/go-openapi/validate/object_validator.go b/vendor/github.com/go-openapi/validate/object_validator.go index aea85b300..b413ab1fa 100644 --- a/vendor/github.com/go-openapi/validate/object_validator.go +++ b/vendor/github.com/go-openapi/validate/object_validator.go @@ -71,8 +71,8 @@ func (o *objectValidator) checkArrayMustHaveItems(res *Result, val map[string]in // with pure jsonschema draft 4, one may have arrays with undefined items (i.e. any type). if t, typeFound := val[jsonType]; typeFound { if tpe, ok := t.(string); ok && tpe == arrayType { - if _, itemsKeyFound := val[jsonItems]; !itemsKeyFound { - res.AddErrors(errors.Required(jsonItems, o.Path)) + if item, itemsKeyFound := val[jsonItems]; !itemsKeyFound { + res.AddErrors(errors.Required(jsonItems, o.Path, item)) } } } @@ -88,7 +88,7 @@ func (o *objectValidator) checkItemsMustBeTypeArray(res *Result, val map[string] } } else { // there is no type - res.AddErrors(errors.Required(jsonType, o.Path)) + res.AddErrors(errors.Required(jsonType, o.Path, t)) } } } @@ -227,8 +227,8 @@ func (o *objectValidator) Validate(data interface{}) *Result { // Check required properties if len(o.Required) > 0 { for _, k := range o.Required { - if _, ok := val[k]; !ok && !createdFromDefaults[k] { - res.AddErrors(errors.Required(o.Path+"."+k, o.In)) + if v, ok := val[k]; !ok && !createdFromDefaults[k] { + res.AddErrors(errors.Required(o.Path+"."+k, o.In, v)) continue } } diff --git a/vendor/github.com/go-openapi/validate/values.go b/vendor/github.com/go-openapi/validate/values.go index 3e644aea8..8dfe557e1 100644 --- a/vendor/github.com/go-openapi/validate/values.go +++ b/vendor/github.com/go-openapi/validate/values.go @@ -17,6 +17,7 @@ package validate import ( "fmt" "reflect" + "strings" "unicode/utf8" "github.com/go-openapi/errors" @@ -26,11 +27,17 @@ import ( // Enum validates if the data is a member of the enum func Enum(path, in string, data interface{}, enum interface{}) *errors.Validation { + return EnumCase(path, in, data, enum, true) +} + +// EnumCase validates if the data is a member of the enum and may respect case-sensitivity for strings +func EnumCase(path, in string, data interface{}, enum interface{}, caseSensitive bool) *errors.Validation { val := reflect.ValueOf(enum) if val.Kind() != reflect.Slice { return nil } + dataString := convertEnumCaseStringKind(data, caseSensitive) var values []interface{} for i := 0; i < val.Len(); i++ { ele := val.Index(i) @@ -39,6 +46,10 @@ func Enum(path, in string, data interface{}, enum interface{}) *errors.Validatio if reflect.DeepEqual(data, enumValue) { return nil } + enumString := convertEnumCaseStringKind(enumValue, caseSensitive) + if dataString != nil && enumString != nil && strings.EqualFold(*dataString, *enumString) { + return nil + } actualType := reflect.TypeOf(enumValue) if actualType == nil { // Safeguard. Frankly, I don't know how we may get a nil continue @@ -56,10 +67,25 @@ func Enum(path, in string, data interface{}, enum interface{}) *errors.Validatio return errors.EnumFail(path, in, data, values) } +// convertEnumCaseStringKind converts interface if it is kind of string and case insensitivity is set +func convertEnumCaseStringKind(value interface{}, caseSensitive bool) *string { + if caseSensitive { + return nil + } + + val := reflect.ValueOf(value) + if val.Kind() != reflect.String { + return nil + } + + str := fmt.Sprintf("%v", value) + return &str +} + // MinItems validates that there are at least n items in a slice func MinItems(path, in string, size, min int64) *errors.Validation { if size < min { - return errors.TooFewItems(path, in, min) + return errors.TooFewItems(path, in, min, size) } return nil } @@ -67,7 +93,7 @@ func MinItems(path, in string, size, min int64) *errors.Validation { // MaxItems validates that there are at most n items in a slice func MaxItems(path, in string, size, max int64) *errors.Validation { if size > max { - return errors.TooManyItems(path, in, max) + return errors.TooManyItems(path, in, max, size) } return nil } @@ -95,7 +121,7 @@ func UniqueItems(path, in string, data interface{}) *errors.Validation { func MinLength(path, in, data string, minLength int64) *errors.Validation { strLen := int64(utf8.RuneCount([]byte(data))) if strLen < minLength { - return errors.TooShort(path, in, minLength) + return errors.TooShort(path, in, minLength, data) } return nil } @@ -104,7 +130,7 @@ func MinLength(path, in, data string, minLength int64) *errors.Validation { func MaxLength(path, in, data string, maxLength int64) *errors.Validation { strLen := int64(utf8.RuneCount([]byte(data))) if strLen > maxLength { - return errors.TooLong(path, in, maxLength) + return errors.TooLong(path, in, maxLength, data) } return nil } @@ -114,17 +140,17 @@ func Required(path, in string, data interface{}) *errors.Validation { val := reflect.ValueOf(data) if val.IsValid() { if reflect.DeepEqual(reflect.Zero(val.Type()).Interface(), val.Interface()) { - return errors.Required(path, in) + return errors.Required(path, in, data) } return nil } - return errors.Required(path, in) + return errors.Required(path, in, data) } // RequiredString validates a string for requiredness func RequiredString(path, in, data string) *errors.Validation { if data == "" { - return errors.Required(path, in) + return errors.Required(path, in, data) } return nil } @@ -132,7 +158,7 @@ func RequiredString(path, in, data string) *errors.Validation { // RequiredNumber validates a number for requiredness func RequiredNumber(path, in string, data float64) *errors.Validation { if data == 0 { - return errors.Required(path, in) + return errors.Required(path, in, data) } return nil } @@ -141,10 +167,10 @@ func RequiredNumber(path, in string, data float64) *errors.Validation { func Pattern(path, in, data, pattern string) *errors.Validation { re, err := compileRegexp(pattern) if err != nil { - return errors.FailedPattern(path, in, fmt.Sprintf("%s, but pattern is invalid: %s", pattern, err.Error())) + return errors.FailedPattern(path, in, fmt.Sprintf("%s, but pattern is invalid: %s", pattern, err.Error()), data) } if !re.MatchString(data) { - return errors.FailedPattern(path, in, pattern) + return errors.FailedPattern(path, in, pattern, data) } return nil } @@ -152,7 +178,7 @@ func Pattern(path, in, data, pattern string) *errors.Validation { // MaximumInt validates if a number is smaller than a given maximum func MaximumInt(path, in string, data, max int64, exclusive bool) *errors.Validation { if (!exclusive && data > max) || (exclusive && data >= max) { - return errors.ExceedsMaximumInt(path, in, max, exclusive) + return errors.ExceedsMaximumInt(path, in, max, exclusive, data) } return nil } @@ -160,7 +186,7 @@ func MaximumInt(path, in string, data, max int64, exclusive bool) *errors.Valida // MaximumUint validates if a number is smaller than a given maximum func MaximumUint(path, in string, data, max uint64, exclusive bool) *errors.Validation { if (!exclusive && data > max) || (exclusive && data >= max) { - return errors.ExceedsMaximumUint(path, in, max, exclusive) + return errors.ExceedsMaximumUint(path, in, max, exclusive, data) } return nil } @@ -168,7 +194,7 @@ func MaximumUint(path, in string, data, max uint64, exclusive bool) *errors.Vali // Maximum validates if a number is smaller than a given maximum func Maximum(path, in string, data, max float64, exclusive bool) *errors.Validation { if (!exclusive && data > max) || (exclusive && data >= max) { - return errors.ExceedsMaximum(path, in, max, exclusive) + return errors.ExceedsMaximum(path, in, max, exclusive, data) } return nil } @@ -176,7 +202,7 @@ func Maximum(path, in string, data, max float64, exclusive bool) *errors.Validat // Minimum validates if a number is smaller than a given minimum func Minimum(path, in string, data, min float64, exclusive bool) *errors.Validation { if (!exclusive && data < min) || (exclusive && data <= min) { - return errors.ExceedsMinimum(path, in, min, exclusive) + return errors.ExceedsMinimum(path, in, min, exclusive, data) } return nil } @@ -184,7 +210,7 @@ func Minimum(path, in string, data, min float64, exclusive bool) *errors.Validat // MinimumInt validates if a number is smaller than a given minimum func MinimumInt(path, in string, data, min int64, exclusive bool) *errors.Validation { if (!exclusive && data < min) || (exclusive && data <= min) { - return errors.ExceedsMinimumInt(path, in, min, exclusive) + return errors.ExceedsMinimumInt(path, in, min, exclusive, data) } return nil } @@ -192,7 +218,7 @@ func MinimumInt(path, in string, data, min int64, exclusive bool) *errors.Valida // MinimumUint validates if a number is smaller than a given minimum func MinimumUint(path, in string, data, min uint64, exclusive bool) *errors.Validation { if (!exclusive && data < min) || (exclusive && data <= min) { - return errors.ExceedsMinimumUint(path, in, min, exclusive) + return errors.ExceedsMinimumUint(path, in, min, exclusive, data) } return nil } @@ -210,7 +236,7 @@ func MultipleOf(path, in string, data, factor float64) *errors.Validation { mult = data / factor } if !swag.IsFloat64AJSONInteger(mult) { - return errors.NotMultipleOf(path, in, factor) + return errors.NotMultipleOf(path, in, factor, data) } return nil } @@ -223,7 +249,7 @@ func MultipleOfInt(path, in string, data int64, factor int64) *errors.Validation } mult := data / factor if mult*factor != data { - return errors.NotMultipleOf(path, in, factor) + return errors.NotMultipleOf(path, in, factor, data) } return nil } @@ -232,7 +258,7 @@ func MultipleOfInt(path, in string, data int64, factor int64) *errors.Validation func MultipleOfUint(path, in string, data, factor uint64) *errors.Validation { mult := data / factor if mult*factor != data { - return errors.NotMultipleOf(path, in, factor) + return errors.NotMultipleOf(path, in, factor, data) } return nil } @@ -270,7 +296,7 @@ func MaximumNativeType(path, in string, val interface{}, max float64, exclusive case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: value := valueHelp.asUint64(val) if max < 0 { - return errors.ExceedsMaximum(path, in, max, exclusive) + return errors.ExceedsMaximum(path, in, max, exclusive, val) } return MaximumUint(path, in, value, uint64(max), exclusive) case reflect.Float32, reflect.Float64: diff --git a/vendor/github.com/mailru/easyjson/jwriter/writer.go b/vendor/github.com/mailru/easyjson/jwriter/writer.go index b9ed7ccaa..eb8547ccc 100644 --- a/vendor/github.com/mailru/easyjson/jwriter/writer.go +++ b/vendor/github.com/mailru/easyjson/jwriter/writer.go @@ -270,16 +270,25 @@ func (w *Writer) Bool(v bool) { const chars = "0123456789abcdef" -func isNotEscapedSingleChar(c byte, escapeHTML bool) bool { - // Note: might make sense to use a table if there are more chars to escape. With 4 chars - // it benchmarks the same. - if escapeHTML { - return c != '<' && c != '>' && c != '&' && c != '\\' && c != '"' && c >= 0x20 && c < utf8.RuneSelf - } else { - return c != '\\' && c != '"' && c >= 0x20 && c < utf8.RuneSelf +func getTable(falseValues ...int) [128]bool { + table := [128]bool{} + + for i := 0; i < 128; i++ { + table[i] = true + } + + for _, v := range falseValues { + table[v] = false } + + return table } +var ( + htmlEscapeTable = getTable(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, '"', '&', '<', '>', '\\') + htmlNoEscapeTable = getTable(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, '"', '\\') +) + func (w *Writer) String(s string) { w.Buffer.AppendByte('"') @@ -288,15 +297,23 @@ func (w *Writer) String(s string) { p := 0 // last non-escape symbol + var escapeTable [128]bool + if w.NoEscapeHTML { + escapeTable = htmlNoEscapeTable + } else { + escapeTable = htmlEscapeTable + } + for i := 0; i < len(s); { c := s[i] - if isNotEscapedSingleChar(c, !w.NoEscapeHTML) { - // single-width character, no escaping is required - i++ - continue - } else if c < utf8.RuneSelf { - // single-with character, need to escape + if c < utf8.RuneSelf { + if escapeTable[c] { + // single-width character, no escaping is required + i++ + continue + } + w.Buffer.AppendString(s[p:i]) switch c { case '\t': diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml index 1689c7d73..5e31a95a8 100644 --- a/vendor/github.com/mitchellh/mapstructure/.travis.yml +++ b/vendor/github.com/mitchellh/mapstructure/.travis.yml @@ -1,8 +1,9 @@ language: go go: - - "1.11.x" + - "1.14.x" - tip script: - go test + - go test -bench . -benchmem diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md index 3b3cb723f..3378f7e66 100644 --- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md +++ b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md @@ -1,3 +1,39 @@ +## 1.3.2 + +* Decode into interface type with a struct value is supported [GH-187] + +## 1.3.1 + +* Squash should only squash embedded structs. [GH-194] + +## 1.3.0 + +* Added `",omitempty"` support. This will ignore zero values in the source + structure when encoding. [GH-145] + +## 1.2.3 + +* Fix duplicate entries in Keys list with pointer values. [GH-185] + +## 1.2.2 + +* Do not add unsettable (unexported) values to the unused metadata key + or "remain" value. [GH-150] + +## 1.2.1 + +* Go modules checksum mismatch fix + +## 1.2.0 + +* Added support to capture unused values in a field using the `",remain"` value + in the mapstructure tag. There is an example to showcase usage. +* Added `DecoderConfig` option to always squash embedded structs +* `json.Number` can decode into `uint` types +* Empty slices are preserved and not replaced with nil slices +* Fix panic that can occur in when decoding a map into a nil slice of structs +* Improved package documentation for godoc + ## 1.1.2 * Fix error when decode hook decodes interface implementation into interface diff --git a/vendor/github.com/mitchellh/mapstructure/go.mod b/vendor/github.com/mitchellh/mapstructure/go.mod index d2a712562..a03ae9730 100644 --- a/vendor/github.com/mitchellh/mapstructure/go.mod +++ b/vendor/github.com/mitchellh/mapstructure/go.mod @@ -1 +1,3 @@ module github.com/mitchellh/mapstructure + +go 1.14 diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go index 256ee63fb..b384d9d92 100644 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go @@ -1,10 +1,150 @@ -// Package mapstructure exposes functionality to convert an arbitrary -// map[string]interface{} into a native Go structure. +// Package mapstructure exposes functionality to convert one arbitrary +// Go type into another, typically to convert a map[string]interface{} +// into a native Go structure. // // The Go structure can be arbitrarily complex, containing slices, // other structs, etc. and the decoder will properly decode nested // maps and so on into the proper structures in the native Go struct. // See the examples to see what the decoder is capable of. +// +// The simplest function to start with is Decode. +// +// Field Tags +// +// When decoding to a struct, mapstructure will use the field name by +// default to perform the mapping. For example, if a struct has a field +// "Username" then mapstructure will look for a key in the source value +// of "username" (case insensitive). +// +// type User struct { +// Username string +// } +// +// You can change the behavior of mapstructure by using struct tags. +// The default struct tag that mapstructure looks for is "mapstructure" +// but you can customize it using DecoderConfig. +// +// Renaming Fields +// +// To rename the key that mapstructure looks for, use the "mapstructure" +// tag and set a value directly. For example, to change the "username" example +// above to "user": +// +// type User struct { +// Username string `mapstructure:"user"` +// } +// +// Embedded Structs and Squashing +// +// Embedded structs are treated as if they're another field with that name. +// By default, the two structs below are equivalent when decoding with +// mapstructure: +// +// type Person struct { +// Name string +// } +// +// type Friend struct { +// Person +// } +// +// type Friend struct { +// Person Person +// } +// +// This would require an input that looks like below: +// +// map[string]interface{}{ +// "person": map[string]interface{}{"name": "alice"}, +// } +// +// If your "person" value is NOT nested, then you can append ",squash" to +// your tag value and mapstructure will treat it as if the embedded struct +// were part of the struct directly. Example: +// +// type Friend struct { +// Person `mapstructure:",squash"` +// } +// +// Now the following input would be accepted: +// +// map[string]interface{}{ +// "name": "alice", +// } +// +// DecoderConfig has a field that changes the behavior of mapstructure +// to always squash embedded structs. +// +// Remainder Values +// +// If there are any unmapped keys in the source value, mapstructure by +// default will silently ignore them. You can error by setting ErrorUnused +// in DecoderConfig. If you're using Metadata you can also maintain a slice +// of the unused keys. +// +// You can also use the ",remain" suffix on your tag to collect all unused +// values in a map. The field with this tag MUST be a map type and should +// probably be a "map[string]interface{}" or "map[interface{}]interface{}". +// See example below: +// +// type Friend struct { +// Name string +// Other map[string]interface{} `mapstructure:",remain"` +// } +// +// Given the input below, Other would be populated with the other +// values that weren't used (everything but "name"): +// +// map[string]interface{}{ +// "name": "bob", +// "address": "123 Maple St.", +// } +// +// Omit Empty Values +// +// When decoding from a struct to any other value, you may use the +// ",omitempty" suffix on your tag to omit that value if it equates to +// the zero value. The zero value of all types is specified in the Go +// specification. +// +// For example, the zero type of a numeric type is zero ("0"). If the struct +// field value is zero and a numeric type, the field is empty, and it won't +// be encoded into the destination type. +// +// type Source { +// Age int `mapstructure:",omitempty"` +// } +// +// Unexported fields +// +// Since unexported (private) struct fields cannot be set outside the package +// where they are defined, the decoder will simply skip them. +// +// For this output type definition: +// +// type Exported struct { +// private string // this unexported field will be skipped +// Public string +// } +// +// Using this map as input: +// +// map[string]interface{}{ +// "private": "I will be ignored", +// "Public": "I made it through!", +// } +// +// The following struct will be decoded: +// +// type Exported struct { +// private: "" // field is left with an empty string (zero value) +// Public: "I made it through!" +// } +// +// Other Configuration +// +// mapstructure is highly configurable. See the DecoderConfig struct +// for other features and options that are supported. package mapstructure import ( @@ -80,6 +220,14 @@ type DecoderConfig struct { // WeaklyTypedInput bool + // Squash will squash embedded structs. A squash tag may also be + // added to an individual struct field using a tag. For example: + // + // type Parent struct { + // Child `mapstructure:",squash"` + // } + Squash bool + // Metadata is the struct that will contain extra metadata about // the decoding. If this is nil, then no metadata will be tracked. Metadata *Metadata @@ -271,6 +419,7 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e var err error outputKind := getKind(outVal) + addMetaKey := true switch outputKind { case reflect.Bool: err = d.decodeBool(name, input, outVal) @@ -289,7 +438,7 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e case reflect.Map: err = d.decodeMap(name, input, outVal) case reflect.Ptr: - err = d.decodePtr(name, input, outVal) + addMetaKey, err = d.decodePtr(name, input, outVal) case reflect.Slice: err = d.decodeSlice(name, input, outVal) case reflect.Array: @@ -303,7 +452,7 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e // If we reached here, then we successfully decoded SOMETHING, so // mark the key as used if we're tracking metainput. - if d.config.Metadata != nil && name != "" { + if addMetaKey && d.config.Metadata != nil && name != "" { d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) } @@ -314,7 +463,34 @@ func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) e // value to "data" of that type. func (d *Decoder) decodeBasic(name string, data interface{}, val reflect.Value) error { if val.IsValid() && val.Elem().IsValid() { - return d.decode(name, data, val.Elem()) + elem := val.Elem() + + // If we can't address this element, then its not writable. Instead, + // we make a copy of the value (which is a pointer and therefore + // writable), decode into that, and replace the whole value. + copied := false + if !elem.CanAddr() { + copied = true + + // Make *T + copy := reflect.New(elem.Type()) + + // *T = elem + copy.Elem().Set(elem) + + // Set elem so we decode into it + elem = copy + } + + // Decode. If we have an error then return. We also return right + // away if we're not a copy because that means we decoded directly. + if err := d.decode(name, data, elem); err != nil || !copied { + return err + } + + // If we're a copy, we need to set te final result + val.Set(elem.Elem()) + return nil } dataVal := reflect.ValueOf(data) @@ -438,6 +614,7 @@ func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) er func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error { dataVal := reflect.Indirect(reflect.ValueOf(data)) dataKind := getKind(dataVal) + dataType := dataVal.Type() switch { case dataKind == reflect.Int: @@ -469,6 +646,18 @@ func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) e } else { return fmt.Errorf("cannot parse '%s' as uint: %s", name, err) } + case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": + jn := data.(json.Number) + i, err := jn.Int64() + if err != nil { + return fmt.Errorf( + "error decoding json.Number into %s: %s", name, err) + } + if i < 0 && !d.config.WeaklyTypedInput { + return fmt.Errorf("cannot parse '%s', %d overflows uint", + name, i) + } + val.SetUint(uint64(i)) default: return fmt.Errorf( "'%s' expected type '%s', got unconvertible type '%s'", @@ -678,27 +867,31 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re } tagValue := f.Tag.Get(d.config.TagName) - tagParts := strings.Split(tagValue, ",") + keyName := f.Name + // If Squash is set in the config, we squash the field down. + squash := d.config.Squash && v.Kind() == reflect.Struct && f.Anonymous // Determine the name of the key in the map - keyName := f.Name - if tagParts[0] != "" { - if tagParts[0] == "-" { + if index := strings.Index(tagValue, ","); index != -1 { + if tagValue[:index] == "-" { + continue + } + // If "omitempty" is specified in the tag, it ignores empty values. + if strings.Index(tagValue[index+1:], "omitempty") != -1 && isEmptyValue(v) { continue } - keyName = tagParts[0] - } - // If "squash" is specified in the tag, we squash the field down. - squash := false - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break + // If "squash" is specified in the tag, we squash the field down. + squash = !squash && strings.Index(tagValue[index+1:], "squash") != -1 + if squash && v.Kind() != reflect.Struct { + return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) } - } - if squash && v.Kind() != reflect.Struct { - return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) + keyName = tagValue[:index] + } else if len(tagValue) > 0 { + if tagValue == "-" { + continue + } + keyName = tagValue } switch v.Kind() { @@ -738,7 +931,7 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re return nil } -func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) error { +func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) (bool, error) { // If the input data is nil, then we want to just set the output // pointer to be nil as well. isNil := data == nil @@ -759,7 +952,7 @@ func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) er val.Set(nilValue) } - return nil + return true, nil } // Create an element of the concrete (non pointer) type and decode @@ -773,16 +966,16 @@ func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) er } if err := d.decode(name, data, reflect.Indirect(realVal)); err != nil { - return err + return false, err } val.Set(realVal) } else { if err := d.decode(name, data, reflect.Indirect(val)); err != nil { - return err + return false, err } } - return nil + return false, nil } func (d *Decoder) decodeFunc(name string, data interface{}, val reflect.Value) error { @@ -805,8 +998,8 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) valElemType := valType.Elem() sliceType := reflect.SliceOf(valElemType) - valSlice := val - if valSlice.IsNil() || d.config.ZeroFields { + // If we have a non array/slice type then we first attempt to convert. + if dataValKind != reflect.Array && dataValKind != reflect.Slice { if d.config.WeaklyTypedInput { switch { // Slice and array we use the normal logic @@ -833,18 +1026,17 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) } } - // Check input type - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - - } + return fmt.Errorf( + "'%s': source data must be an array or slice, got %s", name, dataValKind) + } - // If the input value is empty, then don't allocate since non-nil != nil - if dataVal.Len() == 0 { - return nil - } + // If the input value is nil, then don't allocate since empty != nil + if dataVal.IsNil() { + return nil + } + valSlice := val + if valSlice.IsNil() || d.config.ZeroFields { // Make a new slice to hold our result, same size as the original data. valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len()) } @@ -1005,6 +1197,11 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e field reflect.StructField val reflect.Value } + + // remainField is set to a valid field set with the "remain" tag if + // we are keeping track of remaining values. + var remainField *field + fields := []field{} for len(structs) > 0 { structVal := structs[0] @@ -1017,13 +1214,21 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e fieldKind := fieldType.Type.Kind() // If "squash" is specified in the tag, we squash the field down. - squash := false + squash := d.config.Squash && fieldKind == reflect.Struct && fieldType.Anonymous + remain := false + + // We always parse the tags cause we're looking for other tags too tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") for _, tag := range tagParts[1:] { if tag == "squash" { squash = true break } + + if tag == "remain" { + remain = true + break + } } if squash { @@ -1036,8 +1241,13 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e continue } - // Normal struct field, store it away - fields = append(fields, field{fieldType, structVal.Field(i)}) + // Build our field + if remain { + remainField = &field{fieldType, structVal.Field(i)} + } else { + // Normal struct field, store it away + fields = append(fields, field{fieldType, structVal.Field(i)}) + } } } @@ -1078,9 +1288,6 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e } } - // Delete the key we're using from the unused map so we stop tracking - delete(dataValKeysUnused, rawMapKey.Interface()) - if !fieldValue.IsValid() { // This should never happen panic("field is not valid") @@ -1092,6 +1299,9 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e continue } + // Delete the key we're using from the unused map so we stop tracking + delete(dataValKeysUnused, rawMapKey.Interface()) + // If the name is empty string, then we're at the root, and we // don't dot-join the fields. if name != "" { @@ -1103,6 +1313,25 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e } } + // If we have a "remain"-tagged field and we have unused keys then + // we put the unused keys directly into the remain field. + if remainField != nil && len(dataValKeysUnused) > 0 { + // Build a map of only the unused values + remain := map[interface{}]interface{}{} + for key := range dataValKeysUnused { + remain[key] = dataVal.MapIndex(reflect.ValueOf(key)).Interface() + } + + // Decode it as-if we were just decoding this map onto our map. + if err := d.decodeMap(name, remain, remainField.val); err != nil { + errors = appendErrors(errors, err) + } + + // Set the map to nil so we have none so that the next check will + // not error (ErrorUnused) + dataValKeysUnused = nil + } + if d.config.ErrorUnused && len(dataValKeysUnused) > 0 { keys := make([]string, 0, len(dataValKeysUnused)) for rawKey := range dataValKeysUnused { @@ -1133,6 +1362,24 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e return nil } +func isEmptyValue(v reflect.Value) bool { + switch getKind(v) { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + } + return false +} + func getKind(val reflect.Value) reflect.Kind { kind := val.Kind() diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_list_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_list_parameters.go deleted file mode 100644 index 1ad7ee193..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_list_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package circuits - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewCircuitsChoicesListParams creates a new CircuitsChoicesListParams object -// with the default values initialized. -func NewCircuitsChoicesListParams() *CircuitsChoicesListParams { - - return &CircuitsChoicesListParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewCircuitsChoicesListParamsWithTimeout creates a new CircuitsChoicesListParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewCircuitsChoicesListParamsWithTimeout(timeout time.Duration) *CircuitsChoicesListParams { - - return &CircuitsChoicesListParams{ - - timeout: timeout, - } -} - -// NewCircuitsChoicesListParamsWithContext creates a new CircuitsChoicesListParams object -// with the default values initialized, and the ability to set a context for a request -func NewCircuitsChoicesListParamsWithContext(ctx context.Context) *CircuitsChoicesListParams { - - return &CircuitsChoicesListParams{ - - Context: ctx, - } -} - -// NewCircuitsChoicesListParamsWithHTTPClient creates a new CircuitsChoicesListParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewCircuitsChoicesListParamsWithHTTPClient(client *http.Client) *CircuitsChoicesListParams { - - return &CircuitsChoicesListParams{ - HTTPClient: client, - } -} - -/*CircuitsChoicesListParams contains all the parameters to send to the API endpoint -for the circuits choices list operation typically these are written to a http.Request -*/ -type CircuitsChoicesListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the circuits choices list params -func (o *CircuitsChoicesListParams) WithTimeout(timeout time.Duration) *CircuitsChoicesListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the circuits choices list params -func (o *CircuitsChoicesListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the circuits choices list params -func (o *CircuitsChoicesListParams) WithContext(ctx context.Context) *CircuitsChoicesListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the circuits choices list params -func (o *CircuitsChoicesListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the circuits choices list params -func (o *CircuitsChoicesListParams) WithHTTPClient(client *http.Client) *CircuitsChoicesListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the circuits choices list params -func (o *CircuitsChoicesListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *CircuitsChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_read_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_read_parameters.go deleted file mode 100644 index 7f42615fc..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_read_parameters.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package circuits - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewCircuitsChoicesReadParams creates a new CircuitsChoicesReadParams object -// with the default values initialized. -func NewCircuitsChoicesReadParams() *CircuitsChoicesReadParams { - var () - return &CircuitsChoicesReadParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewCircuitsChoicesReadParamsWithTimeout creates a new CircuitsChoicesReadParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewCircuitsChoicesReadParamsWithTimeout(timeout time.Duration) *CircuitsChoicesReadParams { - var () - return &CircuitsChoicesReadParams{ - - timeout: timeout, - } -} - -// NewCircuitsChoicesReadParamsWithContext creates a new CircuitsChoicesReadParams object -// with the default values initialized, and the ability to set a context for a request -func NewCircuitsChoicesReadParamsWithContext(ctx context.Context) *CircuitsChoicesReadParams { - var () - return &CircuitsChoicesReadParams{ - - Context: ctx, - } -} - -// NewCircuitsChoicesReadParamsWithHTTPClient creates a new CircuitsChoicesReadParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewCircuitsChoicesReadParamsWithHTTPClient(client *http.Client) *CircuitsChoicesReadParams { - var () - return &CircuitsChoicesReadParams{ - HTTPClient: client, - } -} - -/*CircuitsChoicesReadParams contains all the parameters to send to the API endpoint -for the circuits choices read operation typically these are written to a http.Request -*/ -type CircuitsChoicesReadParams struct { - - /*ID*/ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the circuits choices read params -func (o *CircuitsChoicesReadParams) WithTimeout(timeout time.Duration) *CircuitsChoicesReadParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the circuits choices read params -func (o *CircuitsChoicesReadParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the circuits choices read params -func (o *CircuitsChoicesReadParams) WithContext(ctx context.Context) *CircuitsChoicesReadParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the circuits choices read params -func (o *CircuitsChoicesReadParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the circuits choices read params -func (o *CircuitsChoicesReadParams) WithHTTPClient(client *http.Client) *CircuitsChoicesReadParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the circuits choices read params -func (o *CircuitsChoicesReadParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the circuits choices read params -func (o *CircuitsChoicesReadParams) WithID(id string) *CircuitsChoicesReadParams { - o.SetID(id) - return o -} - -// SetID adds the id to the circuits choices read params -func (o *CircuitsChoicesReadParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *CircuitsChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_read_responses.go deleted file mode 100644 index 42070ec02..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_read_responses.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package circuits - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" -) - -// CircuitsChoicesReadReader is a Reader for the CircuitsChoicesRead structure. -type CircuitsChoicesReadReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CircuitsChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCircuitsChoicesReadOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewCircuitsChoicesReadOK creates a CircuitsChoicesReadOK with default headers values -func NewCircuitsChoicesReadOK() *CircuitsChoicesReadOK { - return &CircuitsChoicesReadOK{} -} - -/*CircuitsChoicesReadOK handles this case with default header values. - -CircuitsChoicesReadOK circuits choices read o k -*/ -type CircuitsChoicesReadOK struct { -} - -func (o *CircuitsChoicesReadOK) Error() string { - return fmt.Sprintf("[GET /circuits/_choices/{id}/][%d] circuitsChoicesReadOK ", 200) -} - -func (o *CircuitsChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_responses.go index dac947c34..4b40aa8e6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_create_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitTerminationsCreateReader) ReadResponse(response runtime. return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitTerminationsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitTerminationsCreateCreated) readResponse(response runtime return nil } + +// NewCircuitsCircuitTerminationsCreateDefault creates a CircuitsCircuitTerminationsCreateDefault with default headers values +func NewCircuitsCircuitTerminationsCreateDefault(code int) *CircuitsCircuitTerminationsCreateDefault { + return &CircuitsCircuitTerminationsCreateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitTerminationsCreateDefault handles this case with default header values. + +CircuitsCircuitTerminationsCreateDefault circuits circuit terminations create default +*/ +type CircuitsCircuitTerminationsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuit terminations create default response +func (o *CircuitsCircuitTerminationsCreateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitTerminationsCreateDefault) Error() string { + return fmt.Sprintf("[POST /circuits/circuit-terminations/][%d] circuits_circuit-terminations_create default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitTerminationsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitTerminationsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go index d429e23e3..11b3bedea 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_delete_responses.go @@ -43,7 +43,7 @@ func (o *CircuitsCircuitTerminationsDeleteReader) ReadResponse(response runtime. return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_responses.go index 7994169ab..c1714bbd8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_list_responses.go @@ -50,7 +50,7 @@ func (o *CircuitsCircuitTerminationsListReader) ReadResponse(response runtime.Cl return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go index 3226b1d48..652c8627f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitTerminationsPartialUpdateReader) ReadResponse(response r return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitTerminationsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitTerminationsPartialUpdateOK) readResponse(response runti return nil } + +// NewCircuitsCircuitTerminationsPartialUpdateDefault creates a CircuitsCircuitTerminationsPartialUpdateDefault with default headers values +func NewCircuitsCircuitTerminationsPartialUpdateDefault(code int) *CircuitsCircuitTerminationsPartialUpdateDefault { + return &CircuitsCircuitTerminationsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitTerminationsPartialUpdateDefault handles this case with default header values. + +CircuitsCircuitTerminationsPartialUpdateDefault circuits circuit terminations partial update default +*/ +type CircuitsCircuitTerminationsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuit terminations partial update default response +func (o *CircuitsCircuitTerminationsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitTerminationsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /circuits/circuit-terminations/{id}/][%d] circuits_circuit-terminations_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitTerminationsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitTerminationsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_responses.go index 107633faf..37dde8be1 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_read_responses.go @@ -46,7 +46,7 @@ func (o *CircuitsCircuitTerminationsReadReader) ReadResponse(response runtime.Cl return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_responses.go index f71e5618a..7ed823f28 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_terminations_update_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitTerminationsUpdateReader) ReadResponse(response runtime. return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitTerminationsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitTerminationsUpdateOK) readResponse(response runtime.Clie return nil } + +// NewCircuitsCircuitTerminationsUpdateDefault creates a CircuitsCircuitTerminationsUpdateDefault with default headers values +func NewCircuitsCircuitTerminationsUpdateDefault(code int) *CircuitsCircuitTerminationsUpdateDefault { + return &CircuitsCircuitTerminationsUpdateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitTerminationsUpdateDefault handles this case with default header values. + +CircuitsCircuitTerminationsUpdateDefault circuits circuit terminations update default +*/ +type CircuitsCircuitTerminationsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuit terminations update default response +func (o *CircuitsCircuitTerminationsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitTerminationsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /circuits/circuit-terminations/{id}/][%d] circuits_circuit-terminations_update default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitTerminationsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitTerminationsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_create_responses.go index 3519303e7..37e8a4d6b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_create_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitTypesCreateReader) ReadResponse(response runtime.ClientR return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitTypesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitTypesCreateCreated) readResponse(response runtime.Client return nil } + +// NewCircuitsCircuitTypesCreateDefault creates a CircuitsCircuitTypesCreateDefault with default headers values +func NewCircuitsCircuitTypesCreateDefault(code int) *CircuitsCircuitTypesCreateDefault { + return &CircuitsCircuitTypesCreateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitTypesCreateDefault handles this case with default header values. + +CircuitsCircuitTypesCreateDefault circuits circuit types create default +*/ +type CircuitsCircuitTypesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuit types create default response +func (o *CircuitsCircuitTypesCreateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitTypesCreateDefault) Error() string { + return fmt.Sprintf("[POST /circuits/circuit-types/][%d] circuits_circuit-types_create default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitTypesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitTypesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_responses.go index f3f604de9..1525130f0 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_delete_responses.go @@ -43,7 +43,7 @@ func (o *CircuitsCircuitTypesDeleteReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_list_responses.go index e1ae03495..392e32710 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_list_responses.go @@ -50,7 +50,7 @@ func (o *CircuitsCircuitTypesListReader) ReadResponse(response runtime.ClientRes return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go index e6025787d..1a6c85e72 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitTypesPartialUpdateReader) ReadResponse(response runtime. return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitTypesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitTypesPartialUpdateOK) readResponse(response runtime.Clie return nil } + +// NewCircuitsCircuitTypesPartialUpdateDefault creates a CircuitsCircuitTypesPartialUpdateDefault with default headers values +func NewCircuitsCircuitTypesPartialUpdateDefault(code int) *CircuitsCircuitTypesPartialUpdateDefault { + return &CircuitsCircuitTypesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitTypesPartialUpdateDefault handles this case with default header values. + +CircuitsCircuitTypesPartialUpdateDefault circuits circuit types partial update default +*/ +type CircuitsCircuitTypesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuit types partial update default response +func (o *CircuitsCircuitTypesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitTypesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /circuits/circuit-types/{id}/][%d] circuits_circuit-types_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitTypesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitTypesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_read_responses.go index 9ca322ef0..e5f55d888 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_read_responses.go @@ -46,7 +46,7 @@ func (o *CircuitsCircuitTypesReadReader) ReadResponse(response runtime.ClientRes return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_update_responses.go index 72ee1aef7..d6fcd5014 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuit_types_update_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitTypesUpdateReader) ReadResponse(response runtime.ClientR return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitTypesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitTypesUpdateOK) readResponse(response runtime.ClientRespo return nil } + +// NewCircuitsCircuitTypesUpdateDefault creates a CircuitsCircuitTypesUpdateDefault with default headers values +func NewCircuitsCircuitTypesUpdateDefault(code int) *CircuitsCircuitTypesUpdateDefault { + return &CircuitsCircuitTypesUpdateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitTypesUpdateDefault handles this case with default header values. + +CircuitsCircuitTypesUpdateDefault circuits circuit types update default +*/ +type CircuitsCircuitTypesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuit types update default response +func (o *CircuitsCircuitTypesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitTypesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /circuits/circuit-types/{id}/][%d] circuits_circuit-types_update default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitTypesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitTypesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_create_responses.go index 4d546d40f..1ed14d12e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_create_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitsCreateReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitsCreateCreated) readResponse(response runtime.ClientResp return nil } + +// NewCircuitsCircuitsCreateDefault creates a CircuitsCircuitsCreateDefault with default headers values +func NewCircuitsCircuitsCreateDefault(code int) *CircuitsCircuitsCreateDefault { + return &CircuitsCircuitsCreateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitsCreateDefault handles this case with default header values. + +CircuitsCircuitsCreateDefault circuits circuits create default +*/ +type CircuitsCircuitsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuits create default response +func (o *CircuitsCircuitsCreateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitsCreateDefault) Error() string { + return fmt.Sprintf("[POST /circuits/circuits/][%d] circuits_circuits_create default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_delete_responses.go index 265566773..c6ecd6570 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_delete_responses.go @@ -43,7 +43,7 @@ func (o *CircuitsCircuitsDeleteReader) ReadResponse(response runtime.ClientRespo return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_list_responses.go index 9dcd6d2a1..2d832819a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_list_responses.go @@ -50,7 +50,7 @@ func (o *CircuitsCircuitsListReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_responses.go index 29932075c..4947698aa 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitsPartialUpdateReader) ReadResponse(response runtime.Clie return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitsPartialUpdateOK) readResponse(response runtime.ClientRe return nil } + +// NewCircuitsCircuitsPartialUpdateDefault creates a CircuitsCircuitsPartialUpdateDefault with default headers values +func NewCircuitsCircuitsPartialUpdateDefault(code int) *CircuitsCircuitsPartialUpdateDefault { + return &CircuitsCircuitsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitsPartialUpdateDefault handles this case with default header values. + +CircuitsCircuitsPartialUpdateDefault circuits circuits partial update default +*/ +type CircuitsCircuitsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuits partial update default response +func (o *CircuitsCircuitsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /circuits/circuits/{id}/][%d] circuits_circuits_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_read_responses.go index 4c31ab88b..3851dce61 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_read_responses.go @@ -46,7 +46,7 @@ func (o *CircuitsCircuitsReadReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go index 05ea01771..14910df65 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_circuits_update_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsCircuitsUpdateReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsCircuitsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsCircuitsUpdateOK) readResponse(response runtime.ClientResponse, return nil } + +// NewCircuitsCircuitsUpdateDefault creates a CircuitsCircuitsUpdateDefault with default headers values +func NewCircuitsCircuitsUpdateDefault(code int) *CircuitsCircuitsUpdateDefault { + return &CircuitsCircuitsUpdateDefault{ + _statusCode: code, + } +} + +/*CircuitsCircuitsUpdateDefault handles this case with default header values. + +CircuitsCircuitsUpdateDefault circuits circuits update default +*/ +type CircuitsCircuitsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits circuits update default response +func (o *CircuitsCircuitsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsCircuitsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /circuits/circuits/{id}/][%d] circuits_circuits_update default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsCircuitsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsCircuitsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_client.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_client.go index 86205ce2f..8e8d9e137 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_client.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_client.go @@ -125,9 +125,8 @@ func (a *Client) CircuitsCircuitTerminationsCreate(params *CircuitsCircuitTermin return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuit-terminations_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitTerminationsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -166,7 +165,7 @@ func (a *Client) CircuitsCircuitTerminationsDelete(params *CircuitsCircuitTermin } /* - CircuitsCircuitTerminationsList Call to super to allow for caching + CircuitsCircuitTerminationsList circuits circuit terminations list API */ func (a *Client) CircuitsCircuitTerminationsList(params *CircuitsCircuitTerminationsListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsListOK, error) { // TODO: Validate the params before sending @@ -230,13 +229,12 @@ func (a *Client) CircuitsCircuitTerminationsPartialUpdate(params *CircuitsCircui return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuit-terminations_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitTerminationsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - CircuitsCircuitTerminationsRead Call to super to allow for caching + CircuitsCircuitTerminationsRead circuits circuit terminations read API */ func (a *Client) CircuitsCircuitTerminationsRead(params *CircuitsCircuitTerminationsReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTerminationsReadOK, error) { // TODO: Validate the params before sending @@ -300,9 +298,8 @@ func (a *Client) CircuitsCircuitTerminationsUpdate(params *CircuitsCircuitTermin return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuit-terminations_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitTerminationsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -335,9 +332,8 @@ func (a *Client) CircuitsCircuitTypesCreate(params *CircuitsCircuitTypesCreatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuit-types_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitTypesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -376,7 +372,7 @@ func (a *Client) CircuitsCircuitTypesDelete(params *CircuitsCircuitTypesDeletePa } /* - CircuitsCircuitTypesList Call to super to allow for caching + CircuitsCircuitTypesList circuits circuit types list API */ func (a *Client) CircuitsCircuitTypesList(params *CircuitsCircuitTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesListOK, error) { // TODO: Validate the params before sending @@ -440,13 +436,12 @@ func (a *Client) CircuitsCircuitTypesPartialUpdate(params *CircuitsCircuitTypesP return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuit-types_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitTypesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - CircuitsCircuitTypesRead Call to super to allow for caching + CircuitsCircuitTypesRead circuits circuit types read API */ func (a *Client) CircuitsCircuitTypesRead(params *CircuitsCircuitTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitTypesReadOK, error) { // TODO: Validate the params before sending @@ -510,9 +505,8 @@ func (a *Client) CircuitsCircuitTypesUpdate(params *CircuitsCircuitTypesUpdatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuit-types_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitTypesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -545,9 +539,8 @@ func (a *Client) CircuitsCircuitsCreate(params *CircuitsCircuitsCreateParams, au return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuits_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -586,7 +579,7 @@ func (a *Client) CircuitsCircuitsDelete(params *CircuitsCircuitsDeleteParams, au } /* - CircuitsCircuitsList Call to super to allow for caching + CircuitsCircuitsList circuits circuits list API */ func (a *Client) CircuitsCircuitsList(params *CircuitsCircuitsListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsListOK, error) { // TODO: Validate the params before sending @@ -650,13 +643,12 @@ func (a *Client) CircuitsCircuitsPartialUpdate(params *CircuitsCircuitsPartialUp return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuits_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - CircuitsCircuitsRead Call to super to allow for caching + CircuitsCircuitsRead circuits circuits read API */ func (a *Client) CircuitsCircuitsRead(params *CircuitsCircuitsReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsCircuitsReadOK, error) { // TODO: Validate the params before sending @@ -720,9 +712,8 @@ func (a *Client) CircuitsCircuitsUpdate(params *CircuitsCircuitsUpdateParams, au return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_circuits_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsCircuitsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -755,9 +746,8 @@ func (a *Client) CircuitsProvidersCreate(params *CircuitsProvidersCreateParams, return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_providers_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsProvidersCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -831,7 +821,7 @@ func (a *Client) CircuitsProvidersGraphs(params *CircuitsProvidersGraphsParams, } /* - CircuitsProvidersList Call to super to allow for caching + CircuitsProvidersList circuits providers list API */ func (a *Client) CircuitsProvidersList(params *CircuitsProvidersListParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersListOK, error) { // TODO: Validate the params before sending @@ -895,13 +885,12 @@ func (a *Client) CircuitsProvidersPartialUpdate(params *CircuitsProvidersPartial return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_providers_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsProvidersPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - CircuitsProvidersRead Call to super to allow for caching + CircuitsProvidersRead circuits providers read API */ func (a *Client) CircuitsProvidersRead(params *CircuitsProvidersReadParams, authInfo runtime.ClientAuthInfoWriter) (*CircuitsProvidersReadOK, error) { // TODO: Validate the params before sending @@ -965,9 +954,8 @@ func (a *Client) CircuitsProvidersUpdate(params *CircuitsProvidersUpdateParams, return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for circuits_providers_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*CircuitsProvidersUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_create_responses.go index 6c8e34f5a..b658a6c3e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_create_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsProvidersCreateReader) ReadResponse(response runtime.ClientResp return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsProvidersCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsProvidersCreateCreated) readResponse(response runtime.ClientRes return nil } + +// NewCircuitsProvidersCreateDefault creates a CircuitsProvidersCreateDefault with default headers values +func NewCircuitsProvidersCreateDefault(code int) *CircuitsProvidersCreateDefault { + return &CircuitsProvidersCreateDefault{ + _statusCode: code, + } +} + +/*CircuitsProvidersCreateDefault handles this case with default header values. + +CircuitsProvidersCreateDefault circuits providers create default +*/ +type CircuitsProvidersCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits providers create default response +func (o *CircuitsProvidersCreateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsProvidersCreateDefault) Error() string { + return fmt.Sprintf("[POST /circuits/providers/][%d] circuits_providers_create default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsProvidersCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsProvidersCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_delete_responses.go index f9ea15203..230c1953b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_delete_responses.go @@ -43,7 +43,7 @@ func (o *CircuitsProvidersDeleteReader) ReadResponse(response runtime.ClientResp return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_graphs_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_graphs_responses.go index a0a98e0a6..68fa0c751 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_graphs_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_graphs_responses.go @@ -46,7 +46,7 @@ func (o *CircuitsProvidersGraphsReader) ReadResponse(response runtime.ClientResp return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_list_responses.go index 0ee27b8ba..574c294f6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_list_responses.go @@ -50,7 +50,7 @@ func (o *CircuitsProvidersListReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_partial_update_responses.go index 9b7556150..22852b1a4 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsProvidersPartialUpdateReader) ReadResponse(response runtime.Cli return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsProvidersPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsProvidersPartialUpdateOK) readResponse(response runtime.ClientR return nil } + +// NewCircuitsProvidersPartialUpdateDefault creates a CircuitsProvidersPartialUpdateDefault with default headers values +func NewCircuitsProvidersPartialUpdateDefault(code int) *CircuitsProvidersPartialUpdateDefault { + return &CircuitsProvidersPartialUpdateDefault{ + _statusCode: code, + } +} + +/*CircuitsProvidersPartialUpdateDefault handles this case with default header values. + +CircuitsProvidersPartialUpdateDefault circuits providers partial update default +*/ +type CircuitsProvidersPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits providers partial update default response +func (o *CircuitsProvidersPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsProvidersPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /circuits/providers/{id}/][%d] circuits_providers_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsProvidersPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsProvidersPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_read_responses.go index 6293ffbf4..6aad9eed2 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_read_responses.go @@ -46,7 +46,7 @@ func (o *CircuitsProvidersReadReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_update_responses.go index 9e3ed8532..e14657af2 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_providers_update_responses.go @@ -44,9 +44,15 @@ func (o *CircuitsProvidersUpdateReader) ReadResponse(response runtime.ClientResp return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewCircuitsProvidersUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *CircuitsProvidersUpdateOK) readResponse(response runtime.ClientResponse return nil } + +// NewCircuitsProvidersUpdateDefault creates a CircuitsProvidersUpdateDefault with default headers values +func NewCircuitsProvidersUpdateDefault(code int) *CircuitsProvidersUpdateDefault { + return &CircuitsProvidersUpdateDefault{ + _statusCode: code, + } +} + +/*CircuitsProvidersUpdateDefault handles this case with default header values. + +CircuitsProvidersUpdateDefault circuits providers update default +*/ +type CircuitsProvidersUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the circuits providers update default response +func (o *CircuitsProvidersUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CircuitsProvidersUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /circuits/providers/{id}/][%d] circuits_providers_update default %+v", o._statusCode, o.Payload) +} + +func (o *CircuitsProvidersUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *CircuitsProvidersUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_create_responses.go index bf1d8d1dc..792e6a471 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimCablesCreateReader) ReadResponse(response runtime.ClientResponse, c return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimCablesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimCablesCreateCreated) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimCablesCreateDefault creates a DcimCablesCreateDefault with default headers values +func NewDcimCablesCreateDefault(code int) *DcimCablesCreateDefault { + return &DcimCablesCreateDefault{ + _statusCode: code, + } +} + +/*DcimCablesCreateDefault handles this case with default header values. + +DcimCablesCreateDefault dcim cables create default +*/ +type DcimCablesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim cables create default response +func (o *DcimCablesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimCablesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/cables/][%d] dcim_cables_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimCablesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimCablesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_delete_responses.go index 035119f75..0b5e42ed7 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimCablesDeleteReader) ReadResponse(response runtime.ClientResponse, c return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_list_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_list_parameters.go index 20d1e22f4..f37eda97f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_list_parameters.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_list_parameters.go @@ -156,6 +156,10 @@ type DcimCablesListParams struct { Status *string /*Statusn*/ Statusn *string + /*Tag*/ + Tag *string + /*Tagn*/ + Tagn *string /*Tenant*/ Tenant *string /*TenantID*/ @@ -610,6 +614,28 @@ func (o *DcimCablesListParams) SetStatusn(statusn *string) { o.Statusn = statusn } +// WithTag adds the tag to the dcim cables list params +func (o *DcimCablesListParams) WithTag(tag *string) *DcimCablesListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim cables list params +func (o *DcimCablesListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim cables list params +func (o *DcimCablesListParams) WithTagn(tagn *string) *DcimCablesListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim cables list params +func (o *DcimCablesListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WithTenant adds the tenant to the dcim cables list params func (o *DcimCablesListParams) WithTenant(tenant *string) *DcimCablesListParams { o.SetTenant(tenant) @@ -1254,6 +1280,38 @@ func (o *DcimCablesListParams) WriteToRequest(r runtime.ClientRequest, reg strfm } + if o.Tag != nil { + + // query param tag + var qrTag string + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + + } + + if o.Tagn != nil { + + // query param tag__n + var qrTagn string + if o.Tagn != nil { + qrTagn = *o.Tagn + } + qTagn := qrTagn + if qTagn != "" { + if err := r.SetQueryParam("tag__n", qTagn); err != nil { + return err + } + } + + } + if o.Tenant != nil { // query param tenant diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_list_responses.go index 639697ad9..9963bf052 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimCablesListReader) ReadResponse(response runtime.ClientResponse, con return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_partial_update_responses.go index 8479b480d..e0aa2cf18 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimCablesPartialUpdateReader) ReadResponse(response runtime.ClientResp return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimCablesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimCablesPartialUpdateOK) readResponse(response runtime.ClientResponse return nil } + +// NewDcimCablesPartialUpdateDefault creates a DcimCablesPartialUpdateDefault with default headers values +func NewDcimCablesPartialUpdateDefault(code int) *DcimCablesPartialUpdateDefault { + return &DcimCablesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimCablesPartialUpdateDefault handles this case with default header values. + +DcimCablesPartialUpdateDefault dcim cables partial update default +*/ +type DcimCablesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim cables partial update default response +func (o *DcimCablesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimCablesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/cables/{id}/][%d] dcim_cables_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimCablesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimCablesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_read_responses.go index d7aead2b4..aaa030836 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimCablesReadReader) ReadResponse(response runtime.ClientResponse, con return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_update_responses.go index 41ee9c4bd..61f6121c6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_cables_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimCablesUpdateReader) ReadResponse(response runtime.ClientResponse, c return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimCablesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimCablesUpdateOK) readResponse(response runtime.ClientResponse, consu return nil } + +// NewDcimCablesUpdateDefault creates a DcimCablesUpdateDefault with default headers values +func NewDcimCablesUpdateDefault(code int) *DcimCablesUpdateDefault { + return &DcimCablesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimCablesUpdateDefault handles this case with default header values. + +DcimCablesUpdateDefault dcim cables update default +*/ +type DcimCablesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim cables update default response +func (o *DcimCablesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimCablesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/cables/{id}/][%d] dcim_cables_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimCablesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimCablesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_list_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_list_parameters.go deleted file mode 100644 index 7ec5ca65b..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_list_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDcimChoicesListParams creates a new DcimChoicesListParams object -// with the default values initialized. -func NewDcimChoicesListParams() *DcimChoicesListParams { - - return &DcimChoicesListParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDcimChoicesListParamsWithTimeout creates a new DcimChoicesListParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDcimChoicesListParamsWithTimeout(timeout time.Duration) *DcimChoicesListParams { - - return &DcimChoicesListParams{ - - timeout: timeout, - } -} - -// NewDcimChoicesListParamsWithContext creates a new DcimChoicesListParams object -// with the default values initialized, and the ability to set a context for a request -func NewDcimChoicesListParamsWithContext(ctx context.Context) *DcimChoicesListParams { - - return &DcimChoicesListParams{ - - Context: ctx, - } -} - -// NewDcimChoicesListParamsWithHTTPClient creates a new DcimChoicesListParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDcimChoicesListParamsWithHTTPClient(client *http.Client) *DcimChoicesListParams { - - return &DcimChoicesListParams{ - HTTPClient: client, - } -} - -/*DcimChoicesListParams contains all the parameters to send to the API endpoint -for the dcim choices list operation typically these are written to a http.Request -*/ -type DcimChoicesListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the dcim choices list params -func (o *DcimChoicesListParams) WithTimeout(timeout time.Duration) *DcimChoicesListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the dcim choices list params -func (o *DcimChoicesListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the dcim choices list params -func (o *DcimChoicesListParams) WithContext(ctx context.Context) *DcimChoicesListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the dcim choices list params -func (o *DcimChoicesListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the dcim choices list params -func (o *DcimChoicesListParams) WithHTTPClient(client *http.Client) *DcimChoicesListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the dcim choices list params -func (o *DcimChoicesListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DcimChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_read_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_read_parameters.go deleted file mode 100644 index 858c7a467..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_read_parameters.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDcimChoicesReadParams creates a new DcimChoicesReadParams object -// with the default values initialized. -func NewDcimChoicesReadParams() *DcimChoicesReadParams { - var () - return &DcimChoicesReadParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDcimChoicesReadParamsWithTimeout creates a new DcimChoicesReadParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDcimChoicesReadParamsWithTimeout(timeout time.Duration) *DcimChoicesReadParams { - var () - return &DcimChoicesReadParams{ - - timeout: timeout, - } -} - -// NewDcimChoicesReadParamsWithContext creates a new DcimChoicesReadParams object -// with the default values initialized, and the ability to set a context for a request -func NewDcimChoicesReadParamsWithContext(ctx context.Context) *DcimChoicesReadParams { - var () - return &DcimChoicesReadParams{ - - Context: ctx, - } -} - -// NewDcimChoicesReadParamsWithHTTPClient creates a new DcimChoicesReadParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDcimChoicesReadParamsWithHTTPClient(client *http.Client) *DcimChoicesReadParams { - var () - return &DcimChoicesReadParams{ - HTTPClient: client, - } -} - -/*DcimChoicesReadParams contains all the parameters to send to the API endpoint -for the dcim choices read operation typically these are written to a http.Request -*/ -type DcimChoicesReadParams struct { - - /*ID*/ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the dcim choices read params -func (o *DcimChoicesReadParams) WithTimeout(timeout time.Duration) *DcimChoicesReadParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the dcim choices read params -func (o *DcimChoicesReadParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the dcim choices read params -func (o *DcimChoicesReadParams) WithContext(ctx context.Context) *DcimChoicesReadParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the dcim choices read params -func (o *DcimChoicesReadParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the dcim choices read params -func (o *DcimChoicesReadParams) WithHTTPClient(client *http.Client) *DcimChoicesReadParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the dcim choices read params -func (o *DcimChoicesReadParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the dcim choices read params -func (o *DcimChoicesReadParams) WithID(id string) *DcimChoicesReadParams { - o.SetID(id) - return o -} - -// SetID adds the id to the dcim choices read params -func (o *DcimChoicesReadParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *DcimChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_read_responses.go deleted file mode 100644 index d6fdc7751..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_choices_read_responses.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package dcim - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" -) - -// DcimChoicesReadReader is a Reader for the DcimChoicesRead structure. -type DcimChoicesReadReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DcimChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDcimChoicesReadOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewDcimChoicesReadOK creates a DcimChoicesReadOK with default headers values -func NewDcimChoicesReadOK() *DcimChoicesReadOK { - return &DcimChoicesReadOK{} -} - -/*DcimChoicesReadOK handles this case with default header values. - -DcimChoicesReadOK dcim choices read o k -*/ -type DcimChoicesReadOK struct { -} - -func (o *DcimChoicesReadOK) Error() string { - return fmt.Sprintf("[GET /dcim/_choices/{id}/][%d] dcimChoicesReadOK ", 200) -} - -func (o *DcimChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_client.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_client.go index b448ceebc..cbef356d3 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_client.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_client.go @@ -196,6 +196,8 @@ type ClientService interface { DcimFrontPortsRead(params *DcimFrontPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsReadOK, error) + DcimFrontPortsTrace(params *DcimFrontPortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsTraceOK, error) + DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsUpdateOK, error) DcimInterfaceConnectionsList(params *DcimInterfaceConnectionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceConnectionsListOK, error) @@ -414,6 +416,8 @@ type ClientService interface { DcimRearPortsRead(params *DcimRearPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsReadOK, error) + DcimRearPortsTrace(params *DcimRearPortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsTraceOK, error) + DcimRearPortsUpdate(params *DcimRearPortsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsUpdateOK, error) DcimRegionsCreate(params *DcimRegionsCreateParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsCreateCreated, error) @@ -487,9 +491,8 @@ func (a *Client) DcimCablesCreate(params *DcimCablesCreateParams, authInfo runti return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_cables_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimCablesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -528,7 +531,7 @@ func (a *Client) DcimCablesDelete(params *DcimCablesDeleteParams, authInfo runti } /* - DcimCablesList Call to super to allow for caching + DcimCablesList dcim cables list API */ func (a *Client) DcimCablesList(params *DcimCablesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesListOK, error) { // TODO: Validate the params before sending @@ -592,13 +595,12 @@ func (a *Client) DcimCablesPartialUpdate(params *DcimCablesPartialUpdateParams, return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_cables_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimCablesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimCablesRead Call to super to allow for caching + DcimCablesRead dcim cables read API */ func (a *Client) DcimCablesRead(params *DcimCablesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimCablesReadOK, error) { // TODO: Validate the params before sending @@ -662,9 +664,8 @@ func (a *Client) DcimCablesUpdate(params *DcimCablesUpdateParams, authInfo runti return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_cables_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimCablesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -772,9 +773,8 @@ func (a *Client) DcimConsolePortTemplatesCreate(params *DcimConsolePortTemplates return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsolePortTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -813,7 +813,7 @@ func (a *Client) DcimConsolePortTemplatesDelete(params *DcimConsolePortTemplates } /* - DcimConsolePortTemplatesList Call to super to allow for caching + DcimConsolePortTemplatesList dcim console port templates list API */ func (a *Client) DcimConsolePortTemplatesList(params *DcimConsolePortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -877,13 +877,12 @@ func (a *Client) DcimConsolePortTemplatesPartialUpdate(params *DcimConsolePortTe return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsolePortTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimConsolePortTemplatesRead Call to super to allow for caching + DcimConsolePortTemplatesRead dcim console port templates read API */ func (a *Client) DcimConsolePortTemplatesRead(params *DcimConsolePortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -947,9 +946,8 @@ func (a *Client) DcimConsolePortTemplatesUpdate(params *DcimConsolePortTemplates return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsolePortTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -982,9 +980,8 @@ func (a *Client) DcimConsolePortsCreate(params *DcimConsolePortsCreateParams, au return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsolePortsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1023,7 +1020,7 @@ func (a *Client) DcimConsolePortsDelete(params *DcimConsolePortsDeleteParams, au } /* - DcimConsolePortsList Call to super to allow for caching + DcimConsolePortsList dcim console ports list API */ func (a *Client) DcimConsolePortsList(params *DcimConsolePortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsListOK, error) { // TODO: Validate the params before sending @@ -1087,13 +1084,12 @@ func (a *Client) DcimConsolePortsPartialUpdate(params *DcimConsolePortsPartialUp return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsolePortsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimConsolePortsRead Call to super to allow for caching + DcimConsolePortsRead dcim console ports read API */ func (a *Client) DcimConsolePortsRead(params *DcimConsolePortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsolePortsReadOK, error) { // TODO: Validate the params before sending @@ -1192,9 +1188,8 @@ func (a *Client) DcimConsolePortsUpdate(params *DcimConsolePortsUpdateParams, au return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsolePortsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1227,9 +1222,8 @@ func (a *Client) DcimConsoleServerPortTemplatesCreate(params *DcimConsoleServerP return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-server-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsoleServerPortTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1268,7 +1262,7 @@ func (a *Client) DcimConsoleServerPortTemplatesDelete(params *DcimConsoleServerP } /* - DcimConsoleServerPortTemplatesList Call to super to allow for caching + DcimConsoleServerPortTemplatesList dcim console server port templates list API */ func (a *Client) DcimConsoleServerPortTemplatesList(params *DcimConsoleServerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -1332,13 +1326,12 @@ func (a *Client) DcimConsoleServerPortTemplatesPartialUpdate(params *DcimConsole return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-server-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsoleServerPortTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimConsoleServerPortTemplatesRead Call to super to allow for caching + DcimConsoleServerPortTemplatesRead dcim console server port templates read API */ func (a *Client) DcimConsoleServerPortTemplatesRead(params *DcimConsoleServerPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -1402,9 +1395,8 @@ func (a *Client) DcimConsoleServerPortTemplatesUpdate(params *DcimConsoleServerP return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-server-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsoleServerPortTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1437,9 +1429,8 @@ func (a *Client) DcimConsoleServerPortsCreate(params *DcimConsoleServerPortsCrea return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-server-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsoleServerPortsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1478,7 +1469,7 @@ func (a *Client) DcimConsoleServerPortsDelete(params *DcimConsoleServerPortsDele } /* - DcimConsoleServerPortsList Call to super to allow for caching + DcimConsoleServerPortsList dcim console server ports list API */ func (a *Client) DcimConsoleServerPortsList(params *DcimConsoleServerPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsListOK, error) { // TODO: Validate the params before sending @@ -1542,13 +1533,12 @@ func (a *Client) DcimConsoleServerPortsPartialUpdate(params *DcimConsoleServerPo return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-server-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsoleServerPortsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimConsoleServerPortsRead Call to super to allow for caching + DcimConsoleServerPortsRead dcim console server ports read API */ func (a *Client) DcimConsoleServerPortsRead(params *DcimConsoleServerPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimConsoleServerPortsReadOK, error) { // TODO: Validate the params before sending @@ -1647,9 +1637,8 @@ func (a *Client) DcimConsoleServerPortsUpdate(params *DcimConsoleServerPortsUpda return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_console-server-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimConsoleServerPortsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1682,9 +1671,8 @@ func (a *Client) DcimDeviceBayTemplatesCreate(params *DcimDeviceBayTemplatesCrea return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-bay-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceBayTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1723,7 +1711,7 @@ func (a *Client) DcimDeviceBayTemplatesDelete(params *DcimDeviceBayTemplatesDele } /* - DcimDeviceBayTemplatesList Call to super to allow for caching + DcimDeviceBayTemplatesList dcim device bay templates list API */ func (a *Client) DcimDeviceBayTemplatesList(params *DcimDeviceBayTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesListOK, error) { // TODO: Validate the params before sending @@ -1787,13 +1775,12 @@ func (a *Client) DcimDeviceBayTemplatesPartialUpdate(params *DcimDeviceBayTempla return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-bay-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceBayTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimDeviceBayTemplatesRead Call to super to allow for caching + DcimDeviceBayTemplatesRead dcim device bay templates read API */ func (a *Client) DcimDeviceBayTemplatesRead(params *DcimDeviceBayTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBayTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -1857,9 +1844,8 @@ func (a *Client) DcimDeviceBayTemplatesUpdate(params *DcimDeviceBayTemplatesUpda return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-bay-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceBayTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1892,9 +1878,8 @@ func (a *Client) DcimDeviceBaysCreate(params *DcimDeviceBaysCreateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-bays_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceBaysCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -1933,7 +1918,7 @@ func (a *Client) DcimDeviceBaysDelete(params *DcimDeviceBaysDeleteParams, authIn } /* - DcimDeviceBaysList Call to super to allow for caching + DcimDeviceBaysList dcim device bays list API */ func (a *Client) DcimDeviceBaysList(params *DcimDeviceBaysListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysListOK, error) { // TODO: Validate the params before sending @@ -1997,13 +1982,12 @@ func (a *Client) DcimDeviceBaysPartialUpdate(params *DcimDeviceBaysPartialUpdate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-bays_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceBaysPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimDeviceBaysRead Call to super to allow for caching + DcimDeviceBaysRead dcim device bays read API */ func (a *Client) DcimDeviceBaysRead(params *DcimDeviceBaysReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceBaysReadOK, error) { // TODO: Validate the params before sending @@ -2067,9 +2051,8 @@ func (a *Client) DcimDeviceBaysUpdate(params *DcimDeviceBaysUpdateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-bays_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceBaysUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -2102,9 +2085,8 @@ func (a *Client) DcimDeviceRolesCreate(params *DcimDeviceRolesCreateParams, auth return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceRolesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -2143,7 +2125,7 @@ func (a *Client) DcimDeviceRolesDelete(params *DcimDeviceRolesDeleteParams, auth } /* - DcimDeviceRolesList Call to super to allow for caching + DcimDeviceRolesList dcim device roles list API */ func (a *Client) DcimDeviceRolesList(params *DcimDeviceRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesListOK, error) { // TODO: Validate the params before sending @@ -2207,13 +2189,12 @@ func (a *Client) DcimDeviceRolesPartialUpdate(params *DcimDeviceRolesPartialUpda return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceRolesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimDeviceRolesRead Call to super to allow for caching + DcimDeviceRolesRead dcim device roles read API */ func (a *Client) DcimDeviceRolesRead(params *DcimDeviceRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceRolesReadOK, error) { // TODO: Validate the params before sending @@ -2277,9 +2258,8 @@ func (a *Client) DcimDeviceRolesUpdate(params *DcimDeviceRolesUpdateParams, auth return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceRolesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -2312,9 +2292,8 @@ func (a *Client) DcimDeviceTypesCreate(params *DcimDeviceTypesCreateParams, auth return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-types_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceTypesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -2353,7 +2332,7 @@ func (a *Client) DcimDeviceTypesDelete(params *DcimDeviceTypesDeleteParams, auth } /* - DcimDeviceTypesList Call to super to allow for caching + DcimDeviceTypesList dcim device types list API */ func (a *Client) DcimDeviceTypesList(params *DcimDeviceTypesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesListOK, error) { // TODO: Validate the params before sending @@ -2417,13 +2396,12 @@ func (a *Client) DcimDeviceTypesPartialUpdate(params *DcimDeviceTypesPartialUpda return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-types_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceTypesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimDeviceTypesRead Call to super to allow for caching + DcimDeviceTypesRead dcim device types read API */ func (a *Client) DcimDeviceTypesRead(params *DcimDeviceTypesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDeviceTypesReadOK, error) { // TODO: Validate the params before sending @@ -2487,9 +2465,8 @@ func (a *Client) DcimDeviceTypesUpdate(params *DcimDeviceTypesUpdateParams, auth return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_device-types_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDeviceTypesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -2522,9 +2499,8 @@ func (a *Client) DcimDevicesCreate(params *DcimDevicesCreateParams, authInfo run return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_devices_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDevicesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -2598,7 +2574,7 @@ func (a *Client) DcimDevicesGraphs(params *DcimDevicesGraphsParams, authInfo run } /* - DcimDevicesList Call to super to allow for caching + DcimDevicesList dcim devices list API */ func (a *Client) DcimDevicesList(params *DcimDevicesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesListOK, error) { // TODO: Validate the params before sending @@ -2697,13 +2673,12 @@ func (a *Client) DcimDevicesPartialUpdate(params *DcimDevicesPartialUpdateParams return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_devices_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDevicesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimDevicesRead Call to super to allow for caching + DcimDevicesRead dcim devices read API */ func (a *Client) DcimDevicesRead(params *DcimDevicesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimDevicesReadOK, error) { // TODO: Validate the params before sending @@ -2767,9 +2742,8 @@ func (a *Client) DcimDevicesUpdate(params *DcimDevicesUpdateParams, authInfo run return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_devices_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimDevicesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -2802,9 +2776,8 @@ func (a *Client) DcimFrontPortTemplatesCreate(params *DcimFrontPortTemplatesCrea return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_front-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimFrontPortTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -2843,7 +2816,7 @@ func (a *Client) DcimFrontPortTemplatesDelete(params *DcimFrontPortTemplatesDele } /* - DcimFrontPortTemplatesList Call to super to allow for caching + DcimFrontPortTemplatesList dcim front port templates list API */ func (a *Client) DcimFrontPortTemplatesList(params *DcimFrontPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -2907,13 +2880,12 @@ func (a *Client) DcimFrontPortTemplatesPartialUpdate(params *DcimFrontPortTempla return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_front-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimFrontPortTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimFrontPortTemplatesRead Call to super to allow for caching + DcimFrontPortTemplatesRead dcim front port templates read API */ func (a *Client) DcimFrontPortTemplatesRead(params *DcimFrontPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -2977,9 +2949,8 @@ func (a *Client) DcimFrontPortTemplatesUpdate(params *DcimFrontPortTemplatesUpda return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_front-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimFrontPortTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3012,9 +2983,8 @@ func (a *Client) DcimFrontPortsCreate(params *DcimFrontPortsCreateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_front-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimFrontPortsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3053,7 +3023,7 @@ func (a *Client) DcimFrontPortsDelete(params *DcimFrontPortsDeleteParams, authIn } /* - DcimFrontPortsList Call to super to allow for caching + DcimFrontPortsList dcim front ports list API */ func (a *Client) DcimFrontPortsList(params *DcimFrontPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsListOK, error) { // TODO: Validate the params before sending @@ -3117,13 +3087,12 @@ func (a *Client) DcimFrontPortsPartialUpdate(params *DcimFrontPortsPartialUpdate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_front-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimFrontPortsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimFrontPortsRead Call to super to allow for caching + DcimFrontPortsRead dcim front ports read API */ func (a *Client) DcimFrontPortsRead(params *DcimFrontPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsReadOK, error) { // TODO: Validate the params before sending @@ -3157,6 +3126,41 @@ func (a *Client) DcimFrontPortsRead(params *DcimFrontPortsReadParams, authInfo r panic(msg) } +/* + DcimFrontPortsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). +*/ +func (a *Client) DcimFrontPortsTrace(params *DcimFrontPortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimFrontPortsTraceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimFrontPortsTraceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "dcim_front-ports_trace", + Method: "GET", + PathPattern: "/dcim/front-ports/{id}/trace/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimFrontPortsTraceReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DcimFrontPortsTraceOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_front-ports_trace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* DcimFrontPortsUpdate dcim front ports update API */ @@ -3187,9 +3191,8 @@ func (a *Client) DcimFrontPortsUpdate(params *DcimFrontPortsUpdateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_front-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimFrontPortsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3257,9 +3260,8 @@ func (a *Client) DcimInterfaceTemplatesCreate(params *DcimInterfaceTemplatesCrea return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_interface-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInterfaceTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3298,7 +3300,7 @@ func (a *Client) DcimInterfaceTemplatesDelete(params *DcimInterfaceTemplatesDele } /* - DcimInterfaceTemplatesList Call to super to allow for caching + DcimInterfaceTemplatesList dcim interface templates list API */ func (a *Client) DcimInterfaceTemplatesList(params *DcimInterfaceTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesListOK, error) { // TODO: Validate the params before sending @@ -3362,13 +3364,12 @@ func (a *Client) DcimInterfaceTemplatesPartialUpdate(params *DcimInterfaceTempla return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_interface-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInterfaceTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimInterfaceTemplatesRead Call to super to allow for caching + DcimInterfaceTemplatesRead dcim interface templates read API */ func (a *Client) DcimInterfaceTemplatesRead(params *DcimInterfaceTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfaceTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -3432,9 +3433,8 @@ func (a *Client) DcimInterfaceTemplatesUpdate(params *DcimInterfaceTemplatesUpda return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_interface-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInterfaceTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3467,9 +3467,8 @@ func (a *Client) DcimInterfacesCreate(params *DcimInterfacesCreateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_interfaces_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInterfacesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3543,7 +3542,7 @@ func (a *Client) DcimInterfacesGraphs(params *DcimInterfacesGraphsParams, authIn } /* - DcimInterfacesList Call to super to allow for caching + DcimInterfacesList dcim interfaces list API */ func (a *Client) DcimInterfacesList(params *DcimInterfacesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesListOK, error) { // TODO: Validate the params before sending @@ -3607,13 +3606,12 @@ func (a *Client) DcimInterfacesPartialUpdate(params *DcimInterfacesPartialUpdate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_interfaces_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInterfacesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimInterfacesRead Call to super to allow for caching + DcimInterfacesRead dcim interfaces read API */ func (a *Client) DcimInterfacesRead(params *DcimInterfacesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInterfacesReadOK, error) { // TODO: Validate the params before sending @@ -3712,9 +3710,8 @@ func (a *Client) DcimInterfacesUpdate(params *DcimInterfacesUpdateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_interfaces_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInterfacesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3747,9 +3744,8 @@ func (a *Client) DcimInventoryItemsCreate(params *DcimInventoryItemsCreateParams return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_inventory-items_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInventoryItemsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3788,7 +3784,7 @@ func (a *Client) DcimInventoryItemsDelete(params *DcimInventoryItemsDeleteParams } /* - DcimInventoryItemsList Call to super to allow for caching + DcimInventoryItemsList dcim inventory items list API */ func (a *Client) DcimInventoryItemsList(params *DcimInventoryItemsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsListOK, error) { // TODO: Validate the params before sending @@ -3852,13 +3848,12 @@ func (a *Client) DcimInventoryItemsPartialUpdate(params *DcimInventoryItemsParti return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_inventory-items_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInventoryItemsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimInventoryItemsRead Call to super to allow for caching + DcimInventoryItemsRead dcim inventory items read API */ func (a *Client) DcimInventoryItemsRead(params *DcimInventoryItemsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimInventoryItemsReadOK, error) { // TODO: Validate the params before sending @@ -3922,9 +3917,8 @@ func (a *Client) DcimInventoryItemsUpdate(params *DcimInventoryItemsUpdateParams return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_inventory-items_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimInventoryItemsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3957,9 +3951,8 @@ func (a *Client) DcimManufacturersCreate(params *DcimManufacturersCreateParams, return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_manufacturers_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimManufacturersCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -3998,7 +3991,7 @@ func (a *Client) DcimManufacturersDelete(params *DcimManufacturersDeleteParams, } /* - DcimManufacturersList Call to super to allow for caching + DcimManufacturersList dcim manufacturers list API */ func (a *Client) DcimManufacturersList(params *DcimManufacturersListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersListOK, error) { // TODO: Validate the params before sending @@ -4062,13 +4055,12 @@ func (a *Client) DcimManufacturersPartialUpdate(params *DcimManufacturersPartial return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_manufacturers_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimManufacturersPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimManufacturersRead Call to super to allow for caching + DcimManufacturersRead dcim manufacturers read API */ func (a *Client) DcimManufacturersRead(params *DcimManufacturersReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimManufacturersReadOK, error) { // TODO: Validate the params before sending @@ -4132,9 +4124,8 @@ func (a *Client) DcimManufacturersUpdate(params *DcimManufacturersUpdateParams, return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_manufacturers_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimManufacturersUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -4167,9 +4158,8 @@ func (a *Client) DcimPlatformsCreate(params *DcimPlatformsCreateParams, authInfo return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_platforms_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPlatformsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -4208,7 +4198,7 @@ func (a *Client) DcimPlatformsDelete(params *DcimPlatformsDeleteParams, authInfo } /* - DcimPlatformsList Call to super to allow for caching + DcimPlatformsList dcim platforms list API */ func (a *Client) DcimPlatformsList(params *DcimPlatformsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsListOK, error) { // TODO: Validate the params before sending @@ -4272,13 +4262,12 @@ func (a *Client) DcimPlatformsPartialUpdate(params *DcimPlatformsPartialUpdatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_platforms_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPlatformsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimPlatformsRead Call to super to allow for caching + DcimPlatformsRead dcim platforms read API */ func (a *Client) DcimPlatformsRead(params *DcimPlatformsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPlatformsReadOK, error) { // TODO: Validate the params before sending @@ -4342,9 +4331,8 @@ func (a *Client) DcimPlatformsUpdate(params *DcimPlatformsUpdateParams, authInfo return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_platforms_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPlatformsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -4412,9 +4400,8 @@ func (a *Client) DcimPowerFeedsCreate(params *DcimPowerFeedsCreateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-feeds_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerFeedsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -4453,7 +4440,7 @@ func (a *Client) DcimPowerFeedsDelete(params *DcimPowerFeedsDeleteParams, authIn } /* - DcimPowerFeedsList Call to super to allow for caching + DcimPowerFeedsList dcim power feeds list API */ func (a *Client) DcimPowerFeedsList(params *DcimPowerFeedsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsListOK, error) { // TODO: Validate the params before sending @@ -4517,13 +4504,12 @@ func (a *Client) DcimPowerFeedsPartialUpdate(params *DcimPowerFeedsPartialUpdate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-feeds_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerFeedsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimPowerFeedsRead Call to super to allow for caching + DcimPowerFeedsRead dcim power feeds read API */ func (a *Client) DcimPowerFeedsRead(params *DcimPowerFeedsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerFeedsReadOK, error) { // TODO: Validate the params before sending @@ -4587,9 +4573,8 @@ func (a *Client) DcimPowerFeedsUpdate(params *DcimPowerFeedsUpdateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-feeds_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerFeedsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -4622,9 +4607,8 @@ func (a *Client) DcimPowerOutletTemplatesCreate(params *DcimPowerOutletTemplates return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-outlet-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerOutletTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -4663,7 +4647,7 @@ func (a *Client) DcimPowerOutletTemplatesDelete(params *DcimPowerOutletTemplates } /* - DcimPowerOutletTemplatesList Call to super to allow for caching + DcimPowerOutletTemplatesList dcim power outlet templates list API */ func (a *Client) DcimPowerOutletTemplatesList(params *DcimPowerOutletTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesListOK, error) { // TODO: Validate the params before sending @@ -4727,13 +4711,12 @@ func (a *Client) DcimPowerOutletTemplatesPartialUpdate(params *DcimPowerOutletTe return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-outlet-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerOutletTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimPowerOutletTemplatesRead Call to super to allow for caching + DcimPowerOutletTemplatesRead dcim power outlet templates read API */ func (a *Client) DcimPowerOutletTemplatesRead(params *DcimPowerOutletTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -4797,9 +4780,8 @@ func (a *Client) DcimPowerOutletTemplatesUpdate(params *DcimPowerOutletTemplates return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-outlet-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerOutletTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -4832,9 +4814,8 @@ func (a *Client) DcimPowerOutletsCreate(params *DcimPowerOutletsCreateParams, au return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-outlets_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerOutletsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -4873,7 +4854,7 @@ func (a *Client) DcimPowerOutletsDelete(params *DcimPowerOutletsDeleteParams, au } /* - DcimPowerOutletsList Call to super to allow for caching + DcimPowerOutletsList dcim power outlets list API */ func (a *Client) DcimPowerOutletsList(params *DcimPowerOutletsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsListOK, error) { // TODO: Validate the params before sending @@ -4937,13 +4918,12 @@ func (a *Client) DcimPowerOutletsPartialUpdate(params *DcimPowerOutletsPartialUp return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-outlets_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerOutletsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimPowerOutletsRead Call to super to allow for caching + DcimPowerOutletsRead dcim power outlets read API */ func (a *Client) DcimPowerOutletsRead(params *DcimPowerOutletsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerOutletsReadOK, error) { // TODO: Validate the params before sending @@ -5042,9 +5022,8 @@ func (a *Client) DcimPowerOutletsUpdate(params *DcimPowerOutletsUpdateParams, au return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-outlets_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerOutletsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5077,9 +5056,8 @@ func (a *Client) DcimPowerPanelsCreate(params *DcimPowerPanelsCreateParams, auth return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-panels_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPanelsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5118,7 +5096,7 @@ func (a *Client) DcimPowerPanelsDelete(params *DcimPowerPanelsDeleteParams, auth } /* - DcimPowerPanelsList Call to super to allow for caching + DcimPowerPanelsList dcim power panels list API */ func (a *Client) DcimPowerPanelsList(params *DcimPowerPanelsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsListOK, error) { // TODO: Validate the params before sending @@ -5182,13 +5160,12 @@ func (a *Client) DcimPowerPanelsPartialUpdate(params *DcimPowerPanelsPartialUpda return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-panels_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPanelsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimPowerPanelsRead Call to super to allow for caching + DcimPowerPanelsRead dcim power panels read API */ func (a *Client) DcimPowerPanelsRead(params *DcimPowerPanelsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPanelsReadOK, error) { // TODO: Validate the params before sending @@ -5252,9 +5229,8 @@ func (a *Client) DcimPowerPanelsUpdate(params *DcimPowerPanelsUpdateParams, auth return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-panels_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPanelsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5287,9 +5263,8 @@ func (a *Client) DcimPowerPortTemplatesCreate(params *DcimPowerPortTemplatesCrea return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPortTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5328,7 +5303,7 @@ func (a *Client) DcimPowerPortTemplatesDelete(params *DcimPowerPortTemplatesDele } /* - DcimPowerPortTemplatesList Call to super to allow for caching + DcimPowerPortTemplatesList dcim power port templates list API */ func (a *Client) DcimPowerPortTemplatesList(params *DcimPowerPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -5392,13 +5367,12 @@ func (a *Client) DcimPowerPortTemplatesPartialUpdate(params *DcimPowerPortTempla return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPortTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimPowerPortTemplatesRead Call to super to allow for caching + DcimPowerPortTemplatesRead dcim power port templates read API */ func (a *Client) DcimPowerPortTemplatesRead(params *DcimPowerPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -5462,9 +5436,8 @@ func (a *Client) DcimPowerPortTemplatesUpdate(params *DcimPowerPortTemplatesUpda return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPortTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5497,9 +5470,8 @@ func (a *Client) DcimPowerPortsCreate(params *DcimPowerPortsCreateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPortsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5538,7 +5510,7 @@ func (a *Client) DcimPowerPortsDelete(params *DcimPowerPortsDeleteParams, authIn } /* - DcimPowerPortsList Call to super to allow for caching + DcimPowerPortsList dcim power ports list API */ func (a *Client) DcimPowerPortsList(params *DcimPowerPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsListOK, error) { // TODO: Validate the params before sending @@ -5602,13 +5574,12 @@ func (a *Client) DcimPowerPortsPartialUpdate(params *DcimPowerPortsPartialUpdate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPortsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimPowerPortsRead Call to super to allow for caching + DcimPowerPortsRead dcim power ports read API */ func (a *Client) DcimPowerPortsRead(params *DcimPowerPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimPowerPortsReadOK, error) { // TODO: Validate the params before sending @@ -5707,9 +5678,8 @@ func (a *Client) DcimPowerPortsUpdate(params *DcimPowerPortsUpdateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_power-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimPowerPortsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5742,9 +5712,8 @@ func (a *Client) DcimRackGroupsCreate(params *DcimRackGroupsCreateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-groups_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackGroupsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5783,7 +5752,7 @@ func (a *Client) DcimRackGroupsDelete(params *DcimRackGroupsDeleteParams, authIn } /* - DcimRackGroupsList Call to super to allow for caching + DcimRackGroupsList dcim rack groups list API */ func (a *Client) DcimRackGroupsList(params *DcimRackGroupsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsListOK, error) { // TODO: Validate the params before sending @@ -5847,13 +5816,12 @@ func (a *Client) DcimRackGroupsPartialUpdate(params *DcimRackGroupsPartialUpdate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-groups_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackGroupsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimRackGroupsRead Call to super to allow for caching + DcimRackGroupsRead dcim rack groups read API */ func (a *Client) DcimRackGroupsRead(params *DcimRackGroupsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackGroupsReadOK, error) { // TODO: Validate the params before sending @@ -5917,9 +5885,8 @@ func (a *Client) DcimRackGroupsUpdate(params *DcimRackGroupsUpdateParams, authIn return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-groups_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackGroupsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5952,9 +5919,8 @@ func (a *Client) DcimRackReservationsCreate(params *DcimRackReservationsCreatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-reservations_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackReservationsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -5993,7 +5959,7 @@ func (a *Client) DcimRackReservationsDelete(params *DcimRackReservationsDeletePa } /* - DcimRackReservationsList Call to super to allow for caching + DcimRackReservationsList dcim rack reservations list API */ func (a *Client) DcimRackReservationsList(params *DcimRackReservationsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsListOK, error) { // TODO: Validate the params before sending @@ -6057,13 +6023,12 @@ func (a *Client) DcimRackReservationsPartialUpdate(params *DcimRackReservationsP return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-reservations_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackReservationsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimRackReservationsRead Call to super to allow for caching + DcimRackReservationsRead dcim rack reservations read API */ func (a *Client) DcimRackReservationsRead(params *DcimRackReservationsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackReservationsReadOK, error) { // TODO: Validate the params before sending @@ -6127,9 +6092,8 @@ func (a *Client) DcimRackReservationsUpdate(params *DcimRackReservationsUpdatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-reservations_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackReservationsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -6162,9 +6126,8 @@ func (a *Client) DcimRackRolesCreate(params *DcimRackRolesCreateParams, authInfo return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-roles_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackRolesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -6203,7 +6166,7 @@ func (a *Client) DcimRackRolesDelete(params *DcimRackRolesDeleteParams, authInfo } /* - DcimRackRolesList Call to super to allow for caching + DcimRackRolesList dcim rack roles list API */ func (a *Client) DcimRackRolesList(params *DcimRackRolesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesListOK, error) { // TODO: Validate the params before sending @@ -6267,13 +6230,12 @@ func (a *Client) DcimRackRolesPartialUpdate(params *DcimRackRolesPartialUpdatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-roles_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackRolesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimRackRolesRead Call to super to allow for caching + DcimRackRolesRead dcim rack roles read API */ func (a *Client) DcimRackRolesRead(params *DcimRackRolesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRackRolesReadOK, error) { // TODO: Validate the params before sending @@ -6337,9 +6299,8 @@ func (a *Client) DcimRackRolesUpdate(params *DcimRackRolesUpdateParams, authInfo return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rack-roles_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRackRolesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -6372,9 +6333,8 @@ func (a *Client) DcimRacksCreate(params *DcimRacksCreateParams, authInfo runtime return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_racks_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRacksCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -6448,7 +6408,7 @@ func (a *Client) DcimRacksElevation(params *DcimRacksElevationParams, authInfo r } /* - DcimRacksList Call to super to allow for caching + DcimRacksList dcim racks list API */ func (a *Client) DcimRacksList(params *DcimRacksListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksListOK, error) { // TODO: Validate the params before sending @@ -6512,13 +6472,12 @@ func (a *Client) DcimRacksPartialUpdate(params *DcimRacksPartialUpdateParams, au return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_racks_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRacksPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimRacksRead Call to super to allow for caching + DcimRacksRead dcim racks read API */ func (a *Client) DcimRacksRead(params *DcimRacksReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRacksReadOK, error) { // TODO: Validate the params before sending @@ -6582,9 +6541,8 @@ func (a *Client) DcimRacksUpdate(params *DcimRacksUpdateParams, authInfo runtime return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_racks_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRacksUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -6617,9 +6575,8 @@ func (a *Client) DcimRearPortTemplatesCreate(params *DcimRearPortTemplatesCreate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rear-port-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRearPortTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -6658,7 +6615,7 @@ func (a *Client) DcimRearPortTemplatesDelete(params *DcimRearPortTemplatesDelete } /* - DcimRearPortTemplatesList Call to super to allow for caching + DcimRearPortTemplatesList dcim rear port templates list API */ func (a *Client) DcimRearPortTemplatesList(params *DcimRearPortTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesListOK, error) { // TODO: Validate the params before sending @@ -6722,13 +6679,12 @@ func (a *Client) DcimRearPortTemplatesPartialUpdate(params *DcimRearPortTemplate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rear-port-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRearPortTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimRearPortTemplatesRead Call to super to allow for caching + DcimRearPortTemplatesRead dcim rear port templates read API */ func (a *Client) DcimRearPortTemplatesRead(params *DcimRearPortTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -6792,9 +6748,8 @@ func (a *Client) DcimRearPortTemplatesUpdate(params *DcimRearPortTemplatesUpdate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rear-port-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRearPortTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -6827,9 +6782,8 @@ func (a *Client) DcimRearPortsCreate(params *DcimRearPortsCreateParams, authInfo return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rear-ports_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRearPortsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -6868,7 +6822,7 @@ func (a *Client) DcimRearPortsDelete(params *DcimRearPortsDeleteParams, authInfo } /* - DcimRearPortsList Call to super to allow for caching + DcimRearPortsList dcim rear ports list API */ func (a *Client) DcimRearPortsList(params *DcimRearPortsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsListOK, error) { // TODO: Validate the params before sending @@ -6932,13 +6886,12 @@ func (a *Client) DcimRearPortsPartialUpdate(params *DcimRearPortsPartialUpdatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rear-ports_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRearPortsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimRearPortsRead Call to super to allow for caching + DcimRearPortsRead dcim rear ports read API */ func (a *Client) DcimRearPortsRead(params *DcimRearPortsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsReadOK, error) { // TODO: Validate the params before sending @@ -6972,6 +6925,41 @@ func (a *Client) DcimRearPortsRead(params *DcimRearPortsReadParams, authInfo run panic(msg) } +/* + DcimRearPortsTrace Trace a complete cable path and return each segment as a three-tuple of (termination, cable, termination). +*/ +func (a *Client) DcimRearPortsTrace(params *DcimRearPortsTraceParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRearPortsTraceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDcimRearPortsTraceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "dcim_rear-ports_trace", + Method: "GET", + PathPattern: "/dcim/rear-ports/{id}/trace/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DcimRearPortsTraceReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DcimRearPortsTraceOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for dcim_rear-ports_trace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + /* DcimRearPortsUpdate dcim rear ports update API */ @@ -7002,9 +6990,8 @@ func (a *Client) DcimRearPortsUpdate(params *DcimRearPortsUpdateParams, authInfo return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_rear-ports_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRearPortsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -7037,9 +7024,8 @@ func (a *Client) DcimRegionsCreate(params *DcimRegionsCreateParams, authInfo run return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_regions_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRegionsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -7078,7 +7064,7 @@ func (a *Client) DcimRegionsDelete(params *DcimRegionsDeleteParams, authInfo run } /* - DcimRegionsList Call to super to allow for caching + DcimRegionsList dcim regions list API */ func (a *Client) DcimRegionsList(params *DcimRegionsListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsListOK, error) { // TODO: Validate the params before sending @@ -7142,13 +7128,12 @@ func (a *Client) DcimRegionsPartialUpdate(params *DcimRegionsPartialUpdateParams return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_regions_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRegionsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimRegionsRead Call to super to allow for caching + DcimRegionsRead dcim regions read API */ func (a *Client) DcimRegionsRead(params *DcimRegionsReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimRegionsReadOK, error) { // TODO: Validate the params before sending @@ -7212,9 +7197,8 @@ func (a *Client) DcimRegionsUpdate(params *DcimRegionsUpdateParams, authInfo run return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_regions_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimRegionsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -7247,9 +7231,8 @@ func (a *Client) DcimSitesCreate(params *DcimSitesCreateParams, authInfo runtime return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_sites_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimSitesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -7323,7 +7306,7 @@ func (a *Client) DcimSitesGraphs(params *DcimSitesGraphsParams, authInfo runtime } /* - DcimSitesList Call to super to allow for caching + DcimSitesList dcim sites list API */ func (a *Client) DcimSitesList(params *DcimSitesListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesListOK, error) { // TODO: Validate the params before sending @@ -7387,13 +7370,12 @@ func (a *Client) DcimSitesPartialUpdate(params *DcimSitesPartialUpdateParams, au return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_sites_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimSitesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimSitesRead Call to super to allow for caching + DcimSitesRead dcim sites read API */ func (a *Client) DcimSitesRead(params *DcimSitesReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimSitesReadOK, error) { // TODO: Validate the params before sending @@ -7457,9 +7439,8 @@ func (a *Client) DcimSitesUpdate(params *DcimSitesUpdateParams, authInfo runtime return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_sites_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimSitesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -7492,9 +7473,8 @@ func (a *Client) DcimVirtualChassisCreate(params *DcimVirtualChassisCreateParams return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_virtual-chassis_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimVirtualChassisCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -7533,7 +7513,7 @@ func (a *Client) DcimVirtualChassisDelete(params *DcimVirtualChassisDeleteParams } /* - DcimVirtualChassisList Call to super to allow for caching + DcimVirtualChassisList dcim virtual chassis list API */ func (a *Client) DcimVirtualChassisList(params *DcimVirtualChassisListParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisListOK, error) { // TODO: Validate the params before sending @@ -7597,13 +7577,12 @@ func (a *Client) DcimVirtualChassisPartialUpdate(params *DcimVirtualChassisParti return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_virtual-chassis_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimVirtualChassisPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - DcimVirtualChassisRead Call to super to allow for caching + DcimVirtualChassisRead dcim virtual chassis read API */ func (a *Client) DcimVirtualChassisRead(params *DcimVirtualChassisReadParams, authInfo runtime.ClientAuthInfoWriter) (*DcimVirtualChassisReadOK, error) { // TODO: Validate the params before sending @@ -7667,9 +7646,8 @@ func (a *Client) DcimVirtualChassisUpdate(params *DcimVirtualChassisUpdateParams return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for dcim_virtual-chassis_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*DcimVirtualChassisUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_connected_device_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_connected_device_list_responses.go index da08cacf7..06bef6761 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_connected_device_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_connected_device_list_responses.go @@ -46,7 +46,7 @@ func (o *DcimConnectedDeviceListReader) ReadResponse(response runtime.ClientResp return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_connections_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_connections_list_responses.go index 48f1eba5c..01675b300 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_connections_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_connections_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimConsoleConnectionsListReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_responses.go index 7be849edb..b136dd6dc 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsolePortTemplatesCreateReader) ReadResponse(response runtime.Cli return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsolePortTemplatesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsolePortTemplatesCreateCreated) readResponse(response runtime.Cl return nil } + +// NewDcimConsolePortTemplatesCreateDefault creates a DcimConsolePortTemplatesCreateDefault with default headers values +func NewDcimConsolePortTemplatesCreateDefault(code int) *DcimConsolePortTemplatesCreateDefault { + return &DcimConsolePortTemplatesCreateDefault{ + _statusCode: code, + } +} + +/*DcimConsolePortTemplatesCreateDefault handles this case with default header values. + +DcimConsolePortTemplatesCreateDefault dcim console port templates create default +*/ +type DcimConsolePortTemplatesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console port templates create default response +func (o *DcimConsolePortTemplatesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsolePortTemplatesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/console-port-templates/][%d] dcim_console-port-templates_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsolePortTemplatesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsolePortTemplatesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_responses.go index 1274e3683..8ad9a8a76 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimConsolePortTemplatesDeleteReader) ReadResponse(response runtime.Cli return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_responses.go index ae509efe4..e6c85753d 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimConsolePortTemplatesListReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go index c5299f9fc..bff4761eb 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsolePortTemplatesPartialUpdateReader) ReadResponse(response runt return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsolePortTemplatesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsolePortTemplatesPartialUpdateOK) readResponse(response runtime. return nil } + +// NewDcimConsolePortTemplatesPartialUpdateDefault creates a DcimConsolePortTemplatesPartialUpdateDefault with default headers values +func NewDcimConsolePortTemplatesPartialUpdateDefault(code int) *DcimConsolePortTemplatesPartialUpdateDefault { + return &DcimConsolePortTemplatesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimConsolePortTemplatesPartialUpdateDefault handles this case with default header values. + +DcimConsolePortTemplatesPartialUpdateDefault dcim console port templates partial update default +*/ +type DcimConsolePortTemplatesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console port templates partial update default response +func (o *DcimConsolePortTemplatesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsolePortTemplatesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/console-port-templates/{id}/][%d] dcim_console-port-templates_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsolePortTemplatesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsolePortTemplatesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_responses.go index 757c32931..4c7193b10 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimConsolePortTemplatesReadReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_responses.go index a91f9a08e..efde8d31c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_port_templates_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsolePortTemplatesUpdateReader) ReadResponse(response runtime.Cli return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsolePortTemplatesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsolePortTemplatesUpdateOK) readResponse(response runtime.ClientR return nil } + +// NewDcimConsolePortTemplatesUpdateDefault creates a DcimConsolePortTemplatesUpdateDefault with default headers values +func NewDcimConsolePortTemplatesUpdateDefault(code int) *DcimConsolePortTemplatesUpdateDefault { + return &DcimConsolePortTemplatesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimConsolePortTemplatesUpdateDefault handles this case with default header values. + +DcimConsolePortTemplatesUpdateDefault dcim console port templates update default +*/ +type DcimConsolePortTemplatesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console port templates update default response +func (o *DcimConsolePortTemplatesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsolePortTemplatesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/console-port-templates/{id}/][%d] dcim_console-port-templates_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsolePortTemplatesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsolePortTemplatesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_create_responses.go index e0eadac31..c9ec37658 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsolePortsCreateReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsolePortsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsolePortsCreateCreated) readResponse(response runtime.ClientResp return nil } + +// NewDcimConsolePortsCreateDefault creates a DcimConsolePortsCreateDefault with default headers values +func NewDcimConsolePortsCreateDefault(code int) *DcimConsolePortsCreateDefault { + return &DcimConsolePortsCreateDefault{ + _statusCode: code, + } +} + +/*DcimConsolePortsCreateDefault handles this case with default header values. + +DcimConsolePortsCreateDefault dcim console ports create default +*/ +type DcimConsolePortsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console ports create default response +func (o *DcimConsolePortsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsolePortsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/console-ports/][%d] dcim_console-ports_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsolePortsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsolePortsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_delete_responses.go index 177acf4fc..b812417b1 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimConsolePortsDeleteReader) ReadResponse(response runtime.ClientRespo return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_list_responses.go index 9e6070b66..f22a2d477 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimConsolePortsListReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_responses.go index 2d3368fec..b67ca947a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsolePortsPartialUpdateReader) ReadResponse(response runtime.Clie return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsolePortsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsolePortsPartialUpdateOK) readResponse(response runtime.ClientRe return nil } + +// NewDcimConsolePortsPartialUpdateDefault creates a DcimConsolePortsPartialUpdateDefault with default headers values +func NewDcimConsolePortsPartialUpdateDefault(code int) *DcimConsolePortsPartialUpdateDefault { + return &DcimConsolePortsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimConsolePortsPartialUpdateDefault handles this case with default header values. + +DcimConsolePortsPartialUpdateDefault dcim console ports partial update default +*/ +type DcimConsolePortsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console ports partial update default response +func (o *DcimConsolePortsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsolePortsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/console-ports/{id}/][%d] dcim_console-ports_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsolePortsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsolePortsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_read_responses.go index d0e1240a2..d1a820e08 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimConsolePortsReadReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_trace_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_trace_responses.go index 6ccbeb994..d03ee89bf 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_trace_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_trace_responses.go @@ -46,7 +46,7 @@ func (o *DcimConsolePortsTraceReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_update_responses.go index e55142856..ce2aa3cfd 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_ports_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsolePortsUpdateReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsolePortsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsolePortsUpdateOK) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimConsolePortsUpdateDefault creates a DcimConsolePortsUpdateDefault with default headers values +func NewDcimConsolePortsUpdateDefault(code int) *DcimConsolePortsUpdateDefault { + return &DcimConsolePortsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimConsolePortsUpdateDefault handles this case with default header values. + +DcimConsolePortsUpdateDefault dcim console ports update default +*/ +type DcimConsolePortsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console ports update default response +func (o *DcimConsolePortsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsolePortsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/console-ports/{id}/][%d] dcim_console-ports_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsolePortsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsolePortsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go index f09eeeb36..b6dd16409 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsoleServerPortTemplatesCreateReader) ReadResponse(response runti return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsoleServerPortTemplatesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsoleServerPortTemplatesCreateCreated) readResponse(response runt return nil } + +// NewDcimConsoleServerPortTemplatesCreateDefault creates a DcimConsoleServerPortTemplatesCreateDefault with default headers values +func NewDcimConsoleServerPortTemplatesCreateDefault(code int) *DcimConsoleServerPortTemplatesCreateDefault { + return &DcimConsoleServerPortTemplatesCreateDefault{ + _statusCode: code, + } +} + +/*DcimConsoleServerPortTemplatesCreateDefault handles this case with default header values. + +DcimConsoleServerPortTemplatesCreateDefault dcim console server port templates create default +*/ +type DcimConsoleServerPortTemplatesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console server port templates create default response +func (o *DcimConsoleServerPortTemplatesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsoleServerPortTemplatesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/console-server-port-templates/][%d] dcim_console-server-port-templates_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsoleServerPortTemplatesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsoleServerPortTemplatesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go index 17f6414a1..e0d644f2d 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimConsoleServerPortTemplatesDeleteReader) ReadResponse(response runti return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go index b1d2d5fc9..73f08b306 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimConsoleServerPortTemplatesListReader) ReadResponse(response runtime return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go index c80fdaed7..560f32758 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsoleServerPortTemplatesPartialUpdateReader) ReadResponse(respons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsoleServerPortTemplatesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsoleServerPortTemplatesPartialUpdateOK) readResponse(response ru return nil } + +// NewDcimConsoleServerPortTemplatesPartialUpdateDefault creates a DcimConsoleServerPortTemplatesPartialUpdateDefault with default headers values +func NewDcimConsoleServerPortTemplatesPartialUpdateDefault(code int) *DcimConsoleServerPortTemplatesPartialUpdateDefault { + return &DcimConsoleServerPortTemplatesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimConsoleServerPortTemplatesPartialUpdateDefault handles this case with default header values. + +DcimConsoleServerPortTemplatesPartialUpdateDefault dcim console server port templates partial update default +*/ +type DcimConsoleServerPortTemplatesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console server port templates partial update default response +func (o *DcimConsoleServerPortTemplatesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsoleServerPortTemplatesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/console-server-port-templates/{id}/][%d] dcim_console-server-port-templates_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsoleServerPortTemplatesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsoleServerPortTemplatesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go index 55f437610..ecccb33bc 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimConsoleServerPortTemplatesReadReader) ReadResponse(response runtime return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go index d912e2195..4f546fc82 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_port_templates_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsoleServerPortTemplatesUpdateReader) ReadResponse(response runti return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsoleServerPortTemplatesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsoleServerPortTemplatesUpdateOK) readResponse(response runtime.C return nil } + +// NewDcimConsoleServerPortTemplatesUpdateDefault creates a DcimConsoleServerPortTemplatesUpdateDefault with default headers values +func NewDcimConsoleServerPortTemplatesUpdateDefault(code int) *DcimConsoleServerPortTemplatesUpdateDefault { + return &DcimConsoleServerPortTemplatesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimConsoleServerPortTemplatesUpdateDefault handles this case with default header values. + +DcimConsoleServerPortTemplatesUpdateDefault dcim console server port templates update default +*/ +type DcimConsoleServerPortTemplatesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console server port templates update default response +func (o *DcimConsoleServerPortTemplatesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsoleServerPortTemplatesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/console-server-port-templates/{id}/][%d] dcim_console-server-port-templates_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsoleServerPortTemplatesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsoleServerPortTemplatesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_responses.go index d93a6350f..f08a997b9 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsoleServerPortsCreateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsoleServerPortsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsoleServerPortsCreateCreated) readResponse(response runtime.Clie return nil } + +// NewDcimConsoleServerPortsCreateDefault creates a DcimConsoleServerPortsCreateDefault with default headers values +func NewDcimConsoleServerPortsCreateDefault(code int) *DcimConsoleServerPortsCreateDefault { + return &DcimConsoleServerPortsCreateDefault{ + _statusCode: code, + } +} + +/*DcimConsoleServerPortsCreateDefault handles this case with default header values. + +DcimConsoleServerPortsCreateDefault dcim console server ports create default +*/ +type DcimConsoleServerPortsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console server ports create default response +func (o *DcimConsoleServerPortsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsoleServerPortsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/console-server-ports/][%d] dcim_console-server-ports_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsoleServerPortsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsoleServerPortsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_responses.go index c3b1c9fcb..3bbb1ccd5 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimConsoleServerPortsDeleteReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_responses.go index 51132114e..794161d10 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimConsoleServerPortsListReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go index 851930cad..e6e30bb4a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsoleServerPortsPartialUpdateReader) ReadResponse(response runtim return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsoleServerPortsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsoleServerPortsPartialUpdateOK) readResponse(response runtime.Cl return nil } + +// NewDcimConsoleServerPortsPartialUpdateDefault creates a DcimConsoleServerPortsPartialUpdateDefault with default headers values +func NewDcimConsoleServerPortsPartialUpdateDefault(code int) *DcimConsoleServerPortsPartialUpdateDefault { + return &DcimConsoleServerPortsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimConsoleServerPortsPartialUpdateDefault handles this case with default header values. + +DcimConsoleServerPortsPartialUpdateDefault dcim console server ports partial update default +*/ +type DcimConsoleServerPortsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console server ports partial update default response +func (o *DcimConsoleServerPortsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsoleServerPortsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/console-server-ports/{id}/][%d] dcim_console-server-ports_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsoleServerPortsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsoleServerPortsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_responses.go index ca62a3b04..18f062058 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimConsoleServerPortsReadReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_trace_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_trace_responses.go index 7cb5f76b9..72acf2474 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_trace_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_trace_responses.go @@ -46,7 +46,7 @@ func (o *DcimConsoleServerPortsTraceReader) ReadResponse(response runtime.Client return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_responses.go index e30aaa294..50a79af76 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_console_server_ports_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimConsoleServerPortsUpdateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimConsoleServerPortsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimConsoleServerPortsUpdateOK) readResponse(response runtime.ClientRes return nil } + +// NewDcimConsoleServerPortsUpdateDefault creates a DcimConsoleServerPortsUpdateDefault with default headers values +func NewDcimConsoleServerPortsUpdateDefault(code int) *DcimConsoleServerPortsUpdateDefault { + return &DcimConsoleServerPortsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimConsoleServerPortsUpdateDefault handles this case with default header values. + +DcimConsoleServerPortsUpdateDefault dcim console server ports update default +*/ +type DcimConsoleServerPortsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim console server ports update default response +func (o *DcimConsoleServerPortsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimConsoleServerPortsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/console-server-ports/{id}/][%d] dcim_console-server-ports_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimConsoleServerPortsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimConsoleServerPortsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_responses.go index 054d85da6..5dcb119d8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceBayTemplatesCreateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceBayTemplatesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceBayTemplatesCreateCreated) readResponse(response runtime.Clie return nil } + +// NewDcimDeviceBayTemplatesCreateDefault creates a DcimDeviceBayTemplatesCreateDefault with default headers values +func NewDcimDeviceBayTemplatesCreateDefault(code int) *DcimDeviceBayTemplatesCreateDefault { + return &DcimDeviceBayTemplatesCreateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceBayTemplatesCreateDefault handles this case with default header values. + +DcimDeviceBayTemplatesCreateDefault dcim device bay templates create default +*/ +type DcimDeviceBayTemplatesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device bay templates create default response +func (o *DcimDeviceBayTemplatesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceBayTemplatesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/device-bay-templates/][%d] dcim_device-bay-templates_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceBayTemplatesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceBayTemplatesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go index c7b28854f..083f72a98 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimDeviceBayTemplatesDeleteReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_responses.go index 4d4a2484d..898078d47 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimDeviceBayTemplatesListReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go index a2b5de83d..0506452e6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceBayTemplatesPartialUpdateReader) ReadResponse(response runtim return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceBayTemplatesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceBayTemplatesPartialUpdateOK) readResponse(response runtime.Cl return nil } + +// NewDcimDeviceBayTemplatesPartialUpdateDefault creates a DcimDeviceBayTemplatesPartialUpdateDefault with default headers values +func NewDcimDeviceBayTemplatesPartialUpdateDefault(code int) *DcimDeviceBayTemplatesPartialUpdateDefault { + return &DcimDeviceBayTemplatesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceBayTemplatesPartialUpdateDefault handles this case with default header values. + +DcimDeviceBayTemplatesPartialUpdateDefault dcim device bay templates partial update default +*/ +type DcimDeviceBayTemplatesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device bay templates partial update default response +func (o *DcimDeviceBayTemplatesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceBayTemplatesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/device-bay-templates/{id}/][%d] dcim_device-bay-templates_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceBayTemplatesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceBayTemplatesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_responses.go index ded1ed72d..db26cfa16 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimDeviceBayTemplatesReadReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_responses.go index fbacdd6c5..a653d5f4b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bay_templates_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceBayTemplatesUpdateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceBayTemplatesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceBayTemplatesUpdateOK) readResponse(response runtime.ClientRes return nil } + +// NewDcimDeviceBayTemplatesUpdateDefault creates a DcimDeviceBayTemplatesUpdateDefault with default headers values +func NewDcimDeviceBayTemplatesUpdateDefault(code int) *DcimDeviceBayTemplatesUpdateDefault { + return &DcimDeviceBayTemplatesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceBayTemplatesUpdateDefault handles this case with default header values. + +DcimDeviceBayTemplatesUpdateDefault dcim device bay templates update default +*/ +type DcimDeviceBayTemplatesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device bay templates update default response +func (o *DcimDeviceBayTemplatesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceBayTemplatesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/device-bay-templates/{id}/][%d] dcim_device-bay-templates_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceBayTemplatesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceBayTemplatesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_create_responses.go index 02fbaeaa3..3148642e6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceBaysCreateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceBaysCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceBaysCreateCreated) readResponse(response runtime.ClientRespon return nil } + +// NewDcimDeviceBaysCreateDefault creates a DcimDeviceBaysCreateDefault with default headers values +func NewDcimDeviceBaysCreateDefault(code int) *DcimDeviceBaysCreateDefault { + return &DcimDeviceBaysCreateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceBaysCreateDefault handles this case with default header values. + +DcimDeviceBaysCreateDefault dcim device bays create default +*/ +type DcimDeviceBaysCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device bays create default response +func (o *DcimDeviceBaysCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceBaysCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/device-bays/][%d] dcim_device-bays_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceBaysCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceBaysCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_delete_responses.go index 51c8e04b9..510409915 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimDeviceBaysDeleteReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_list_responses.go index 18b95cdad..74df19eec 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimDeviceBaysListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_responses.go index 589b47d0c..99138d80b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceBaysPartialUpdateReader) ReadResponse(response runtime.Client return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceBaysPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceBaysPartialUpdateOK) readResponse(response runtime.ClientResp return nil } + +// NewDcimDeviceBaysPartialUpdateDefault creates a DcimDeviceBaysPartialUpdateDefault with default headers values +func NewDcimDeviceBaysPartialUpdateDefault(code int) *DcimDeviceBaysPartialUpdateDefault { + return &DcimDeviceBaysPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceBaysPartialUpdateDefault handles this case with default header values. + +DcimDeviceBaysPartialUpdateDefault dcim device bays partial update default +*/ +type DcimDeviceBaysPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device bays partial update default response +func (o *DcimDeviceBaysPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceBaysPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/device-bays/{id}/][%d] dcim_device-bays_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceBaysPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceBaysPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_read_responses.go index d879ff240..8b0124c1a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimDeviceBaysReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_update_responses.go index 1b340587f..085573fa5 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_bays_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceBaysUpdateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceBaysUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceBaysUpdateOK) readResponse(response runtime.ClientResponse, c return nil } + +// NewDcimDeviceBaysUpdateDefault creates a DcimDeviceBaysUpdateDefault with default headers values +func NewDcimDeviceBaysUpdateDefault(code int) *DcimDeviceBaysUpdateDefault { + return &DcimDeviceBaysUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceBaysUpdateDefault handles this case with default header values. + +DcimDeviceBaysUpdateDefault dcim device bays update default +*/ +type DcimDeviceBaysUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device bays update default response +func (o *DcimDeviceBaysUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceBaysUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/device-bays/{id}/][%d] dcim_device-bays_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceBaysUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceBaysUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_create_responses.go index ca75cbbea..6470d217b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceRolesCreateReader) ReadResponse(response runtime.ClientRespon return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceRolesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceRolesCreateCreated) readResponse(response runtime.ClientRespo return nil } + +// NewDcimDeviceRolesCreateDefault creates a DcimDeviceRolesCreateDefault with default headers values +func NewDcimDeviceRolesCreateDefault(code int) *DcimDeviceRolesCreateDefault { + return &DcimDeviceRolesCreateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceRolesCreateDefault handles this case with default header values. + +DcimDeviceRolesCreateDefault dcim device roles create default +*/ +type DcimDeviceRolesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device roles create default response +func (o *DcimDeviceRolesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceRolesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/device-roles/][%d] dcim_device-roles_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceRolesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceRolesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_delete_responses.go index 2b880a534..a299b81a2 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimDeviceRolesDeleteReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_list_responses.go index ba47559e6..2b6540a3c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimDeviceRolesListReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_responses.go index 91b622aba..ba846e576 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceRolesPartialUpdateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceRolesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceRolesPartialUpdateOK) readResponse(response runtime.ClientRes return nil } + +// NewDcimDeviceRolesPartialUpdateDefault creates a DcimDeviceRolesPartialUpdateDefault with default headers values +func NewDcimDeviceRolesPartialUpdateDefault(code int) *DcimDeviceRolesPartialUpdateDefault { + return &DcimDeviceRolesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceRolesPartialUpdateDefault handles this case with default header values. + +DcimDeviceRolesPartialUpdateDefault dcim device roles partial update default +*/ +type DcimDeviceRolesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device roles partial update default response +func (o *DcimDeviceRolesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceRolesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/device-roles/{id}/][%d] dcim_device-roles_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceRolesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceRolesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_read_responses.go index be0fdbe40..8067beea8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimDeviceRolesReadReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_update_responses.go index 1f01efb44..f60637148 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_roles_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceRolesUpdateReader) ReadResponse(response runtime.ClientRespon return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceRolesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceRolesUpdateOK) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimDeviceRolesUpdateDefault creates a DcimDeviceRolesUpdateDefault with default headers values +func NewDcimDeviceRolesUpdateDefault(code int) *DcimDeviceRolesUpdateDefault { + return &DcimDeviceRolesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceRolesUpdateDefault handles this case with default header values. + +DcimDeviceRolesUpdateDefault dcim device roles update default +*/ +type DcimDeviceRolesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device roles update default response +func (o *DcimDeviceRolesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceRolesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/device-roles/{id}/][%d] dcim_device-roles_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceRolesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceRolesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_create_responses.go index 40a8c781f..a9c478a9e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceTypesCreateReader) ReadResponse(response runtime.ClientRespon return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceTypesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceTypesCreateCreated) readResponse(response runtime.ClientRespo return nil } + +// NewDcimDeviceTypesCreateDefault creates a DcimDeviceTypesCreateDefault with default headers values +func NewDcimDeviceTypesCreateDefault(code int) *DcimDeviceTypesCreateDefault { + return &DcimDeviceTypesCreateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceTypesCreateDefault handles this case with default header values. + +DcimDeviceTypesCreateDefault dcim device types create default +*/ +type DcimDeviceTypesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device types create default response +func (o *DcimDeviceTypesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceTypesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/device-types/][%d] dcim_device-types_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceTypesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceTypesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_delete_responses.go index ce2551016..389083ee9 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimDeviceTypesDeleteReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_list_responses.go index 521614296..3a72a47ab 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimDeviceTypesListReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_responses.go index 06f0cf8e9..17d331398 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceTypesPartialUpdateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceTypesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceTypesPartialUpdateOK) readResponse(response runtime.ClientRes return nil } + +// NewDcimDeviceTypesPartialUpdateDefault creates a DcimDeviceTypesPartialUpdateDefault with default headers values +func NewDcimDeviceTypesPartialUpdateDefault(code int) *DcimDeviceTypesPartialUpdateDefault { + return &DcimDeviceTypesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceTypesPartialUpdateDefault handles this case with default header values. + +DcimDeviceTypesPartialUpdateDefault dcim device types partial update default +*/ +type DcimDeviceTypesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device types partial update default response +func (o *DcimDeviceTypesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceTypesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/device-types/{id}/][%d] dcim_device-types_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceTypesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceTypesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_read_responses.go index 71c7e1120..fcc20dfef 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimDeviceTypesReadReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_update_responses.go index 75a7c4999..751f00206 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_device_types_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDeviceTypesUpdateReader) ReadResponse(response runtime.ClientRespon return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDeviceTypesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDeviceTypesUpdateOK) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimDeviceTypesUpdateDefault creates a DcimDeviceTypesUpdateDefault with default headers values +func NewDcimDeviceTypesUpdateDefault(code int) *DcimDeviceTypesUpdateDefault { + return &DcimDeviceTypesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDeviceTypesUpdateDefault handles this case with default header values. + +DcimDeviceTypesUpdateDefault dcim device types update default +*/ +type DcimDeviceTypesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim device types update default response +func (o *DcimDeviceTypesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDeviceTypesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/device-types/{id}/][%d] dcim_device-types_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDeviceTypesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDeviceTypesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_create_responses.go index f89c7bfb6..7284eda0a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimDevicesCreateReader) ReadResponse(response runtime.ClientResponse, return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDevicesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDevicesCreateCreated) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimDevicesCreateDefault creates a DcimDevicesCreateDefault with default headers values +func NewDcimDevicesCreateDefault(code int) *DcimDevicesCreateDefault { + return &DcimDevicesCreateDefault{ + _statusCode: code, + } +} + +/*DcimDevicesCreateDefault handles this case with default header values. + +DcimDevicesCreateDefault dcim devices create default +*/ +type DcimDevicesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim devices create default response +func (o *DcimDevicesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDevicesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/devices/][%d] dcim_devices_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDevicesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDevicesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_delete_responses.go index c3164f716..26f5a160e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimDevicesDeleteReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_graphs_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_graphs_responses.go index a4accf12a..e842a4adf 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_graphs_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_graphs_responses.go @@ -46,7 +46,7 @@ func (o *DcimDevicesGraphsReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_list_responses.go index dceb38e9c..a318733e5 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimDevicesListReader) ReadResponse(response runtime.ClientResponse, co return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_napalm_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_napalm_responses.go index 685279dc9..67778a599 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_napalm_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_napalm_responses.go @@ -46,7 +46,7 @@ func (o *DcimDevicesNapalmReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_partial_update_responses.go index 16a09f29c..41b30d9fb 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDevicesPartialUpdateReader) ReadResponse(response runtime.ClientRes return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDevicesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDevicesPartialUpdateOK) readResponse(response runtime.ClientRespons return nil } + +// NewDcimDevicesPartialUpdateDefault creates a DcimDevicesPartialUpdateDefault with default headers values +func NewDcimDevicesPartialUpdateDefault(code int) *DcimDevicesPartialUpdateDefault { + return &DcimDevicesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDevicesPartialUpdateDefault handles this case with default header values. + +DcimDevicesPartialUpdateDefault dcim devices partial update default +*/ +type DcimDevicesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim devices partial update default response +func (o *DcimDevicesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDevicesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/devices/{id}/][%d] dcim_devices_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDevicesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDevicesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_read_responses.go index 498dc6775..367938935 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimDevicesReadReader) ReadResponse(response runtime.ClientResponse, co return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_update_responses.go index 64ac7c890..c27b60863 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_devices_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimDevicesUpdateReader) ReadResponse(response runtime.ClientResponse, return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimDevicesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimDevicesUpdateOK) readResponse(response runtime.ClientResponse, cons return nil } + +// NewDcimDevicesUpdateDefault creates a DcimDevicesUpdateDefault with default headers values +func NewDcimDevicesUpdateDefault(code int) *DcimDevicesUpdateDefault { + return &DcimDevicesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimDevicesUpdateDefault handles this case with default header values. + +DcimDevicesUpdateDefault dcim devices update default +*/ +type DcimDevicesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim devices update default response +func (o *DcimDevicesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimDevicesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/devices/{id}/][%d] dcim_devices_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimDevicesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimDevicesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_create_responses.go index ee9f3fe17..074890113 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimFrontPortTemplatesCreateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimFrontPortTemplatesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimFrontPortTemplatesCreateCreated) readResponse(response runtime.Clie return nil } + +// NewDcimFrontPortTemplatesCreateDefault creates a DcimFrontPortTemplatesCreateDefault with default headers values +func NewDcimFrontPortTemplatesCreateDefault(code int) *DcimFrontPortTemplatesCreateDefault { + return &DcimFrontPortTemplatesCreateDefault{ + _statusCode: code, + } +} + +/*DcimFrontPortTemplatesCreateDefault handles this case with default header values. + +DcimFrontPortTemplatesCreateDefault dcim front port templates create default +*/ +type DcimFrontPortTemplatesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim front port templates create default response +func (o *DcimFrontPortTemplatesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimFrontPortTemplatesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/front-port-templates/][%d] dcim_front-port-templates_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimFrontPortTemplatesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimFrontPortTemplatesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_delete_responses.go index 4d9f630fe..e3a556972 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimFrontPortTemplatesDeleteReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_list_responses.go index 3abbeaf02..59a8c1292 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimFrontPortTemplatesListReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_partial_update_responses.go index 4e849b528..fae806565 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimFrontPortTemplatesPartialUpdateReader) ReadResponse(response runtim return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimFrontPortTemplatesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimFrontPortTemplatesPartialUpdateOK) readResponse(response runtime.Cl return nil } + +// NewDcimFrontPortTemplatesPartialUpdateDefault creates a DcimFrontPortTemplatesPartialUpdateDefault with default headers values +func NewDcimFrontPortTemplatesPartialUpdateDefault(code int) *DcimFrontPortTemplatesPartialUpdateDefault { + return &DcimFrontPortTemplatesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimFrontPortTemplatesPartialUpdateDefault handles this case with default header values. + +DcimFrontPortTemplatesPartialUpdateDefault dcim front port templates partial update default +*/ +type DcimFrontPortTemplatesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim front port templates partial update default response +func (o *DcimFrontPortTemplatesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimFrontPortTemplatesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/front-port-templates/{id}/][%d] dcim_front-port-templates_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimFrontPortTemplatesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimFrontPortTemplatesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_read_responses.go index 997575eb5..31f347508 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimFrontPortTemplatesReadReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_update_responses.go index e36c3df81..8c5546ab5 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_port_templates_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimFrontPortTemplatesUpdateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimFrontPortTemplatesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimFrontPortTemplatesUpdateOK) readResponse(response runtime.ClientRes return nil } + +// NewDcimFrontPortTemplatesUpdateDefault creates a DcimFrontPortTemplatesUpdateDefault with default headers values +func NewDcimFrontPortTemplatesUpdateDefault(code int) *DcimFrontPortTemplatesUpdateDefault { + return &DcimFrontPortTemplatesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimFrontPortTemplatesUpdateDefault handles this case with default header values. + +DcimFrontPortTemplatesUpdateDefault dcim front port templates update default +*/ +type DcimFrontPortTemplatesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim front port templates update default response +func (o *DcimFrontPortTemplatesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimFrontPortTemplatesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/front-port-templates/{id}/][%d] dcim_front-port-templates_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimFrontPortTemplatesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimFrontPortTemplatesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_create_responses.go index eaec5d49a..6d3512732 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimFrontPortsCreateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimFrontPortsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimFrontPortsCreateCreated) readResponse(response runtime.ClientRespon return nil } + +// NewDcimFrontPortsCreateDefault creates a DcimFrontPortsCreateDefault with default headers values +func NewDcimFrontPortsCreateDefault(code int) *DcimFrontPortsCreateDefault { + return &DcimFrontPortsCreateDefault{ + _statusCode: code, + } +} + +/*DcimFrontPortsCreateDefault handles this case with default header values. + +DcimFrontPortsCreateDefault dcim front ports create default +*/ +type DcimFrontPortsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim front ports create default response +func (o *DcimFrontPortsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimFrontPortsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/front-ports/][%d] dcim_front-ports_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimFrontPortsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimFrontPortsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_delete_responses.go index 1094b7073..d00c7e844 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimFrontPortsDeleteReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_list_responses.go index 36799e1d0..22e3bbbad 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimFrontPortsListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_partial_update_responses.go index dbca8febe..cc5446657 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimFrontPortsPartialUpdateReader) ReadResponse(response runtime.Client return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimFrontPortsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimFrontPortsPartialUpdateOK) readResponse(response runtime.ClientResp return nil } + +// NewDcimFrontPortsPartialUpdateDefault creates a DcimFrontPortsPartialUpdateDefault with default headers values +func NewDcimFrontPortsPartialUpdateDefault(code int) *DcimFrontPortsPartialUpdateDefault { + return &DcimFrontPortsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimFrontPortsPartialUpdateDefault handles this case with default header values. + +DcimFrontPortsPartialUpdateDefault dcim front ports partial update default +*/ +type DcimFrontPortsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim front ports partial update default response +func (o *DcimFrontPortsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimFrontPortsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/front-ports/{id}/][%d] dcim_front-ports_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimFrontPortsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimFrontPortsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_read_responses.go index 35f4468d8..f3b016d01 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimFrontPortsReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_trace_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_trace_parameters.go new file mode 100644 index 000000000..ceb734231 --- /dev/null +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_trace_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewDcimFrontPortsTraceParams creates a new DcimFrontPortsTraceParams object +// with the default values initialized. +func NewDcimFrontPortsTraceParams() *DcimFrontPortsTraceParams { + var () + return &DcimFrontPortsTraceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDcimFrontPortsTraceParamsWithTimeout creates a new DcimFrontPortsTraceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDcimFrontPortsTraceParamsWithTimeout(timeout time.Duration) *DcimFrontPortsTraceParams { + var () + return &DcimFrontPortsTraceParams{ + + timeout: timeout, + } +} + +// NewDcimFrontPortsTraceParamsWithContext creates a new DcimFrontPortsTraceParams object +// with the default values initialized, and the ability to set a context for a request +func NewDcimFrontPortsTraceParamsWithContext(ctx context.Context) *DcimFrontPortsTraceParams { + var () + return &DcimFrontPortsTraceParams{ + + Context: ctx, + } +} + +// NewDcimFrontPortsTraceParamsWithHTTPClient creates a new DcimFrontPortsTraceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDcimFrontPortsTraceParamsWithHTTPClient(client *http.Client) *DcimFrontPortsTraceParams { + var () + return &DcimFrontPortsTraceParams{ + HTTPClient: client, + } +} + +/*DcimFrontPortsTraceParams contains all the parameters to send to the API endpoint +for the dcim front ports trace operation typically these are written to a http.Request +*/ +type DcimFrontPortsTraceParams struct { + + /*ID + A unique integer value identifying this front port. + + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the dcim front ports trace params +func (o *DcimFrontPortsTraceParams) WithTimeout(timeout time.Duration) *DcimFrontPortsTraceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim front ports trace params +func (o *DcimFrontPortsTraceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim front ports trace params +func (o *DcimFrontPortsTraceParams) WithContext(ctx context.Context) *DcimFrontPortsTraceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim front ports trace params +func (o *DcimFrontPortsTraceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim front ports trace params +func (o *DcimFrontPortsTraceParams) WithHTTPClient(client *http.Client) *DcimFrontPortsTraceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim front ports trace params +func (o *DcimFrontPortsTraceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim front ports trace params +func (o *DcimFrontPortsTraceParams) WithID(id int64) *DcimFrontPortsTraceParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim front ports trace params +func (o *DcimFrontPortsTraceParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimFrontPortsTraceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_trace_responses.go similarity index 50% rename from vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_list_responses.go rename to vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_trace_responses.go index c5946e3f3..dce755097 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/circuits/circuits_choices_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_trace_responses.go @@ -15,56 +15,70 @@ // limitations under the License. // -package circuits +package dcim // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" + "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" + "github.com/netbox-community/go-netbox/netbox/models" ) -// CircuitsChoicesListReader is a Reader for the CircuitsChoicesList structure. -type CircuitsChoicesListReader struct { +// DcimFrontPortsTraceReader is a Reader for the DcimFrontPortsTrace structure. +type DcimFrontPortsTraceReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *CircuitsChoicesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *DcimFrontPortsTraceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewCircuitsChoicesListOK() + result := NewDcimFrontPortsTraceOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } -// NewCircuitsChoicesListOK creates a CircuitsChoicesListOK with default headers values -func NewCircuitsChoicesListOK() *CircuitsChoicesListOK { - return &CircuitsChoicesListOK{} +// NewDcimFrontPortsTraceOK creates a DcimFrontPortsTraceOK with default headers values +func NewDcimFrontPortsTraceOK() *DcimFrontPortsTraceOK { + return &DcimFrontPortsTraceOK{} } -/*CircuitsChoicesListOK handles this case with default header values. +/*DcimFrontPortsTraceOK handles this case with default header values. -CircuitsChoicesListOK circuits choices list o k +DcimFrontPortsTraceOK dcim front ports trace o k */ -type CircuitsChoicesListOK struct { +type DcimFrontPortsTraceOK struct { + Payload *models.FrontPort } -func (o *CircuitsChoicesListOK) Error() string { - return fmt.Sprintf("[GET /circuits/_choices/][%d] circuitsChoicesListOK ", 200) +func (o *DcimFrontPortsTraceOK) Error() string { + return fmt.Sprintf("[GET /dcim/front-ports/{id}/trace/][%d] dcimFrontPortsTraceOK %+v", 200, o.Payload) } -func (o *CircuitsChoicesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *DcimFrontPortsTraceOK) GetPayload() *models.FrontPort { + return o.Payload +} + +func (o *DcimFrontPortsTraceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FrontPort) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } return nil } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_update_responses.go index 55786ef42..148eefcdf 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_front_ports_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimFrontPortsUpdateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimFrontPortsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimFrontPortsUpdateOK) readResponse(response runtime.ClientResponse, c return nil } + +// NewDcimFrontPortsUpdateDefault creates a DcimFrontPortsUpdateDefault with default headers values +func NewDcimFrontPortsUpdateDefault(code int) *DcimFrontPortsUpdateDefault { + return &DcimFrontPortsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimFrontPortsUpdateDefault handles this case with default header values. + +DcimFrontPortsUpdateDefault dcim front ports update default +*/ +type DcimFrontPortsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim front ports update default response +func (o *DcimFrontPortsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimFrontPortsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/front-ports/{id}/][%d] dcim_front-ports_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimFrontPortsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimFrontPortsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_connections_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_connections_list_responses.go index 116cac8b3..1e123bafd 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_connections_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_connections_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimInterfaceConnectionsListReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_create_responses.go index dd0fbe762..a913e0c5a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimInterfaceTemplatesCreateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInterfaceTemplatesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimInterfaceTemplatesCreateCreated) readResponse(response runtime.Clie return nil } + +// NewDcimInterfaceTemplatesCreateDefault creates a DcimInterfaceTemplatesCreateDefault with default headers values +func NewDcimInterfaceTemplatesCreateDefault(code int) *DcimInterfaceTemplatesCreateDefault { + return &DcimInterfaceTemplatesCreateDefault{ + _statusCode: code, + } +} + +/*DcimInterfaceTemplatesCreateDefault handles this case with default header values. + +DcimInterfaceTemplatesCreateDefault dcim interface templates create default +*/ +type DcimInterfaceTemplatesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim interface templates create default response +func (o *DcimInterfaceTemplatesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInterfaceTemplatesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/interface-templates/][%d] dcim_interface-templates_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInterfaceTemplatesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInterfaceTemplatesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_responses.go index 1e7e50f5c..3db5f17ea 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimInterfaceTemplatesDeleteReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_list_responses.go index a4f70fcf7..0db6991f4 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimInterfaceTemplatesListReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go index 7757d939c..c9b1f013d 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimInterfaceTemplatesPartialUpdateReader) ReadResponse(response runtim return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInterfaceTemplatesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimInterfaceTemplatesPartialUpdateOK) readResponse(response runtime.Cl return nil } + +// NewDcimInterfaceTemplatesPartialUpdateDefault creates a DcimInterfaceTemplatesPartialUpdateDefault with default headers values +func NewDcimInterfaceTemplatesPartialUpdateDefault(code int) *DcimInterfaceTemplatesPartialUpdateDefault { + return &DcimInterfaceTemplatesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimInterfaceTemplatesPartialUpdateDefault handles this case with default header values. + +DcimInterfaceTemplatesPartialUpdateDefault dcim interface templates partial update default +*/ +type DcimInterfaceTemplatesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim interface templates partial update default response +func (o *DcimInterfaceTemplatesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInterfaceTemplatesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/interface-templates/{id}/][%d] dcim_interface-templates_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInterfaceTemplatesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInterfaceTemplatesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_read_responses.go index 109606aaf..855f01647 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimInterfaceTemplatesReadReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_update_responses.go index e0ffc34d2..7864b0a36 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interface_templates_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimInterfaceTemplatesUpdateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInterfaceTemplatesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimInterfaceTemplatesUpdateOK) readResponse(response runtime.ClientRes return nil } + +// NewDcimInterfaceTemplatesUpdateDefault creates a DcimInterfaceTemplatesUpdateDefault with default headers values +func NewDcimInterfaceTemplatesUpdateDefault(code int) *DcimInterfaceTemplatesUpdateDefault { + return &DcimInterfaceTemplatesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimInterfaceTemplatesUpdateDefault handles this case with default header values. + +DcimInterfaceTemplatesUpdateDefault dcim interface templates update default +*/ +type DcimInterfaceTemplatesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim interface templates update default response +func (o *DcimInterfaceTemplatesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInterfaceTemplatesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/interface-templates/{id}/][%d] dcim_interface-templates_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInterfaceTemplatesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInterfaceTemplatesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_create_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_create_parameters.go index 220055314..10574706b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_create_parameters.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_create_parameters.go @@ -78,7 +78,7 @@ for the dcim interfaces create operation typically these are written to a http.R type DcimInterfacesCreateParams struct { /*Data*/ - Data *models.WritableDeviceInterface + Data *models.WritableInterface timeout time.Duration Context context.Context @@ -119,13 +119,13 @@ func (o *DcimInterfacesCreateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the dcim interfaces create params -func (o *DcimInterfacesCreateParams) WithData(data *models.WritableDeviceInterface) *DcimInterfacesCreateParams { +func (o *DcimInterfacesCreateParams) WithData(data *models.WritableInterface) *DcimInterfacesCreateParams { o.SetData(data) return o } // SetData adds the data to the dcim interfaces create params -func (o *DcimInterfacesCreateParams) SetData(data *models.WritableDeviceInterface) { +func (o *DcimInterfacesCreateParams) SetData(data *models.WritableInterface) { o.Data = data } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_create_responses.go index 8143ba62f..357a47bff 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimInterfacesCreateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInterfacesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -60,20 +66,20 @@ func NewDcimInterfacesCreateCreated() *DcimInterfacesCreateCreated { DcimInterfacesCreateCreated dcim interfaces create created */ type DcimInterfacesCreateCreated struct { - Payload *models.DeviceInterface + Payload *models.Interface } func (o *DcimInterfacesCreateCreated) Error() string { return fmt.Sprintf("[POST /dcim/interfaces/][%d] dcimInterfacesCreateCreated %+v", 201, o.Payload) } -func (o *DcimInterfacesCreateCreated) GetPayload() *models.DeviceInterface { +func (o *DcimInterfacesCreateCreated) GetPayload() *models.Interface { return o.Payload } func (o *DcimInterfacesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.DeviceInterface) + o.Payload = new(models.Interface) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -82,3 +88,43 @@ func (o *DcimInterfacesCreateCreated) readResponse(response runtime.ClientRespon return nil } + +// NewDcimInterfacesCreateDefault creates a DcimInterfacesCreateDefault with default headers values +func NewDcimInterfacesCreateDefault(code int) *DcimInterfacesCreateDefault { + return &DcimInterfacesCreateDefault{ + _statusCode: code, + } +} + +/*DcimInterfacesCreateDefault handles this case with default header values. + +DcimInterfacesCreateDefault dcim interfaces create default +*/ +type DcimInterfacesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim interfaces create default response +func (o *DcimInterfacesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInterfacesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/interfaces/][%d] dcim_interfaces_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInterfacesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInterfacesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_delete_responses.go index af2b15ffc..78c83d3bf 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimInterfacesDeleteReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_responses.go index bd7dbb381..125eea585 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_graphs_responses.go @@ -46,7 +46,7 @@ func (o *DcimInterfacesGraphsReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -60,20 +60,20 @@ func NewDcimInterfacesGraphsOK() *DcimInterfacesGraphsOK { DcimInterfacesGraphsOK dcim interfaces graphs o k */ type DcimInterfacesGraphsOK struct { - Payload *models.DeviceInterface + Payload *models.Interface } func (o *DcimInterfacesGraphsOK) Error() string { return fmt.Sprintf("[GET /dcim/interfaces/{id}/graphs/][%d] dcimInterfacesGraphsOK %+v", 200, o.Payload) } -func (o *DcimInterfacesGraphsOK) GetPayload() *models.DeviceInterface { +func (o *DcimInterfacesGraphsOK) GetPayload() *models.Interface { return o.Payload } func (o *DcimInterfacesGraphsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.DeviceInterface) + o.Payload = new(models.Interface) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_list_responses.go index 2424ee4bb..8b975828a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimInterfacesListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -106,7 +106,7 @@ type DcimInterfacesListOKBody struct { // results // Required: true - Results []*models.DeviceInterface `json:"results"` + Results []*models.Interface `json:"results"` } // Validate validates this dcim interfaces list o k body diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go index cb590ef67..5bf317461 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_parameters.go @@ -79,7 +79,7 @@ for the dcim interfaces partial update operation typically these are written to type DcimInterfacesPartialUpdateParams struct { /*Data*/ - Data *models.WritableDeviceInterface + Data *models.WritableInterface /*ID A unique integer value identifying this interface. @@ -125,13 +125,13 @@ func (o *DcimInterfacesPartialUpdateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the dcim interfaces partial update params -func (o *DcimInterfacesPartialUpdateParams) WithData(data *models.WritableDeviceInterface) *DcimInterfacesPartialUpdateParams { +func (o *DcimInterfacesPartialUpdateParams) WithData(data *models.WritableInterface) *DcimInterfacesPartialUpdateParams { o.SetData(data) return o } // SetData adds the data to the dcim interfaces partial update params -func (o *DcimInterfacesPartialUpdateParams) SetData(data *models.WritableDeviceInterface) { +func (o *DcimInterfacesPartialUpdateParams) SetData(data *models.WritableInterface) { o.Data = data } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_responses.go index 0fb85a118..0f95f222f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimInterfacesPartialUpdateReader) ReadResponse(response runtime.Client return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInterfacesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -60,20 +66,20 @@ func NewDcimInterfacesPartialUpdateOK() *DcimInterfacesPartialUpdateOK { DcimInterfacesPartialUpdateOK dcim interfaces partial update o k */ type DcimInterfacesPartialUpdateOK struct { - Payload *models.DeviceInterface + Payload *models.Interface } func (o *DcimInterfacesPartialUpdateOK) Error() string { return fmt.Sprintf("[PATCH /dcim/interfaces/{id}/][%d] dcimInterfacesPartialUpdateOK %+v", 200, o.Payload) } -func (o *DcimInterfacesPartialUpdateOK) GetPayload() *models.DeviceInterface { +func (o *DcimInterfacesPartialUpdateOK) GetPayload() *models.Interface { return o.Payload } func (o *DcimInterfacesPartialUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.DeviceInterface) + o.Payload = new(models.Interface) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -82,3 +88,43 @@ func (o *DcimInterfacesPartialUpdateOK) readResponse(response runtime.ClientResp return nil } + +// NewDcimInterfacesPartialUpdateDefault creates a DcimInterfacesPartialUpdateDefault with default headers values +func NewDcimInterfacesPartialUpdateDefault(code int) *DcimInterfacesPartialUpdateDefault { + return &DcimInterfacesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimInterfacesPartialUpdateDefault handles this case with default header values. + +DcimInterfacesPartialUpdateDefault dcim interfaces partial update default +*/ +type DcimInterfacesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim interfaces partial update default response +func (o *DcimInterfacesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInterfacesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/interfaces/{id}/][%d] dcim_interfaces_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInterfacesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInterfacesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_read_responses.go index 371dd5e01..8cacdacf8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimInterfacesReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -60,20 +60,20 @@ func NewDcimInterfacesReadOK() *DcimInterfacesReadOK { DcimInterfacesReadOK dcim interfaces read o k */ type DcimInterfacesReadOK struct { - Payload *models.DeviceInterface + Payload *models.Interface } func (o *DcimInterfacesReadOK) Error() string { return fmt.Sprintf("[GET /dcim/interfaces/{id}/][%d] dcimInterfacesReadOK %+v", 200, o.Payload) } -func (o *DcimInterfacesReadOK) GetPayload() *models.DeviceInterface { +func (o *DcimInterfacesReadOK) GetPayload() *models.Interface { return o.Payload } func (o *DcimInterfacesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.DeviceInterface) + o.Payload = new(models.Interface) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_trace_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_trace_responses.go index ae9c8ac5d..74335d3b4 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_trace_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_trace_responses.go @@ -46,7 +46,7 @@ func (o *DcimInterfacesTraceReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -60,20 +60,20 @@ func NewDcimInterfacesTraceOK() *DcimInterfacesTraceOK { DcimInterfacesTraceOK dcim interfaces trace o k */ type DcimInterfacesTraceOK struct { - Payload *models.DeviceInterface + Payload *models.Interface } func (o *DcimInterfacesTraceOK) Error() string { return fmt.Sprintf("[GET /dcim/interfaces/{id}/trace/][%d] dcimInterfacesTraceOK %+v", 200, o.Payload) } -func (o *DcimInterfacesTraceOK) GetPayload() *models.DeviceInterface { +func (o *DcimInterfacesTraceOK) GetPayload() *models.Interface { return o.Payload } func (o *DcimInterfacesTraceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.DeviceInterface) + o.Payload = new(models.Interface) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_update_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_update_parameters.go index 28f5e2ece..afbe6d7b8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_update_parameters.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_update_parameters.go @@ -79,7 +79,7 @@ for the dcim interfaces update operation typically these are written to a http.R type DcimInterfacesUpdateParams struct { /*Data*/ - Data *models.WritableDeviceInterface + Data *models.WritableInterface /*ID A unique integer value identifying this interface. @@ -125,13 +125,13 @@ func (o *DcimInterfacesUpdateParams) SetHTTPClient(client *http.Client) { } // WithData adds the data to the dcim interfaces update params -func (o *DcimInterfacesUpdateParams) WithData(data *models.WritableDeviceInterface) *DcimInterfacesUpdateParams { +func (o *DcimInterfacesUpdateParams) WithData(data *models.WritableInterface) *DcimInterfacesUpdateParams { o.SetData(data) return o } // SetData adds the data to the dcim interfaces update params -func (o *DcimInterfacesUpdateParams) SetData(data *models.WritableDeviceInterface) { +func (o *DcimInterfacesUpdateParams) SetData(data *models.WritableInterface) { o.Data = data } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_update_responses.go index 97b19fd40..94bbe4434 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_interfaces_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimInterfacesUpdateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInterfacesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -60,20 +66,20 @@ func NewDcimInterfacesUpdateOK() *DcimInterfacesUpdateOK { DcimInterfacesUpdateOK dcim interfaces update o k */ type DcimInterfacesUpdateOK struct { - Payload *models.DeviceInterface + Payload *models.Interface } func (o *DcimInterfacesUpdateOK) Error() string { return fmt.Sprintf("[PUT /dcim/interfaces/{id}/][%d] dcimInterfacesUpdateOK %+v", 200, o.Payload) } -func (o *DcimInterfacesUpdateOK) GetPayload() *models.DeviceInterface { +func (o *DcimInterfacesUpdateOK) GetPayload() *models.Interface { return o.Payload } func (o *DcimInterfacesUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.DeviceInterface) + o.Payload = new(models.Interface) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -82,3 +88,43 @@ func (o *DcimInterfacesUpdateOK) readResponse(response runtime.ClientResponse, c return nil } + +// NewDcimInterfacesUpdateDefault creates a DcimInterfacesUpdateDefault with default headers values +func NewDcimInterfacesUpdateDefault(code int) *DcimInterfacesUpdateDefault { + return &DcimInterfacesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimInterfacesUpdateDefault handles this case with default header values. + +DcimInterfacesUpdateDefault dcim interfaces update default +*/ +type DcimInterfacesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim interfaces update default response +func (o *DcimInterfacesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInterfacesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/interfaces/{id}/][%d] dcim_interfaces_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInterfacesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInterfacesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_create_responses.go index 369bc11d1..062e2156c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimInventoryItemsCreateReader) ReadResponse(response runtime.ClientRes return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInventoryItemsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimInventoryItemsCreateCreated) readResponse(response runtime.ClientRe return nil } + +// NewDcimInventoryItemsCreateDefault creates a DcimInventoryItemsCreateDefault with default headers values +func NewDcimInventoryItemsCreateDefault(code int) *DcimInventoryItemsCreateDefault { + return &DcimInventoryItemsCreateDefault{ + _statusCode: code, + } +} + +/*DcimInventoryItemsCreateDefault handles this case with default header values. + +DcimInventoryItemsCreateDefault dcim inventory items create default +*/ +type DcimInventoryItemsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim inventory items create default response +func (o *DcimInventoryItemsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInventoryItemsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/inventory-items/][%d] dcim_inventory-items_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInventoryItemsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInventoryItemsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_responses.go index 3c1dbdd74..22d2762c8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimInventoryItemsDeleteReader) ReadResponse(response runtime.ClientRes return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_list_responses.go index 27cdcf734..1744e07c7 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimInventoryItemsListReader) ReadResponse(response runtime.ClientRespo return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go index 078829ee9..e293067ef 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimInventoryItemsPartialUpdateReader) ReadResponse(response runtime.Cl return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInventoryItemsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimInventoryItemsPartialUpdateOK) readResponse(response runtime.Client return nil } + +// NewDcimInventoryItemsPartialUpdateDefault creates a DcimInventoryItemsPartialUpdateDefault with default headers values +func NewDcimInventoryItemsPartialUpdateDefault(code int) *DcimInventoryItemsPartialUpdateDefault { + return &DcimInventoryItemsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimInventoryItemsPartialUpdateDefault handles this case with default header values. + +DcimInventoryItemsPartialUpdateDefault dcim inventory items partial update default +*/ +type DcimInventoryItemsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim inventory items partial update default response +func (o *DcimInventoryItemsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInventoryItemsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/inventory-items/{id}/][%d] dcim_inventory-items_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInventoryItemsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInventoryItemsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_read_responses.go index 4c35bafb5..9a6d61876 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimInventoryItemsReadReader) ReadResponse(response runtime.ClientRespo return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_update_responses.go index 789358ded..ca6351d4f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_inventory_items_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimInventoryItemsUpdateReader) ReadResponse(response runtime.ClientRes return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimInventoryItemsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimInventoryItemsUpdateOK) readResponse(response runtime.ClientRespons return nil } + +// NewDcimInventoryItemsUpdateDefault creates a DcimInventoryItemsUpdateDefault with default headers values +func NewDcimInventoryItemsUpdateDefault(code int) *DcimInventoryItemsUpdateDefault { + return &DcimInventoryItemsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimInventoryItemsUpdateDefault handles this case with default header values. + +DcimInventoryItemsUpdateDefault dcim inventory items update default +*/ +type DcimInventoryItemsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim inventory items update default response +func (o *DcimInventoryItemsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimInventoryItemsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/inventory-items/{id}/][%d] dcim_inventory-items_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimInventoryItemsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimInventoryItemsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_create_responses.go index d5882093a..00579c6ea 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimManufacturersCreateReader) ReadResponse(response runtime.ClientResp return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimManufacturersCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimManufacturersCreateCreated) readResponse(response runtime.ClientRes return nil } + +// NewDcimManufacturersCreateDefault creates a DcimManufacturersCreateDefault with default headers values +func NewDcimManufacturersCreateDefault(code int) *DcimManufacturersCreateDefault { + return &DcimManufacturersCreateDefault{ + _statusCode: code, + } +} + +/*DcimManufacturersCreateDefault handles this case with default header values. + +DcimManufacturersCreateDefault dcim manufacturers create default +*/ +type DcimManufacturersCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim manufacturers create default response +func (o *DcimManufacturersCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimManufacturersCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/manufacturers/][%d] dcim_manufacturers_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimManufacturersCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimManufacturersCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_responses.go index 30747b341..719fe2b83 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimManufacturersDeleteReader) ReadResponse(response runtime.ClientResp return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_list_responses.go index 9c90fff32..22076da2e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimManufacturersListReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go index 181ed7cc5..ebae5e32b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimManufacturersPartialUpdateReader) ReadResponse(response runtime.Cli return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimManufacturersPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimManufacturersPartialUpdateOK) readResponse(response runtime.ClientR return nil } + +// NewDcimManufacturersPartialUpdateDefault creates a DcimManufacturersPartialUpdateDefault with default headers values +func NewDcimManufacturersPartialUpdateDefault(code int) *DcimManufacturersPartialUpdateDefault { + return &DcimManufacturersPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimManufacturersPartialUpdateDefault handles this case with default header values. + +DcimManufacturersPartialUpdateDefault dcim manufacturers partial update default +*/ +type DcimManufacturersPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim manufacturers partial update default response +func (o *DcimManufacturersPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimManufacturersPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/manufacturers/{id}/][%d] dcim_manufacturers_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimManufacturersPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimManufacturersPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_read_responses.go index d4e5122bb..7a92ffa20 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimManufacturersReadReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_update_responses.go index a43625d4b..dd9e43997 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_manufacturers_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimManufacturersUpdateReader) ReadResponse(response runtime.ClientResp return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimManufacturersUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimManufacturersUpdateOK) readResponse(response runtime.ClientResponse return nil } + +// NewDcimManufacturersUpdateDefault creates a DcimManufacturersUpdateDefault with default headers values +func NewDcimManufacturersUpdateDefault(code int) *DcimManufacturersUpdateDefault { + return &DcimManufacturersUpdateDefault{ + _statusCode: code, + } +} + +/*DcimManufacturersUpdateDefault handles this case with default header values. + +DcimManufacturersUpdateDefault dcim manufacturers update default +*/ +type DcimManufacturersUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim manufacturers update default response +func (o *DcimManufacturersUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimManufacturersUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/manufacturers/{id}/][%d] dcim_manufacturers_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimManufacturersUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimManufacturersUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_create_responses.go index 45a738173..763617f12 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimPlatformsCreateReader) ReadResponse(response runtime.ClientResponse return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPlatformsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPlatformsCreateCreated) readResponse(response runtime.ClientRespons return nil } + +// NewDcimPlatformsCreateDefault creates a DcimPlatformsCreateDefault with default headers values +func NewDcimPlatformsCreateDefault(code int) *DcimPlatformsCreateDefault { + return &DcimPlatformsCreateDefault{ + _statusCode: code, + } +} + +/*DcimPlatformsCreateDefault handles this case with default header values. + +DcimPlatformsCreateDefault dcim platforms create default +*/ +type DcimPlatformsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim platforms create default response +func (o *DcimPlatformsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPlatformsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/platforms/][%d] dcim_platforms_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPlatformsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPlatformsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_delete_responses.go index 6c3707c01..fccd193d5 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimPlatformsDeleteReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_list_responses.go index d60b457ba..058fab40f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimPlatformsListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_responses.go index 7fb97c4fd..c2a85817c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPlatformsPartialUpdateReader) ReadResponse(response runtime.ClientR return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPlatformsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPlatformsPartialUpdateOK) readResponse(response runtime.ClientRespo return nil } + +// NewDcimPlatformsPartialUpdateDefault creates a DcimPlatformsPartialUpdateDefault with default headers values +func NewDcimPlatformsPartialUpdateDefault(code int) *DcimPlatformsPartialUpdateDefault { + return &DcimPlatformsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPlatformsPartialUpdateDefault handles this case with default header values. + +DcimPlatformsPartialUpdateDefault dcim platforms partial update default +*/ +type DcimPlatformsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim platforms partial update default response +func (o *DcimPlatformsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPlatformsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/platforms/{id}/][%d] dcim_platforms_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPlatformsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPlatformsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_read_responses.go index 3c59825a4..2d74ab9c6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimPlatformsReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_update_responses.go index f28606707..368b25cea 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_platforms_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPlatformsUpdateReader) ReadResponse(response runtime.ClientResponse return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPlatformsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPlatformsUpdateOK) readResponse(response runtime.ClientResponse, co return nil } + +// NewDcimPlatformsUpdateDefault creates a DcimPlatformsUpdateDefault with default headers values +func NewDcimPlatformsUpdateDefault(code int) *DcimPlatformsUpdateDefault { + return &DcimPlatformsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPlatformsUpdateDefault handles this case with default header values. + +DcimPlatformsUpdateDefault dcim platforms update default +*/ +type DcimPlatformsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim platforms update default response +func (o *DcimPlatformsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPlatformsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/platforms/{id}/][%d] dcim_platforms_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPlatformsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPlatformsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_connections_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_connections_list_responses.go index a41d4f4d2..69d36f525 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_connections_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_connections_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimPowerConnectionsListReader) ReadResponse(response runtime.ClientRes return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_create_responses.go index db9d0fb68..8286f237f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerFeedsCreateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerFeedsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerFeedsCreateCreated) readResponse(response runtime.ClientRespon return nil } + +// NewDcimPowerFeedsCreateDefault creates a DcimPowerFeedsCreateDefault with default headers values +func NewDcimPowerFeedsCreateDefault(code int) *DcimPowerFeedsCreateDefault { + return &DcimPowerFeedsCreateDefault{ + _statusCode: code, + } +} + +/*DcimPowerFeedsCreateDefault handles this case with default header values. + +DcimPowerFeedsCreateDefault dcim power feeds create default +*/ +type DcimPowerFeedsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power feeds create default response +func (o *DcimPowerFeedsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerFeedsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/power-feeds/][%d] dcim_power-feeds_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerFeedsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerFeedsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_delete_responses.go index 6f02cc03e..3c318d7ad 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimPowerFeedsDeleteReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_list_responses.go index 79d04c401..fd604bed9 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimPowerFeedsListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_partial_update_responses.go index c2df4104b..091e594b9 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerFeedsPartialUpdateReader) ReadResponse(response runtime.Client return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerFeedsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerFeedsPartialUpdateOK) readResponse(response runtime.ClientResp return nil } + +// NewDcimPowerFeedsPartialUpdateDefault creates a DcimPowerFeedsPartialUpdateDefault with default headers values +func NewDcimPowerFeedsPartialUpdateDefault(code int) *DcimPowerFeedsPartialUpdateDefault { + return &DcimPowerFeedsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerFeedsPartialUpdateDefault handles this case with default header values. + +DcimPowerFeedsPartialUpdateDefault dcim power feeds partial update default +*/ +type DcimPowerFeedsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power feeds partial update default response +func (o *DcimPowerFeedsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerFeedsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/power-feeds/{id}/][%d] dcim_power-feeds_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerFeedsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerFeedsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_read_responses.go index f648d6eeb..44cad4be4 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimPowerFeedsReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_update_responses.go index 31213d810..004b6aa7e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_feeds_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerFeedsUpdateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerFeedsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerFeedsUpdateOK) readResponse(response runtime.ClientResponse, c return nil } + +// NewDcimPowerFeedsUpdateDefault creates a DcimPowerFeedsUpdateDefault with default headers values +func NewDcimPowerFeedsUpdateDefault(code int) *DcimPowerFeedsUpdateDefault { + return &DcimPowerFeedsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerFeedsUpdateDefault handles this case with default header values. + +DcimPowerFeedsUpdateDefault dcim power feeds update default +*/ +type DcimPowerFeedsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power feeds update default response +func (o *DcimPowerFeedsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerFeedsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/power-feeds/{id}/][%d] dcim_power-feeds_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerFeedsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerFeedsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go index bd408ee56..9db0e288e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerOutletTemplatesCreateReader) ReadResponse(response runtime.Cli return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerOutletTemplatesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerOutletTemplatesCreateCreated) readResponse(response runtime.Cl return nil } + +// NewDcimPowerOutletTemplatesCreateDefault creates a DcimPowerOutletTemplatesCreateDefault with default headers values +func NewDcimPowerOutletTemplatesCreateDefault(code int) *DcimPowerOutletTemplatesCreateDefault { + return &DcimPowerOutletTemplatesCreateDefault{ + _statusCode: code, + } +} + +/*DcimPowerOutletTemplatesCreateDefault handles this case with default header values. + +DcimPowerOutletTemplatesCreateDefault dcim power outlet templates create default +*/ +type DcimPowerOutletTemplatesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power outlet templates create default response +func (o *DcimPowerOutletTemplatesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerOutletTemplatesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/power-outlet-templates/][%d] dcim_power-outlet-templates_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerOutletTemplatesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerOutletTemplatesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go index 4cc661f5a..7714962af 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimPowerOutletTemplatesDeleteReader) ReadResponse(response runtime.Cli return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go index 2f59df003..df629c2e6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimPowerOutletTemplatesListReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go index bad8422d0..312298dab 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerOutletTemplatesPartialUpdateReader) ReadResponse(response runt return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerOutletTemplatesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerOutletTemplatesPartialUpdateOK) readResponse(response runtime. return nil } + +// NewDcimPowerOutletTemplatesPartialUpdateDefault creates a DcimPowerOutletTemplatesPartialUpdateDefault with default headers values +func NewDcimPowerOutletTemplatesPartialUpdateDefault(code int) *DcimPowerOutletTemplatesPartialUpdateDefault { + return &DcimPowerOutletTemplatesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerOutletTemplatesPartialUpdateDefault handles this case with default header values. + +DcimPowerOutletTemplatesPartialUpdateDefault dcim power outlet templates partial update default +*/ +type DcimPowerOutletTemplatesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power outlet templates partial update default response +func (o *DcimPowerOutletTemplatesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerOutletTemplatesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/power-outlet-templates/{id}/][%d] dcim_power-outlet-templates_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerOutletTemplatesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerOutletTemplatesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go index 7468381ae..9d3771ba5 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimPowerOutletTemplatesReadReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go index f9f401b8d..d895d3f16 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlet_templates_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerOutletTemplatesUpdateReader) ReadResponse(response runtime.Cli return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerOutletTemplatesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerOutletTemplatesUpdateOK) readResponse(response runtime.ClientR return nil } + +// NewDcimPowerOutletTemplatesUpdateDefault creates a DcimPowerOutletTemplatesUpdateDefault with default headers values +func NewDcimPowerOutletTemplatesUpdateDefault(code int) *DcimPowerOutletTemplatesUpdateDefault { + return &DcimPowerOutletTemplatesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerOutletTemplatesUpdateDefault handles this case with default header values. + +DcimPowerOutletTemplatesUpdateDefault dcim power outlet templates update default +*/ +type DcimPowerOutletTemplatesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power outlet templates update default response +func (o *DcimPowerOutletTemplatesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerOutletTemplatesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/power-outlet-templates/{id}/][%d] dcim_power-outlet-templates_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerOutletTemplatesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerOutletTemplatesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_create_responses.go index 29b5a530a..50ba0233c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerOutletsCreateReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerOutletsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerOutletsCreateCreated) readResponse(response runtime.ClientResp return nil } + +// NewDcimPowerOutletsCreateDefault creates a DcimPowerOutletsCreateDefault with default headers values +func NewDcimPowerOutletsCreateDefault(code int) *DcimPowerOutletsCreateDefault { + return &DcimPowerOutletsCreateDefault{ + _statusCode: code, + } +} + +/*DcimPowerOutletsCreateDefault handles this case with default header values. + +DcimPowerOutletsCreateDefault dcim power outlets create default +*/ +type DcimPowerOutletsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power outlets create default response +func (o *DcimPowerOutletsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerOutletsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/power-outlets/][%d] dcim_power-outlets_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerOutletsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerOutletsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_responses.go index 4d3aabdbc..7d015342b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimPowerOutletsDeleteReader) ReadResponse(response runtime.ClientRespo return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_list_responses.go index c5762a2e9..aca653785 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimPowerOutletsListReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go index 997ca981e..1d44d1af3 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerOutletsPartialUpdateReader) ReadResponse(response runtime.Clie return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerOutletsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerOutletsPartialUpdateOK) readResponse(response runtime.ClientRe return nil } + +// NewDcimPowerOutletsPartialUpdateDefault creates a DcimPowerOutletsPartialUpdateDefault with default headers values +func NewDcimPowerOutletsPartialUpdateDefault(code int) *DcimPowerOutletsPartialUpdateDefault { + return &DcimPowerOutletsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerOutletsPartialUpdateDefault handles this case with default header values. + +DcimPowerOutletsPartialUpdateDefault dcim power outlets partial update default +*/ +type DcimPowerOutletsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power outlets partial update default response +func (o *DcimPowerOutletsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerOutletsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/power-outlets/{id}/][%d] dcim_power-outlets_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerOutletsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerOutletsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_read_responses.go index fca647a70..ee8d5bc40 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimPowerOutletsReadReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_trace_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_trace_responses.go index 25e0ab42a..1522cb3b6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_trace_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_trace_responses.go @@ -46,7 +46,7 @@ func (o *DcimPowerOutletsTraceReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_update_responses.go index 3a9e0245f..99f2b7adc 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_outlets_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerOutletsUpdateReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerOutletsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerOutletsUpdateOK) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimPowerOutletsUpdateDefault creates a DcimPowerOutletsUpdateDefault with default headers values +func NewDcimPowerOutletsUpdateDefault(code int) *DcimPowerOutletsUpdateDefault { + return &DcimPowerOutletsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerOutletsUpdateDefault handles this case with default header values. + +DcimPowerOutletsUpdateDefault dcim power outlets update default +*/ +type DcimPowerOutletsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power outlets update default response +func (o *DcimPowerOutletsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerOutletsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/power-outlets/{id}/][%d] dcim_power-outlets_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerOutletsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerOutletsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_create_responses.go index 94a64bb2f..e274c782e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPanelsCreateReader) ReadResponse(response runtime.ClientRespon return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPanelsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPanelsCreateCreated) readResponse(response runtime.ClientRespo return nil } + +// NewDcimPowerPanelsCreateDefault creates a DcimPowerPanelsCreateDefault with default headers values +func NewDcimPowerPanelsCreateDefault(code int) *DcimPowerPanelsCreateDefault { + return &DcimPowerPanelsCreateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPanelsCreateDefault handles this case with default header values. + +DcimPowerPanelsCreateDefault dcim power panels create default +*/ +type DcimPowerPanelsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power panels create default response +func (o *DcimPowerPanelsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPanelsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/power-panels/][%d] dcim_power-panels_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPanelsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPanelsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_delete_responses.go index 78584a98e..97b06915f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimPowerPanelsDeleteReader) ReadResponse(response runtime.ClientRespon return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_list_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_list_parameters.go index 502ac6a17..2cdcd0d86 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_list_parameters.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_list_parameters.go @@ -140,6 +140,10 @@ type DcimPowerPanelsListParams struct { SiteID *string /*SiteIDn*/ SiteIDn *string + /*Tag*/ + Tag *string + /*Tagn*/ + Tagn *string timeout time.Duration Context context.Context @@ -498,6 +502,28 @@ func (o *DcimPowerPanelsListParams) SetSiteIDn(siteIDn *string) { o.SiteIDn = siteIDn } +// WithTag adds the tag to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithTag(tag *string) *DcimPowerPanelsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim power panels list params +func (o *DcimPowerPanelsListParams) WithTagn(tagn *string) *DcimPowerPanelsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim power panels list params +func (o *DcimPowerPanelsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WriteToRequest writes these params to a swagger request func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -970,6 +996,38 @@ func (o *DcimPowerPanelsListParams) WriteToRequest(r runtime.ClientRequest, reg } + if o.Tag != nil { + + // query param tag + var qrTag string + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + + } + + if o.Tagn != nil { + + // query param tag__n + var qrTagn string + if o.Tagn != nil { + qrTagn = *o.Tagn + } + qTagn := qrTagn + if qTagn != "" { + if err := r.SetQueryParam("tag__n", qTagn); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_list_responses.go index 53c4603f1..645b76b09 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimPowerPanelsListReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_partial_update_responses.go index b85c8e47f..56e4d3b0c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPanelsPartialUpdateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPanelsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPanelsPartialUpdateOK) readResponse(response runtime.ClientRes return nil } + +// NewDcimPowerPanelsPartialUpdateDefault creates a DcimPowerPanelsPartialUpdateDefault with default headers values +func NewDcimPowerPanelsPartialUpdateDefault(code int) *DcimPowerPanelsPartialUpdateDefault { + return &DcimPowerPanelsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPanelsPartialUpdateDefault handles this case with default header values. + +DcimPowerPanelsPartialUpdateDefault dcim power panels partial update default +*/ +type DcimPowerPanelsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power panels partial update default response +func (o *DcimPowerPanelsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPanelsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/power-panels/{id}/][%d] dcim_power-panels_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPanelsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPanelsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_read_responses.go index 23de2996b..2c295b293 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimPowerPanelsReadReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_update_responses.go index 47c14d9cc..83f9aefae 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_panels_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPanelsUpdateReader) ReadResponse(response runtime.ClientRespon return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPanelsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPanelsUpdateOK) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimPowerPanelsUpdateDefault creates a DcimPowerPanelsUpdateDefault with default headers values +func NewDcimPowerPanelsUpdateDefault(code int) *DcimPowerPanelsUpdateDefault { + return &DcimPowerPanelsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPanelsUpdateDefault handles this case with default header values. + +DcimPowerPanelsUpdateDefault dcim power panels update default +*/ +type DcimPowerPanelsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power panels update default response +func (o *DcimPowerPanelsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPanelsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/power-panels/{id}/][%d] dcim_power-panels_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPanelsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPanelsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_responses.go index 9e7319d1d..035852443 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPortTemplatesCreateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPortTemplatesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPortTemplatesCreateCreated) readResponse(response runtime.Clie return nil } + +// NewDcimPowerPortTemplatesCreateDefault creates a DcimPowerPortTemplatesCreateDefault with default headers values +func NewDcimPowerPortTemplatesCreateDefault(code int) *DcimPowerPortTemplatesCreateDefault { + return &DcimPowerPortTemplatesCreateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPortTemplatesCreateDefault handles this case with default header values. + +DcimPowerPortTemplatesCreateDefault dcim power port templates create default +*/ +type DcimPowerPortTemplatesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power port templates create default response +func (o *DcimPowerPortTemplatesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPortTemplatesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/power-port-templates/][%d] dcim_power-port-templates_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPortTemplatesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPortTemplatesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_responses.go index c8dbe91dc..a11b842ba 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimPowerPortTemplatesDeleteReader) ReadResponse(response runtime.Clien return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_responses.go index dadac8b81..f052b4b1c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimPowerPortTemplatesListReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go index 46727e977..0d2c766d8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPortTemplatesPartialUpdateReader) ReadResponse(response runtim return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPortTemplatesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPortTemplatesPartialUpdateOK) readResponse(response runtime.Cl return nil } + +// NewDcimPowerPortTemplatesPartialUpdateDefault creates a DcimPowerPortTemplatesPartialUpdateDefault with default headers values +func NewDcimPowerPortTemplatesPartialUpdateDefault(code int) *DcimPowerPortTemplatesPartialUpdateDefault { + return &DcimPowerPortTemplatesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPortTemplatesPartialUpdateDefault handles this case with default header values. + +DcimPowerPortTemplatesPartialUpdateDefault dcim power port templates partial update default +*/ +type DcimPowerPortTemplatesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power port templates partial update default response +func (o *DcimPowerPortTemplatesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPortTemplatesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/power-port-templates/{id}/][%d] dcim_power-port-templates_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPortTemplatesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPortTemplatesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_responses.go index 9124614cf..fd27d82f0 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimPowerPortTemplatesReadReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_responses.go index a9b8c8467..4ecd16d85 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_port_templates_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPortTemplatesUpdateReader) ReadResponse(response runtime.Clien return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPortTemplatesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPortTemplatesUpdateOK) readResponse(response runtime.ClientRes return nil } + +// NewDcimPowerPortTemplatesUpdateDefault creates a DcimPowerPortTemplatesUpdateDefault with default headers values +func NewDcimPowerPortTemplatesUpdateDefault(code int) *DcimPowerPortTemplatesUpdateDefault { + return &DcimPowerPortTemplatesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPortTemplatesUpdateDefault handles this case with default header values. + +DcimPowerPortTemplatesUpdateDefault dcim power port templates update default +*/ +type DcimPowerPortTemplatesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power port templates update default response +func (o *DcimPowerPortTemplatesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPortTemplatesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/power-port-templates/{id}/][%d] dcim_power-port-templates_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPortTemplatesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPortTemplatesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_create_responses.go index f4ad1aae5..8040e15b9 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPortsCreateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPortsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPortsCreateCreated) readResponse(response runtime.ClientRespon return nil } + +// NewDcimPowerPortsCreateDefault creates a DcimPowerPortsCreateDefault with default headers values +func NewDcimPowerPortsCreateDefault(code int) *DcimPowerPortsCreateDefault { + return &DcimPowerPortsCreateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPortsCreateDefault handles this case with default header values. + +DcimPowerPortsCreateDefault dcim power ports create default +*/ +type DcimPowerPortsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power ports create default response +func (o *DcimPowerPortsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPortsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/power-ports/][%d] dcim_power-ports_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPortsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPortsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_delete_responses.go index 62ecb75bc..7f10ad352 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimPowerPortsDeleteReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_list_responses.go index 4cc01dfbd..66ce4ac7b 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimPowerPortsListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_responses.go index f0116426b..b05199e10 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPortsPartialUpdateReader) ReadResponse(response runtime.Client return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPortsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPortsPartialUpdateOK) readResponse(response runtime.ClientResp return nil } + +// NewDcimPowerPortsPartialUpdateDefault creates a DcimPowerPortsPartialUpdateDefault with default headers values +func NewDcimPowerPortsPartialUpdateDefault(code int) *DcimPowerPortsPartialUpdateDefault { + return &DcimPowerPortsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPortsPartialUpdateDefault handles this case with default header values. + +DcimPowerPortsPartialUpdateDefault dcim power ports partial update default +*/ +type DcimPowerPortsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power ports partial update default response +func (o *DcimPowerPortsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPortsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/power-ports/{id}/][%d] dcim_power-ports_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPortsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPortsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_read_responses.go index 3e564187b..1ae7516c3 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimPowerPortsReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_trace_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_trace_responses.go index f0e01df2c..8a359f39c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_trace_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_trace_responses.go @@ -46,7 +46,7 @@ func (o *DcimPowerPortsTraceReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_update_responses.go index 428b22ba8..780f75970 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_power_ports_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimPowerPortsUpdateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimPowerPortsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimPowerPortsUpdateOK) readResponse(response runtime.ClientResponse, c return nil } + +// NewDcimPowerPortsUpdateDefault creates a DcimPowerPortsUpdateDefault with default headers values +func NewDcimPowerPortsUpdateDefault(code int) *DcimPowerPortsUpdateDefault { + return &DcimPowerPortsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimPowerPortsUpdateDefault handles this case with default header values. + +DcimPowerPortsUpdateDefault dcim power ports update default +*/ +type DcimPowerPortsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim power ports update default response +func (o *DcimPowerPortsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimPowerPortsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/power-ports/{id}/][%d] dcim_power-ports_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimPowerPortsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimPowerPortsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_create_responses.go index d0bcaae02..dbe600a44 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackGroupsCreateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackGroupsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackGroupsCreateCreated) readResponse(response runtime.ClientRespon return nil } + +// NewDcimRackGroupsCreateDefault creates a DcimRackGroupsCreateDefault with default headers values +func NewDcimRackGroupsCreateDefault(code int) *DcimRackGroupsCreateDefault { + return &DcimRackGroupsCreateDefault{ + _statusCode: code, + } +} + +/*DcimRackGroupsCreateDefault handles this case with default header values. + +DcimRackGroupsCreateDefault dcim rack groups create default +*/ +type DcimRackGroupsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack groups create default response +func (o *DcimRackGroupsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackGroupsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/rack-groups/][%d] dcim_rack-groups_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackGroupsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackGroupsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_responses.go index 3e7daa7a4..585a0a07a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimRackGroupsDeleteReader) ReadResponse(response runtime.ClientRespons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_list_responses.go index 01dc27d2a..226b6f893 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimRackGroupsListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go index 1b8799a12..98edfda08 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackGroupsPartialUpdateReader) ReadResponse(response runtime.Client return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackGroupsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackGroupsPartialUpdateOK) readResponse(response runtime.ClientResp return nil } + +// NewDcimRackGroupsPartialUpdateDefault creates a DcimRackGroupsPartialUpdateDefault with default headers values +func NewDcimRackGroupsPartialUpdateDefault(code int) *DcimRackGroupsPartialUpdateDefault { + return &DcimRackGroupsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRackGroupsPartialUpdateDefault handles this case with default header values. + +DcimRackGroupsPartialUpdateDefault dcim rack groups partial update default +*/ +type DcimRackGroupsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack groups partial update default response +func (o *DcimRackGroupsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackGroupsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/rack-groups/{id}/][%d] dcim_rack-groups_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackGroupsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackGroupsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_read_responses.go index d02f1f4c8..3bcee2f8c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimRackGroupsReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_update_responses.go index ec3bd65e1..28824c5ac 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_groups_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackGroupsUpdateReader) ReadResponse(response runtime.ClientRespons return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackGroupsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackGroupsUpdateOK) readResponse(response runtime.ClientResponse, c return nil } + +// NewDcimRackGroupsUpdateDefault creates a DcimRackGroupsUpdateDefault with default headers values +func NewDcimRackGroupsUpdateDefault(code int) *DcimRackGroupsUpdateDefault { + return &DcimRackGroupsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRackGroupsUpdateDefault handles this case with default header values. + +DcimRackGroupsUpdateDefault dcim rack groups update default +*/ +type DcimRackGroupsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack groups update default response +func (o *DcimRackGroupsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackGroupsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/rack-groups/{id}/][%d] dcim_rack-groups_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackGroupsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackGroupsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_responses.go index c899cb0f2..cc1107bc8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackReservationsCreateReader) ReadResponse(response runtime.ClientR return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackReservationsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackReservationsCreateCreated) readResponse(response runtime.Client return nil } + +// NewDcimRackReservationsCreateDefault creates a DcimRackReservationsCreateDefault with default headers values +func NewDcimRackReservationsCreateDefault(code int) *DcimRackReservationsCreateDefault { + return &DcimRackReservationsCreateDefault{ + _statusCode: code, + } +} + +/*DcimRackReservationsCreateDefault handles this case with default header values. + +DcimRackReservationsCreateDefault dcim rack reservations create default +*/ +type DcimRackReservationsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack reservations create default response +func (o *DcimRackReservationsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackReservationsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/rack-reservations/][%d] dcim_rack-reservations_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackReservationsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackReservationsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_responses.go index b25a283ed..995965783 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimRackReservationsDeleteReader) ReadResponse(response runtime.ClientR return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_parameters.go index 1c1b1eea0..452e51b0d 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_parameters.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_parameters.go @@ -132,6 +132,10 @@ type DcimRackReservationsListParams struct { SiteID *string /*SiteIDn*/ SiteIDn *string + /*Tag*/ + Tag *string + /*Tagn*/ + Tagn *string /*Tenant*/ Tenant *string /*Tenantn*/ @@ -470,6 +474,28 @@ func (o *DcimRackReservationsListParams) SetSiteIDn(siteIDn *string) { o.SiteIDn = siteIDn } +// WithTag adds the tag to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithTag(tag *string) *DcimRackReservationsListParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetTag(tag *string) { + o.Tag = tag +} + +// WithTagn adds the tagn to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) WithTagn(tagn *string) *DcimRackReservationsListParams { + o.SetTagn(tagn) + return o +} + +// SetTagn adds the tagN to the dcim rack reservations list params +func (o *DcimRackReservationsListParams) SetTagn(tagn *string) { + o.Tagn = tagn +} + // WithTenant adds the tenant to the dcim rack reservations list params func (o *DcimRackReservationsListParams) WithTenant(tenant *string) *DcimRackReservationsListParams { o.SetTenant(tenant) @@ -1010,6 +1036,38 @@ func (o *DcimRackReservationsListParams) WriteToRequest(r runtime.ClientRequest, } + if o.Tag != nil { + + // query param tag + var qrTag string + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + + } + + if o.Tagn != nil { + + // query param tag__n + var qrTagn string + if o.Tagn != nil { + qrTagn = *o.Tagn + } + qTagn := qrTagn + if qTagn != "" { + if err := r.SetQueryParam("tag__n", qTagn); err != nil { + return err + } + } + + } + if o.Tenant != nil { // query param tenant diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_responses.go index cb81ed628..bc960ecb5 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimRackReservationsListReader) ReadResponse(response runtime.ClientRes return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go index 3afd55485..9f9462803 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackReservationsPartialUpdateReader) ReadResponse(response runtime. return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackReservationsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackReservationsPartialUpdateOK) readResponse(response runtime.Clie return nil } + +// NewDcimRackReservationsPartialUpdateDefault creates a DcimRackReservationsPartialUpdateDefault with default headers values +func NewDcimRackReservationsPartialUpdateDefault(code int) *DcimRackReservationsPartialUpdateDefault { + return &DcimRackReservationsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRackReservationsPartialUpdateDefault handles this case with default header values. + +DcimRackReservationsPartialUpdateDefault dcim rack reservations partial update default +*/ +type DcimRackReservationsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack reservations partial update default response +func (o *DcimRackReservationsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackReservationsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/rack-reservations/{id}/][%d] dcim_rack-reservations_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackReservationsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackReservationsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_responses.go index f8149312e..5faa6b5ce 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimRackReservationsReadReader) ReadResponse(response runtime.ClientRes return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_responses.go index 445ebec49..fa04d3853 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_reservations_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackReservationsUpdateReader) ReadResponse(response runtime.ClientR return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackReservationsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackReservationsUpdateOK) readResponse(response runtime.ClientRespo return nil } + +// NewDcimRackReservationsUpdateDefault creates a DcimRackReservationsUpdateDefault with default headers values +func NewDcimRackReservationsUpdateDefault(code int) *DcimRackReservationsUpdateDefault { + return &DcimRackReservationsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRackReservationsUpdateDefault handles this case with default header values. + +DcimRackReservationsUpdateDefault dcim rack reservations update default +*/ +type DcimRackReservationsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack reservations update default response +func (o *DcimRackReservationsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackReservationsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/rack-reservations/{id}/][%d] dcim_rack-reservations_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackReservationsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackReservationsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_create_responses.go index 625f6be5f..e2b7032d0 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackRolesCreateReader) ReadResponse(response runtime.ClientResponse return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackRolesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackRolesCreateCreated) readResponse(response runtime.ClientRespons return nil } + +// NewDcimRackRolesCreateDefault creates a DcimRackRolesCreateDefault with default headers values +func NewDcimRackRolesCreateDefault(code int) *DcimRackRolesCreateDefault { + return &DcimRackRolesCreateDefault{ + _statusCode: code, + } +} + +/*DcimRackRolesCreateDefault handles this case with default header values. + +DcimRackRolesCreateDefault dcim rack roles create default +*/ +type DcimRackRolesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack roles create default response +func (o *DcimRackRolesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackRolesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/rack-roles/][%d] dcim_rack-roles_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackRolesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackRolesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_responses.go index 725e39b71..32c1fa69a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimRackRolesDeleteReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_list_responses.go index 43f8d5016..4eafd0c60 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimRackRolesListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go index 4039418a7..f9bd0ecc6 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackRolesPartialUpdateReader) ReadResponse(response runtime.ClientR return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackRolesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackRolesPartialUpdateOK) readResponse(response runtime.ClientRespo return nil } + +// NewDcimRackRolesPartialUpdateDefault creates a DcimRackRolesPartialUpdateDefault with default headers values +func NewDcimRackRolesPartialUpdateDefault(code int) *DcimRackRolesPartialUpdateDefault { + return &DcimRackRolesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRackRolesPartialUpdateDefault handles this case with default header values. + +DcimRackRolesPartialUpdateDefault dcim rack roles partial update default +*/ +type DcimRackRolesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack roles partial update default response +func (o *DcimRackRolesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackRolesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/rack-roles/{id}/][%d] dcim_rack-roles_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackRolesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackRolesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_read_responses.go index 4de3fa666..456020340 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimRackRolesReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_update_responses.go index 0e1e11f2c..b06da94f3 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rack_roles_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRackRolesUpdateReader) ReadResponse(response runtime.ClientResponse return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRackRolesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRackRolesUpdateOK) readResponse(response runtime.ClientResponse, co return nil } + +// NewDcimRackRolesUpdateDefault creates a DcimRackRolesUpdateDefault with default headers values +func NewDcimRackRolesUpdateDefault(code int) *DcimRackRolesUpdateDefault { + return &DcimRackRolesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRackRolesUpdateDefault handles this case with default header values. + +DcimRackRolesUpdateDefault dcim rack roles update default +*/ +type DcimRackRolesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rack roles update default response +func (o *DcimRackRolesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRackRolesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/rack-roles/{id}/][%d] dcim_rack-roles_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRackRolesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRackRolesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_create_responses.go index 08e6f675e..0e8273f62 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimRacksCreateReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRacksCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRacksCreateCreated) readResponse(response runtime.ClientResponse, c return nil } + +// NewDcimRacksCreateDefault creates a DcimRacksCreateDefault with default headers values +func NewDcimRacksCreateDefault(code int) *DcimRacksCreateDefault { + return &DcimRacksCreateDefault{ + _statusCode: code, + } +} + +/*DcimRacksCreateDefault handles this case with default header values. + +DcimRacksCreateDefault dcim racks create default +*/ +type DcimRacksCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim racks create default response +func (o *DcimRacksCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRacksCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/racks/][%d] dcim_racks_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRacksCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRacksCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_delete_responses.go index 9d651b067..f618f659a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimRacksDeleteReader) ReadResponse(response runtime.ClientResponse, co return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_elevation_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_elevation_responses.go index 0b78a4060..995aa68ad 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_elevation_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_elevation_responses.go @@ -46,7 +46,7 @@ func (o *DcimRacksElevationReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_list_responses.go index 70a7b2d35..8477fd29a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimRacksListReader) ReadResponse(response runtime.ClientResponse, cons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_partial_update_responses.go index dbba90ba6..1aa462e72 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRacksPartialUpdateReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRacksPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRacksPartialUpdateOK) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimRacksPartialUpdateDefault creates a DcimRacksPartialUpdateDefault with default headers values +func NewDcimRacksPartialUpdateDefault(code int) *DcimRacksPartialUpdateDefault { + return &DcimRacksPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRacksPartialUpdateDefault handles this case with default header values. + +DcimRacksPartialUpdateDefault dcim racks partial update default +*/ +type DcimRacksPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim racks partial update default response +func (o *DcimRacksPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRacksPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/racks/{id}/][%d] dcim_racks_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRacksPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRacksPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_read_responses.go index 82cfdf4da..18031ddae 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimRacksReadReader) ReadResponse(response runtime.ClientResponse, cons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_update_responses.go index 02450d5d8..9c5f17ef4 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_racks_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRacksUpdateReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRacksUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRacksUpdateOK) readResponse(response runtime.ClientResponse, consum return nil } + +// NewDcimRacksUpdateDefault creates a DcimRacksUpdateDefault with default headers values +func NewDcimRacksUpdateDefault(code int) *DcimRacksUpdateDefault { + return &DcimRacksUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRacksUpdateDefault handles this case with default header values. + +DcimRacksUpdateDefault dcim racks update default +*/ +type DcimRacksUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim racks update default response +func (o *DcimRacksUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRacksUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/racks/{id}/][%d] dcim_racks_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRacksUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRacksUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_create_responses.go index 5020d1dd6..568c2941a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimRearPortTemplatesCreateReader) ReadResponse(response runtime.Client return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRearPortTemplatesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRearPortTemplatesCreateCreated) readResponse(response runtime.Clien return nil } + +// NewDcimRearPortTemplatesCreateDefault creates a DcimRearPortTemplatesCreateDefault with default headers values +func NewDcimRearPortTemplatesCreateDefault(code int) *DcimRearPortTemplatesCreateDefault { + return &DcimRearPortTemplatesCreateDefault{ + _statusCode: code, + } +} + +/*DcimRearPortTemplatesCreateDefault handles this case with default header values. + +DcimRearPortTemplatesCreateDefault dcim rear port templates create default +*/ +type DcimRearPortTemplatesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rear port templates create default response +func (o *DcimRearPortTemplatesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRearPortTemplatesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/rear-port-templates/][%d] dcim_rear-port-templates_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRearPortTemplatesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRearPortTemplatesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_delete_responses.go index 0da9cf2b8..e45d99008 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimRearPortTemplatesDeleteReader) ReadResponse(response runtime.Client return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_list_responses.go index be101c0f1..907f29b4a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimRearPortTemplatesListReader) ReadResponse(response runtime.ClientRe return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_partial_update_responses.go index a044035c2..de6ab9e90 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRearPortTemplatesPartialUpdateReader) ReadResponse(response runtime return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRearPortTemplatesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRearPortTemplatesPartialUpdateOK) readResponse(response runtime.Cli return nil } + +// NewDcimRearPortTemplatesPartialUpdateDefault creates a DcimRearPortTemplatesPartialUpdateDefault with default headers values +func NewDcimRearPortTemplatesPartialUpdateDefault(code int) *DcimRearPortTemplatesPartialUpdateDefault { + return &DcimRearPortTemplatesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRearPortTemplatesPartialUpdateDefault handles this case with default header values. + +DcimRearPortTemplatesPartialUpdateDefault dcim rear port templates partial update default +*/ +type DcimRearPortTemplatesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rear port templates partial update default response +func (o *DcimRearPortTemplatesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRearPortTemplatesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/rear-port-templates/{id}/][%d] dcim_rear-port-templates_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRearPortTemplatesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRearPortTemplatesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_read_responses.go index a294db6d2..9f6a030ba 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimRearPortTemplatesReadReader) ReadResponse(response runtime.ClientRe return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_update_responses.go index ab33ea7f1..056d4f13a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_port_templates_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRearPortTemplatesUpdateReader) ReadResponse(response runtime.Client return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRearPortTemplatesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRearPortTemplatesUpdateOK) readResponse(response runtime.ClientResp return nil } + +// NewDcimRearPortTemplatesUpdateDefault creates a DcimRearPortTemplatesUpdateDefault with default headers values +func NewDcimRearPortTemplatesUpdateDefault(code int) *DcimRearPortTemplatesUpdateDefault { + return &DcimRearPortTemplatesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRearPortTemplatesUpdateDefault handles this case with default header values. + +DcimRearPortTemplatesUpdateDefault dcim rear port templates update default +*/ +type DcimRearPortTemplatesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rear port templates update default response +func (o *DcimRearPortTemplatesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRearPortTemplatesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/rear-port-templates/{id}/][%d] dcim_rear-port-templates_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRearPortTemplatesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRearPortTemplatesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_create_responses.go index 7384d9913..92cda8459 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimRearPortsCreateReader) ReadResponse(response runtime.ClientResponse return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRearPortsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRearPortsCreateCreated) readResponse(response runtime.ClientRespons return nil } + +// NewDcimRearPortsCreateDefault creates a DcimRearPortsCreateDefault with default headers values +func NewDcimRearPortsCreateDefault(code int) *DcimRearPortsCreateDefault { + return &DcimRearPortsCreateDefault{ + _statusCode: code, + } +} + +/*DcimRearPortsCreateDefault handles this case with default header values. + +DcimRearPortsCreateDefault dcim rear ports create default +*/ +type DcimRearPortsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rear ports create default response +func (o *DcimRearPortsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRearPortsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/rear-ports/][%d] dcim_rear-ports_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRearPortsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRearPortsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_delete_responses.go index 2b70e9cbd..9701eb47d 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimRearPortsDeleteReader) ReadResponse(response runtime.ClientResponse return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_list_responses.go index 6ca238406..77f83180f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimRearPortsListReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_partial_update_responses.go index ff81e5233..3cb754e5e 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRearPortsPartialUpdateReader) ReadResponse(response runtime.ClientR return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRearPortsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRearPortsPartialUpdateOK) readResponse(response runtime.ClientRespo return nil } + +// NewDcimRearPortsPartialUpdateDefault creates a DcimRearPortsPartialUpdateDefault with default headers values +func NewDcimRearPortsPartialUpdateDefault(code int) *DcimRearPortsPartialUpdateDefault { + return &DcimRearPortsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRearPortsPartialUpdateDefault handles this case with default header values. + +DcimRearPortsPartialUpdateDefault dcim rear ports partial update default +*/ +type DcimRearPortsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rear ports partial update default response +func (o *DcimRearPortsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRearPortsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/rear-ports/{id}/][%d] dcim_rear-ports_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRearPortsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRearPortsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_read_responses.go index 2c9e2b7dc..24261307a 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimRearPortsReadReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_trace_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_trace_parameters.go new file mode 100644 index 000000000..2168b0f8a --- /dev/null +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_trace_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// Copyright 2020 The go-netbox Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package dcim + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewDcimRearPortsTraceParams creates a new DcimRearPortsTraceParams object +// with the default values initialized. +func NewDcimRearPortsTraceParams() *DcimRearPortsTraceParams { + var () + return &DcimRearPortsTraceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDcimRearPortsTraceParamsWithTimeout creates a new DcimRearPortsTraceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDcimRearPortsTraceParamsWithTimeout(timeout time.Duration) *DcimRearPortsTraceParams { + var () + return &DcimRearPortsTraceParams{ + + timeout: timeout, + } +} + +// NewDcimRearPortsTraceParamsWithContext creates a new DcimRearPortsTraceParams object +// with the default values initialized, and the ability to set a context for a request +func NewDcimRearPortsTraceParamsWithContext(ctx context.Context) *DcimRearPortsTraceParams { + var () + return &DcimRearPortsTraceParams{ + + Context: ctx, + } +} + +// NewDcimRearPortsTraceParamsWithHTTPClient creates a new DcimRearPortsTraceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDcimRearPortsTraceParamsWithHTTPClient(client *http.Client) *DcimRearPortsTraceParams { + var () + return &DcimRearPortsTraceParams{ + HTTPClient: client, + } +} + +/*DcimRearPortsTraceParams contains all the parameters to send to the API endpoint +for the dcim rear ports trace operation typically these are written to a http.Request +*/ +type DcimRearPortsTraceParams struct { + + /*ID + A unique integer value identifying this rear port. + + */ + ID int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the dcim rear ports trace params +func (o *DcimRearPortsTraceParams) WithTimeout(timeout time.Duration) *DcimRearPortsTraceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the dcim rear ports trace params +func (o *DcimRearPortsTraceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the dcim rear ports trace params +func (o *DcimRearPortsTraceParams) WithContext(ctx context.Context) *DcimRearPortsTraceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the dcim rear ports trace params +func (o *DcimRearPortsTraceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the dcim rear ports trace params +func (o *DcimRearPortsTraceParams) WithHTTPClient(client *http.Client) *DcimRearPortsTraceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the dcim rear ports trace params +func (o *DcimRearPortsTraceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the dcim rear ports trace params +func (o *DcimRearPortsTraceParams) WithID(id int64) *DcimRearPortsTraceParams { + o.SetID(id) + return o +} + +// SetID adds the id to the dcim rear ports trace params +func (o *DcimRearPortsTraceParams) SetID(id int64) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DcimRearPortsTraceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", swag.FormatInt64(o.ID)); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/secrets/secrets_choices_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_trace_responses.go similarity index 50% rename from vendor/github.com/netbox-community/go-netbox/netbox/client/secrets/secrets_choices_read_responses.go rename to vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_trace_responses.go index f5fa0e271..06570fea3 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/secrets/secrets_choices_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_trace_responses.go @@ -15,56 +15,70 @@ // limitations under the License. // -package secrets +package dcim // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" + "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" + "github.com/netbox-community/go-netbox/netbox/models" ) -// SecretsChoicesReadReader is a Reader for the SecretsChoicesRead structure. -type SecretsChoicesReadReader struct { +// DcimRearPortsTraceReader is a Reader for the DcimRearPortsTrace structure. +type DcimRearPortsTraceReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. -func (o *SecretsChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { +func (o *DcimRearPortsTraceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: - result := NewSecretsChoicesReadOK() + result := NewDcimRearPortsTraceOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } -// NewSecretsChoicesReadOK creates a SecretsChoicesReadOK with default headers values -func NewSecretsChoicesReadOK() *SecretsChoicesReadOK { - return &SecretsChoicesReadOK{} +// NewDcimRearPortsTraceOK creates a DcimRearPortsTraceOK with default headers values +func NewDcimRearPortsTraceOK() *DcimRearPortsTraceOK { + return &DcimRearPortsTraceOK{} } -/*SecretsChoicesReadOK handles this case with default header values. +/*DcimRearPortsTraceOK handles this case with default header values. -SecretsChoicesReadOK secrets choices read o k +DcimRearPortsTraceOK dcim rear ports trace o k */ -type SecretsChoicesReadOK struct { +type DcimRearPortsTraceOK struct { + Payload *models.RearPort } -func (o *SecretsChoicesReadOK) Error() string { - return fmt.Sprintf("[GET /secrets/_choices/{id}/][%d] secretsChoicesReadOK ", 200) +func (o *DcimRearPortsTraceOK) Error() string { + return fmt.Sprintf("[GET /dcim/rear-ports/{id}/trace/][%d] dcimRearPortsTraceOK %+v", 200, o.Payload) } -func (o *SecretsChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { +func (o *DcimRearPortsTraceOK) GetPayload() *models.RearPort { + return o.Payload +} + +func (o *DcimRearPortsTraceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RearPort) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } return nil } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_update_responses.go index aacb4ebfb..1b39d48da 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_rear_ports_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRearPortsUpdateReader) ReadResponse(response runtime.ClientResponse return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRearPortsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRearPortsUpdateOK) readResponse(response runtime.ClientResponse, co return nil } + +// NewDcimRearPortsUpdateDefault creates a DcimRearPortsUpdateDefault with default headers values +func NewDcimRearPortsUpdateDefault(code int) *DcimRearPortsUpdateDefault { + return &DcimRearPortsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRearPortsUpdateDefault handles this case with default header values. + +DcimRearPortsUpdateDefault dcim rear ports update default +*/ +type DcimRearPortsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim rear ports update default response +func (o *DcimRearPortsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRearPortsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/rear-ports/{id}/][%d] dcim_rear-ports_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRearPortsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRearPortsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_create_responses.go index 517fa87e2..dd762e41f 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimRegionsCreateReader) ReadResponse(response runtime.ClientResponse, return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRegionsCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRegionsCreateCreated) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimRegionsCreateDefault creates a DcimRegionsCreateDefault with default headers values +func NewDcimRegionsCreateDefault(code int) *DcimRegionsCreateDefault { + return &DcimRegionsCreateDefault{ + _statusCode: code, + } +} + +/*DcimRegionsCreateDefault handles this case with default header values. + +DcimRegionsCreateDefault dcim regions create default +*/ +type DcimRegionsCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim regions create default response +func (o *DcimRegionsCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRegionsCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/regions/][%d] dcim_regions_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRegionsCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRegionsCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_delete_responses.go index f7af747ce..9af732ea8 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimRegionsDeleteReader) ReadResponse(response runtime.ClientResponse, return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_list_responses.go index d1df1f4f4..c01b29eaa 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimRegionsListReader) ReadResponse(response runtime.ClientResponse, co return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_partial_update_responses.go index cef539cc1..79f08e7f9 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRegionsPartialUpdateReader) ReadResponse(response runtime.ClientRes return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRegionsPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRegionsPartialUpdateOK) readResponse(response runtime.ClientRespons return nil } + +// NewDcimRegionsPartialUpdateDefault creates a DcimRegionsPartialUpdateDefault with default headers values +func NewDcimRegionsPartialUpdateDefault(code int) *DcimRegionsPartialUpdateDefault { + return &DcimRegionsPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRegionsPartialUpdateDefault handles this case with default header values. + +DcimRegionsPartialUpdateDefault dcim regions partial update default +*/ +type DcimRegionsPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim regions partial update default response +func (o *DcimRegionsPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRegionsPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/regions/{id}/][%d] dcim_regions_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRegionsPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRegionsPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_read_responses.go index 215d7e5b0..2b3203c27 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimRegionsReadReader) ReadResponse(response runtime.ClientResponse, co return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_update_responses.go index ada784637..43314cb07 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_regions_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimRegionsUpdateReader) ReadResponse(response runtime.ClientResponse, return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimRegionsUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimRegionsUpdateOK) readResponse(response runtime.ClientResponse, cons return nil } + +// NewDcimRegionsUpdateDefault creates a DcimRegionsUpdateDefault with default headers values +func NewDcimRegionsUpdateDefault(code int) *DcimRegionsUpdateDefault { + return &DcimRegionsUpdateDefault{ + _statusCode: code, + } +} + +/*DcimRegionsUpdateDefault handles this case with default header values. + +DcimRegionsUpdateDefault dcim regions update default +*/ +type DcimRegionsUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim regions update default response +func (o *DcimRegionsUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimRegionsUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/regions/{id}/][%d] dcim_regions_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimRegionsUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimRegionsUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_create_responses.go index df5322b6d..374457501 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimSitesCreateReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimSitesCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimSitesCreateCreated) readResponse(response runtime.ClientResponse, c return nil } + +// NewDcimSitesCreateDefault creates a DcimSitesCreateDefault with default headers values +func NewDcimSitesCreateDefault(code int) *DcimSitesCreateDefault { + return &DcimSitesCreateDefault{ + _statusCode: code, + } +} + +/*DcimSitesCreateDefault handles this case with default header values. + +DcimSitesCreateDefault dcim sites create default +*/ +type DcimSitesCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim sites create default response +func (o *DcimSitesCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimSitesCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/sites/][%d] dcim_sites_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimSitesCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimSitesCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_delete_responses.go index 422e9337f..c375510f4 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimSitesDeleteReader) ReadResponse(response runtime.ClientResponse, co return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_graphs_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_graphs_responses.go index a499ac923..ae7b9a0ed 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_graphs_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_graphs_responses.go @@ -46,7 +46,7 @@ func (o *DcimSitesGraphsReader) ReadResponse(response runtime.ClientResponse, co return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_list_responses.go index 91930daeb..bcd9c2134 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimSitesListReader) ReadResponse(response runtime.ClientResponse, cons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_partial_update_responses.go index 3a2d1c815..c59001e4c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimSitesPartialUpdateReader) ReadResponse(response runtime.ClientRespo return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimSitesPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimSitesPartialUpdateOK) readResponse(response runtime.ClientResponse, return nil } + +// NewDcimSitesPartialUpdateDefault creates a DcimSitesPartialUpdateDefault with default headers values +func NewDcimSitesPartialUpdateDefault(code int) *DcimSitesPartialUpdateDefault { + return &DcimSitesPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimSitesPartialUpdateDefault handles this case with default header values. + +DcimSitesPartialUpdateDefault dcim sites partial update default +*/ +type DcimSitesPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim sites partial update default response +func (o *DcimSitesPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimSitesPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/sites/{id}/][%d] dcim_sites_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimSitesPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimSitesPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_read_responses.go index 019580435..036d9f1ef 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimSitesReadReader) ReadResponse(response runtime.ClientResponse, cons return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_update_responses.go index 9784a4a3d..6d0521997 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_sites_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimSitesUpdateReader) ReadResponse(response runtime.ClientResponse, co return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimSitesUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimSitesUpdateOK) readResponse(response runtime.ClientResponse, consum return nil } + +// NewDcimSitesUpdateDefault creates a DcimSitesUpdateDefault with default headers values +func NewDcimSitesUpdateDefault(code int) *DcimSitesUpdateDefault { + return &DcimSitesUpdateDefault{ + _statusCode: code, + } +} + +/*DcimSitesUpdateDefault handles this case with default header values. + +DcimSitesUpdateDefault dcim sites update default +*/ +type DcimSitesUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim sites update default response +func (o *DcimSitesUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimSitesUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/sites/{id}/][%d] dcim_sites_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimSitesUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimSitesUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_responses.go index 12bb9e617..f0f3661c4 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_create_responses.go @@ -44,9 +44,15 @@ func (o *DcimVirtualChassisCreateReader) ReadResponse(response runtime.ClientRes return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimVirtualChassisCreateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimVirtualChassisCreateCreated) readResponse(response runtime.ClientRe return nil } + +// NewDcimVirtualChassisCreateDefault creates a DcimVirtualChassisCreateDefault with default headers values +func NewDcimVirtualChassisCreateDefault(code int) *DcimVirtualChassisCreateDefault { + return &DcimVirtualChassisCreateDefault{ + _statusCode: code, + } +} + +/*DcimVirtualChassisCreateDefault handles this case with default header values. + +DcimVirtualChassisCreateDefault dcim virtual chassis create default +*/ +type DcimVirtualChassisCreateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim virtual chassis create default response +func (o *DcimVirtualChassisCreateDefault) Code() int { + return o._statusCode +} + +func (o *DcimVirtualChassisCreateDefault) Error() string { + return fmt.Sprintf("[POST /dcim/virtual-chassis/][%d] dcim_virtual-chassis_create default %+v", o._statusCode, o.Payload) +} + +func (o *DcimVirtualChassisCreateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimVirtualChassisCreateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go index 46a3812a2..6900d3708 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_delete_responses.go @@ -43,7 +43,7 @@ func (o *DcimVirtualChassisDeleteReader) ReadResponse(response runtime.ClientRes return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_responses.go index efb77a346..8b22694a1 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_list_responses.go @@ -50,7 +50,7 @@ func (o *DcimVirtualChassisListReader) ReadResponse(response runtime.ClientRespo return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go index 44b458215..eba7e213c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_partial_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimVirtualChassisPartialUpdateReader) ReadResponse(response runtime.Cl return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimVirtualChassisPartialUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimVirtualChassisPartialUpdateOK) readResponse(response runtime.Client return nil } + +// NewDcimVirtualChassisPartialUpdateDefault creates a DcimVirtualChassisPartialUpdateDefault with default headers values +func NewDcimVirtualChassisPartialUpdateDefault(code int) *DcimVirtualChassisPartialUpdateDefault { + return &DcimVirtualChassisPartialUpdateDefault{ + _statusCode: code, + } +} + +/*DcimVirtualChassisPartialUpdateDefault handles this case with default header values. + +DcimVirtualChassisPartialUpdateDefault dcim virtual chassis partial update default +*/ +type DcimVirtualChassisPartialUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim virtual chassis partial update default response +func (o *DcimVirtualChassisPartialUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimVirtualChassisPartialUpdateDefault) Error() string { + return fmt.Sprintf("[PATCH /dcim/virtual-chassis/{id}/][%d] dcim_virtual-chassis_partial_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimVirtualChassisPartialUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimVirtualChassisPartialUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_responses.go index 55ed4690d..ca171e18c 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_read_responses.go @@ -46,7 +46,7 @@ func (o *DcimVirtualChassisReadReader) ReadResponse(response runtime.ClientRespo return result, nil default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_responses.go index e4016abdc..92d957dc1 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_responses.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/dcim/dcim_virtual_chassis_update_responses.go @@ -44,9 +44,15 @@ func (o *DcimVirtualChassisUpdateReader) ReadResponse(response runtime.ClientRes return nil, err } return result, nil - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) + result := NewDcimVirtualChassisUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result } } @@ -82,3 +88,43 @@ func (o *DcimVirtualChassisUpdateOK) readResponse(response runtime.ClientRespons return nil } + +// NewDcimVirtualChassisUpdateDefault creates a DcimVirtualChassisUpdateDefault with default headers values +func NewDcimVirtualChassisUpdateDefault(code int) *DcimVirtualChassisUpdateDefault { + return &DcimVirtualChassisUpdateDefault{ + _statusCode: code, + } +} + +/*DcimVirtualChassisUpdateDefault handles this case with default header values. + +DcimVirtualChassisUpdateDefault dcim virtual chassis update default +*/ +type DcimVirtualChassisUpdateDefault struct { + _statusCode int + + Payload interface{} +} + +// Code gets the status code for the dcim virtual chassis update default response +func (o *DcimVirtualChassisUpdateDefault) Code() int { + return o._statusCode +} + +func (o *DcimVirtualChassisUpdateDefault) Error() string { + return fmt.Sprintf("[PUT /dcim/virtual-chassis/{id}/][%d] dcim_virtual-chassis_update default %+v", o._statusCode, o.Payload) +} + +func (o *DcimVirtualChassisUpdateDefault) GetPayload() interface{} { + return o.Payload +} + +func (o *DcimVirtualChassisUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_list_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_list_parameters.go deleted file mode 100644 index 6f6eafbcf..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_list_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewExtrasChoicesListParams creates a new ExtrasChoicesListParams object -// with the default values initialized. -func NewExtrasChoicesListParams() *ExtrasChoicesListParams { - - return &ExtrasChoicesListParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasChoicesListParamsWithTimeout creates a new ExtrasChoicesListParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasChoicesListParamsWithTimeout(timeout time.Duration) *ExtrasChoicesListParams { - - return &ExtrasChoicesListParams{ - - timeout: timeout, - } -} - -// NewExtrasChoicesListParamsWithContext creates a new ExtrasChoicesListParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasChoicesListParamsWithContext(ctx context.Context) *ExtrasChoicesListParams { - - return &ExtrasChoicesListParams{ - - Context: ctx, - } -} - -// NewExtrasChoicesListParamsWithHTTPClient creates a new ExtrasChoicesListParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasChoicesListParamsWithHTTPClient(client *http.Client) *ExtrasChoicesListParams { - - return &ExtrasChoicesListParams{ - HTTPClient: client, - } -} - -/*ExtrasChoicesListParams contains all the parameters to send to the API endpoint -for the extras choices list operation typically these are written to a http.Request -*/ -type ExtrasChoicesListParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras choices list params -func (o *ExtrasChoicesListParams) WithTimeout(timeout time.Duration) *ExtrasChoicesListParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras choices list params -func (o *ExtrasChoicesListParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras choices list params -func (o *ExtrasChoicesListParams) WithContext(ctx context.Context) *ExtrasChoicesListParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras choices list params -func (o *ExtrasChoicesListParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras choices list params -func (o *ExtrasChoicesListParams) WithHTTPClient(client *http.Client) *ExtrasChoicesListParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras choices list params -func (o *ExtrasChoicesListParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasChoicesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_read_parameters.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_read_parameters.go deleted file mode 100644 index 039bebdfd..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_read_parameters.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewExtrasChoicesReadParams creates a new ExtrasChoicesReadParams object -// with the default values initialized. -func NewExtrasChoicesReadParams() *ExtrasChoicesReadParams { - var () - return &ExtrasChoicesReadParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewExtrasChoicesReadParamsWithTimeout creates a new ExtrasChoicesReadParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewExtrasChoicesReadParamsWithTimeout(timeout time.Duration) *ExtrasChoicesReadParams { - var () - return &ExtrasChoicesReadParams{ - - timeout: timeout, - } -} - -// NewExtrasChoicesReadParamsWithContext creates a new ExtrasChoicesReadParams object -// with the default values initialized, and the ability to set a context for a request -func NewExtrasChoicesReadParamsWithContext(ctx context.Context) *ExtrasChoicesReadParams { - var () - return &ExtrasChoicesReadParams{ - - Context: ctx, - } -} - -// NewExtrasChoicesReadParamsWithHTTPClient creates a new ExtrasChoicesReadParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewExtrasChoicesReadParamsWithHTTPClient(client *http.Client) *ExtrasChoicesReadParams { - var () - return &ExtrasChoicesReadParams{ - HTTPClient: client, - } -} - -/*ExtrasChoicesReadParams contains all the parameters to send to the API endpoint -for the extras choices read operation typically these are written to a http.Request -*/ -type ExtrasChoicesReadParams struct { - - /*ID*/ - ID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the extras choices read params -func (o *ExtrasChoicesReadParams) WithTimeout(timeout time.Duration) *ExtrasChoicesReadParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the extras choices read params -func (o *ExtrasChoicesReadParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the extras choices read params -func (o *ExtrasChoicesReadParams) WithContext(ctx context.Context) *ExtrasChoicesReadParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the extras choices read params -func (o *ExtrasChoicesReadParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the extras choices read params -func (o *ExtrasChoicesReadParams) WithHTTPClient(client *http.Client) *ExtrasChoicesReadParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the extras choices read params -func (o *ExtrasChoicesReadParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithID adds the id to the extras choices read params -func (o *ExtrasChoicesReadParams) WithID(id string) *ExtrasChoicesReadParams { - o.SetID(id) - return o -} - -// SetID adds the id to the extras choices read params -func (o *ExtrasChoicesReadParams) SetID(id string) { - o.ID = id -} - -// WriteToRequest writes these params to a swagger request -func (o *ExtrasChoicesReadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param id - if err := r.SetPathParam("id", o.ID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_read_responses.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_read_responses.go deleted file mode 100644 index 95ee70f48..000000000 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_choices_read_responses.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Copyright 2020 The go-netbox Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package extras - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" -) - -// ExtrasChoicesReadReader is a Reader for the ExtrasChoicesRead structure. -type ExtrasChoicesReadReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ExtrasChoicesReadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewExtrasChoicesReadOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - - default: - return nil, runtime.NewAPIError("unknown error", response, response.Code()) - } -} - -// NewExtrasChoicesReadOK creates a ExtrasChoicesReadOK with default headers values -func NewExtrasChoicesReadOK() *ExtrasChoicesReadOK { - return &ExtrasChoicesReadOK{} -} - -/*ExtrasChoicesReadOK handles this case with default header values. - -ExtrasChoicesReadOK extras choices read o k -*/ -type ExtrasChoicesReadOK struct { -} - -func (o *ExtrasChoicesReadOK) Error() string { - return fmt.Sprintf("[GET /extras/_choices/{id}/][%d] extrasChoicesReadOK ", 200) -} - -func (o *ExtrasChoicesReadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} diff --git a/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_client.go b/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_client.go index 1742e37c1..0bf989455 100644 --- a/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_client.go +++ b/vendor/github.com/netbox-community/go-netbox/netbox/client/extras/extras_client.go @@ -94,6 +94,10 @@ type ClientService interface { ExtrasImageAttachmentsUpdate(params *ExtrasImageAttachmentsUpdateParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsUpdateOK, error) + ExtrasJobResultsList(params *ExtrasJobResultsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasJobResultsListOK, error) + + ExtrasJobResultsRead(params *ExtrasJobResultsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasJobResultsReadOK, error) + ExtrasObjectChangesList(params *ExtrasObjectChangesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasObjectChangesListOK, error) ExtrasObjectChangesRead(params *ExtrasObjectChangesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasObjectChangesReadOK, error) @@ -223,9 +227,8 @@ func (a *Client) ExtrasConfigContextsCreate(params *ExtrasConfigContextsCreatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_config-contexts_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasConfigContextsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -264,7 +267,7 @@ func (a *Client) ExtrasConfigContextsDelete(params *ExtrasConfigContextsDeletePa } /* - ExtrasConfigContextsList Call to super to allow for caching + ExtrasConfigContextsList extras config contexts list API */ func (a *Client) ExtrasConfigContextsList(params *ExtrasConfigContextsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsListOK, error) { // TODO: Validate the params before sending @@ -328,13 +331,12 @@ func (a *Client) ExtrasConfigContextsPartialUpdate(params *ExtrasConfigContextsP return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_config-contexts_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasConfigContextsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - ExtrasConfigContextsRead Call to super to allow for caching + ExtrasConfigContextsRead extras config contexts read API */ func (a *Client) ExtrasConfigContextsRead(params *ExtrasConfigContextsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasConfigContextsReadOK, error) { // TODO: Validate the params before sending @@ -398,9 +400,8 @@ func (a *Client) ExtrasConfigContextsUpdate(params *ExtrasConfigContextsUpdatePa return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_config-contexts_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasConfigContextsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -433,9 +434,8 @@ func (a *Client) ExtrasExportTemplatesCreate(params *ExtrasExportTemplatesCreate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_export-templates_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasExportTemplatesCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -474,7 +474,7 @@ func (a *Client) ExtrasExportTemplatesDelete(params *ExtrasExportTemplatesDelete } /* - ExtrasExportTemplatesList Call to super to allow for caching + ExtrasExportTemplatesList extras export templates list API */ func (a *Client) ExtrasExportTemplatesList(params *ExtrasExportTemplatesListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesListOK, error) { // TODO: Validate the params before sending @@ -538,13 +538,12 @@ func (a *Client) ExtrasExportTemplatesPartialUpdate(params *ExtrasExportTemplate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_export-templates_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasExportTemplatesPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - ExtrasExportTemplatesRead Call to super to allow for caching + ExtrasExportTemplatesRead extras export templates read API */ func (a *Client) ExtrasExportTemplatesRead(params *ExtrasExportTemplatesReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasExportTemplatesReadOK, error) { // TODO: Validate the params before sending @@ -608,9 +607,8 @@ func (a *Client) ExtrasExportTemplatesUpdate(params *ExtrasExportTemplatesUpdate return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_export-templates_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasExportTemplatesUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -643,9 +641,8 @@ func (a *Client) ExtrasGraphsCreate(params *ExtrasGraphsCreateParams, authInfo r return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_graphs_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasGraphsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -684,7 +681,7 @@ func (a *Client) ExtrasGraphsDelete(params *ExtrasGraphsDeleteParams, authInfo r } /* - ExtrasGraphsList Call to super to allow for caching + ExtrasGraphsList extras graphs list API */ func (a *Client) ExtrasGraphsList(params *ExtrasGraphsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsListOK, error) { // TODO: Validate the params before sending @@ -748,13 +745,12 @@ func (a *Client) ExtrasGraphsPartialUpdate(params *ExtrasGraphsPartialUpdatePara return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_graphs_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasGraphsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - ExtrasGraphsRead Call to super to allow for caching + ExtrasGraphsRead extras graphs read API */ func (a *Client) ExtrasGraphsRead(params *ExtrasGraphsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasGraphsReadOK, error) { // TODO: Validate the params before sending @@ -818,9 +814,8 @@ func (a *Client) ExtrasGraphsUpdate(params *ExtrasGraphsUpdateParams, authInfo r return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_graphs_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasGraphsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -853,9 +848,8 @@ func (a *Client) ExtrasImageAttachmentsCreate(params *ExtrasImageAttachmentsCrea return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_image-attachments_create: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasImageAttachmentsCreateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* @@ -894,7 +888,7 @@ func (a *Client) ExtrasImageAttachmentsDelete(params *ExtrasImageAttachmentsDele } /* - ExtrasImageAttachmentsList Call to super to allow for caching + ExtrasImageAttachmentsList extras image attachments list API */ func (a *Client) ExtrasImageAttachmentsList(params *ExtrasImageAttachmentsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsListOK, error) { // TODO: Validate the params before sending @@ -958,13 +952,12 @@ func (a *Client) ExtrasImageAttachmentsPartialUpdate(params *ExtrasImageAttachme return success, nil } // unexpected success response - // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_image-attachments_partial_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) - panic(msg) + unexpectedSuccess := result.(*ExtrasImageAttachmentsPartialUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* - ExtrasImageAttachmentsRead Call to super to allow for caching + ExtrasImageAttachmentsRead extras image attachments read API */ func (a *Client) ExtrasImageAttachmentsRead(params *ExtrasImageAttachmentsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasImageAttachmentsReadOK, error) { // TODO: Validate the params before sending @@ -1028,8 +1021,77 @@ func (a *Client) ExtrasImageAttachmentsUpdate(params *ExtrasImageAttachmentsUpda return success, nil } // unexpected success response + unexpectedSuccess := result.(*ExtrasImageAttachmentsUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + ExtrasJobResultsList Retrieve a list of job results +*/ +func (a *Client) ExtrasJobResultsList(params *ExtrasJobResultsListParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasJobResultsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewExtrasJobResultsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "extras_job-results_list", + Method: "GET", + PathPattern: "/extras/job-results/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ExtrasJobResultsListReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ExtrasJobResultsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for extras_job-results_list: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ExtrasJobResultsRead Retrieve a list of job results +*/ +func (a *Client) ExtrasJobResultsRead(params *ExtrasJobResultsReadParams, authInfo runtime.ClientAuthInfoWriter) (*ExtrasJobResultsReadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewExtrasJobResultsReadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "extras_job-results_read", + Method: "GET", + PathPattern: "/extras/job-results/{id}/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ExtrasJobResultsReadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ExtrasJobResultsReadOK) + if ok { + return success, nil + } + // unexpected success response // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue - msg := fmt.Sprintf("unexpected success response for extras_image-attachments_update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + msg := fmt.Sprintf("unexpected success response for extras_job-results_read: API contract not enforced by server. Client expected to get an error, but got: %T", result) panic(msg) } @@ -1174,7 +1236,7 @@ func (a *Client) ExtrasReportsRead(params *ExtrasReportsReadParams, authInfo run } /* - ExtrasReportsRun Run a Report and create a new ReportResult, overwriting any previous result for the Report. + ExtrasReportsRun Run a Report identified as ".